forked from Shifty/pyserveX
34 lines
721 B
Python
34 lines
721 B
Python
"""
|
|
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",
|
|
]
|