cython path_matcher added to reduce time on hot operations
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
"""
|
||||
Path matcher module - uses Cython implementation if available, falls back to pure Python.
|
||||
"""
|
||||
|
||||
try:
|
||||
from pyserve._path_matcher import (
|
||||
FastMountedPath,
|
||||
FastMountManager,
|
||||
match_and_modify_path,
|
||||
path_matches_prefix,
|
||||
strip_path_prefix,
|
||||
)
|
||||
|
||||
CYTHON_AVAILABLE = True
|
||||
except ImportError:
|
||||
from pyserve._path_matcher_py import (
|
||||
FastMountedPath,
|
||||
FastMountManager,
|
||||
match_and_modify_path,
|
||||
path_matches_prefix,
|
||||
strip_path_prefix,
|
||||
)
|
||||
|
||||
CYTHON_AVAILABLE = False
|
||||
|
||||
__all__ = [
|
||||
"FastMountedPath",
|
||||
"FastMountManager",
|
||||
"path_matches_prefix",
|
||||
"strip_path_prefix",
|
||||
"match_and_modify_path",
|
||||
"CYTHON_AVAILABLE",
|
||||
]
|
||||
Reference in New Issue
Block a user