fastapi-filter

Filter and order your endpoints

MIT License

Downloads
81.5K
Stars
208

Bot releases are hidden (Show)

fastapi-filter - Update Fastapi latest supported version to 0.85

Published by arthurio about 2 years ago

Main contribution

What's Changed

Full Changelog: https://github.com/arthurio/fastapi-filter/compare/v0.1.5...v0.1.6

fastapi-filter - Update Fastapi latest supported version to 0.84

Published by arthurio about 2 years ago

Main contribution

What's Changed

Full Changelog: https://github.com/arthurio/fastapi-filter/compare/v0.1.4...v0.1.5

fastapi-filter - Update Fastapi latest supported version to 0.83

Published by arthurio about 2 years ago

Main contribution

What's Changed

Full Changelog: https://github.com/arthurio/fastapi-filter/compare/v0.1.3...v0.1.4

fastapi-filter - Update Fastapi latest supported version to 0.82

Published by arthurio about 2 years ago

Main contribution

What's Changed

Full Changelog: https://github.com/arthurio/fastapi-filter/compare/v0.1.2...v0.1.3

fastapi-filter - Update Fastapi supported versions

Published by arthurio about 2 years ago

Main contribution

Dependency updates

Full Changelog: https://github.com/arthurio/fastapi-filter/compare/v0.1.1...v0.1.2

fastapi-filter - 🐛 Bug fix - empty ordering

Published by arthurio about 2 years ago

Main contribution

Bug fixes

  • Handle passing empty ?order_by=
  • Fix validator for custom ordering field names

Full Changelog: https://github.com/arthurio/fastapi-filter/compare/v0.1.0...v0.1.1

fastapi-filter - Merge ordering and filtering under the same class

Published by arthurio about 2 years ago

🫱🏻‍🫲🏾 Main contributions

✨ Updates

  • order_by is now part of the Filter class so that you don't have to manage them separately.
  • You can add a validator to restrict which fields can be sortable (returns a 422 if invalid as opposed to 500 before)
  • order_by is now a list[str] instead of str that you have to manually parse
  • Prevent using twice the same field name for ordering (e.g. can't do ?order_by=name,-name or ?order_by=name,age,name)
  • Docs are updated and order_by section has some stuff now
  • Added more tests
  • You can change the default name (order_by) for ordering by overriding Filter.Constants.ordering_field_name

🚨 Breaking changes

  • We now use Constants.model everywhere (instead of model for SQLAlchemy and collection for MongoEngine)
  • The Constants class has to inherit from parent or redefine all the fields. (class Constants(Filter.Constants):).
  • OrderBy no longer exists, just add order_by: list[str] | None to your filters if you want to add ordering capabilities.

🔗 Dependency updates

Full Changelog: https://github.com/arthurio/fastapi-filter/compare/v0.0.4...v0.1.0

fastapi-filter - Support top level prefixed filters

Published by arthurio over 2 years ago

Main contributions

Features

  • You can now use FilterDepends(with_prefix("my_prefix", MyFilter), by_alias=True) to use a filter with a prefix in your routes.
    • by_alias parameter was added to FilterDepends
  • You can now filter related documents with mongoengine.

Breaking change

  • nested_filter has been renamed to with_prefix

Dependency updates

Full Changelog: https://github.com/arthurio/fastapi-filter/compare/v0.0.3...v0.0.4

fastapi-filter - 🚀 First automated release

Published by arthurio over 2 years ago

Supported filters and order_by orms/odms

  • mongoengine
  • sqlalchemy
Package Rankings
Top 6.48% on Pypi.org
Badges
Extracted from project README
pypi downloads codecov Netlify Status CodeQL
Related Projects