-
PyServeX v0.9.0
StableSome checks failedRun Tests / test (3.12) (push) Successful in 1m10sRun Tests / test (3.13) (push) Successful in 1m9sCI/CD Pipeline / lint (push) Successful in 0sBuild and Release / build (push) Successful in 41sCI/CD Pipeline / test (push) Has been skippedCI/CD Pipeline / build-and-release (push) Has been skippedBuild and Release / release (push) Successful in 5sCI/CD Pipeline / notify (push) Successful in 1sLint Code / lint (push) Failing after 38sreleased this
2025-12-03 09:59:50 +00:00 | 12 commits to main since this releaseWhat's new in this version
New Features
- Cython Path Matcher: Added high-performance Cython module for path matching operations
FastMountedPathclass for optimized ASGI mount path matchingFastMountManagerfor efficient mount lookup with longest-prefix matching- Utility functions:
path_matches_prefix,strip_path_prefix,match_and_modify_path - Performance improvement: 1.5x-7.5x faster path matching operations
- Automatic fallback to pure Python implementation if Cython is not available
Bug Fixes
- Fixed mypy type checking for optional dependencies (a2wsgi, asgiref, django)
Technical Changes
- New build system for Cython extensions (
scripts/build_cython.py) - Updated Makefile with new commands:
make build-cython- Build Cython extensions onlymake benchmark- Run performance benchmarks
- Clean command now removes Cython artifacts (*.c, *.so, *.pyd, *.html)
- Lint and format commands exclude
.pyxfiles - Added comprehensive test suite for path matcher (28 tests)
- Added benchmark suite in
benchmarks/bench_path_matcher.py
Dependencies
- Added
cython>=3.0.0to dev dependencies - Added
setuptools>=80.0.0to dev dependencies - Updated build-system requires in pyproject.toml
Full Changelog: https://git.pyserve.org/Shifty/pyserveX/compare/v0.8.0...v0.9.0
Installation
pip install pyserve==0.9.0Usage
pyserve --helpBuilding with Cython (Optional)
For maximum performance, build the Cython extensions:
make build-cythonOr manually:
python scripts/build_cython.py build_ext --inplaceBenchmark Results
Operation Pure Python Cython Speedup Single path match ~130 ns ~70 ns 1.9x Mount manager lookup (10 mounts) ~660 ns ~200 ns 3.3x No match (fast fail) ~660 ns ~90 ns 7.5x Downloads
- Cython Path Matcher: Added high-performance Cython module for path matching operations