A FastAPI library for building complex, component-based listing APIs with filters, sorting, and pagination.
fastapi-listing is a Python library for FastAPI that provides a structured framework to build complex item listing endpoints. It abstracts common features like filtering, sorting, and pagination into reusable components, reducing boilerplate and ensuring consistency across listing APIs. It solves the problem of designing and maintaining intricate data listing interfaces that are both powerful and readable.
Backend developers building FastAPI applications that require robust, filterable, and sortable data listing endpoints, particularly those dealing with complex data models and frequent feature changes.
Developers choose fastapi-listing for its component-based architecture that offers high customizability while maintaining clean code, its built-in security via field mappers, and its ability to adapt to various client request formats without sacrificing development speed.
Advanced items listing library that gives you freedom to design complex listing REST APIs that can be read by human.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows building APIs by plugging in reusable filters, sorters, and paginators, enabling easy customization and extension for complex listing requirements, as shown in the filter and sort mapper examples.
Filter and sort mappers restrict client operations to explicitly allowed fields, preventing unintended data exposure and enhancing API security, which is a core feature emphasized in the README.
Customizable adapters translate various client request formats into library parameters, supporting multiple frontend or backend clients without modifying core logic, as detailed in the adapter class section.
Offers both inline and class-based implementation styles, catering to different project structures and developer preferences, with examples provided for quick integration.
Primarily designed for SQLAlchemy, with support for other ORMs like PyMongo and Tortoise ORM listed as 'in progress', which restricts its use in projects with diverse database backends.
Requires defining DAOs, mappers, and adapters even for basic use cases, adding overhead compared to simpler listing solutions or manual query building in FastAPI.
The documentation is noted as 'a work in progress', which can hinder onboarding and troubleshooting, especially for advanced customizations beyond the basic examples.