Releases: py-library/fastapi_advanced_filters
Releases · py-library/fastapi_advanced_filters
v1.0.0
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to
Semantic Versioning.
0.1.0 - 2025-09-28
Initial public release of fastapi_advanced_filters.
Added
- Pydantic v2-based
BaseFilterwith aFilterConfiginner class to declaratively define:- Filterable fields via
FieldCriteria(supports EQ, NEQ, IN, NOTIN, GT, GTE, LT, LTE, LIKE, ILIKE, CONT, IS, ISNULL, BTW) - Optional full-text-ish search via
QSearchandAdvancedQSearchwith logical combinators (AND/OR) - Sorting via
SortBywith optional camelCase aliasing - Field selection via
Selectablewith optional camelCase aliasing - Pagination via
PaginationEnum.OFFSET_BASED(returns aPaginationdataclass withlimit/offset)
- Filterable fields via
- First-class SQLAlchemy support:
- Operation mappings that translate
OperationEnumto SQLAlchemy expressions - Sorting mappings for
OrderEnum - Logical operator mappings for AND/OR
- Operation mappings that translate
- Utilities:
to_camel_case,to_snake_case- Schema validators for
SortByandSelectable
- Robust test suite (unit + integration) with dialect-agnostic SQL assertions; ~98% coverage locally.
- Documentation:
docs/with Installation, Reference, Examples, Extending, and Types- Simplified examples demonstrating filtering, sorting, selection, q_search, and pagination
- Root
README.mdlinked to docs and quickstart
CI/CD
- GitHub Actions CI: Poetry-based setup running flake8, mypy, and pytest with SQLAlchemy extras.
- Publish workflow: tag-driven (vX.Y.Z), validates tag vs
pyproject.tomlversion, builds, and publishes to PyPI using repo secretPYPI_API_TOKEN(orAPI_TOKEN). Also creates a GitHub Release.
Compatibility
- Python: 3.9+
- FastAPI: >= 0.100.0
- Pydantic: >= 2.0.0 (tested with 2.11+)
- SQLAlchemy (optional): >= 1.4.36, < 2.1.0