Migration to fastapi-pagination
π Features
- Migrated to fastapi-pagination library for standardized pagination
- Automatic OpenAPI schema generation for pagination parameters
- Optimized SQL queries with built-in LIMIT/OFFSET handling
π Changes
- Changed API parameter from
per_pagetosize - Replaced manual pagination logic with
paginate()function - Updated all database functions to use fastapi-pagination
- Updated all tests to use new pagination parameters
π οΈ Technical Details
- Added
add_pagination(app)to main.py - Updated route parameters to use
Params = Depends() - Simplified database functions with automatic pagination
- All API endpoints now support standard
?page=1&size=6format
π API Changes
Before: GET /api/users?page=1&per_page=6
After: GET /api/users?page=1&size=6
β Tests
- All 62 tests passing
- Updated test suite for new pagination parameters
- Added comprehensive CRUD tests with database verification
Full Changelog: https://github.com/Badx86/python_advanced/commits/v1.0.0