Releases: hoaxnerd/fastrest
Releases · hoaxnerd/fastrest
v0.1.4 — Fix nested permission composition with & | ~ operators
Composed permissions like IsAuthenticated() & (IsOwner() | IsAdminUser()) raised TypeError because _AND/_OR/_NOT used isinstance(x, BasePermission) to decide whether to call x() — but composed objects aren't BasePermission subclasses. Added _resolve_perm() helper that recognizes all permission types (_AND, _OR, _NOT, BasePermission) and passes them through as-is.
v0.1.3 — Add multi-ORM support, router.serve() zero-config API
- Add Tortoise ORM adapter: session-less CRUD, Model.describe() introspection,
17 field type mappings - Add SQLModel adapter: extends SQLAlchemy with Pydantic metadata enrichment
- Add Beanie adapter (MongoDB): session-less CRUD, Pydantic model_fields
introspection, mongomock-motor testing support - Expand SQLAlchemy type map from 14 to 80+ entries (PostgreSQL, MySQL,
MSSQL, Oracle dialect types) - Expand FIELD_TYPE_MAP with 9 new normalized types (duration, email, url,
slug, ip, choice, list, dict, binary) - Add adapter contract test suite shared across all ORMs
- Add serve() method to BaseRouter: auto-generates serializer, viewset,
and routes from any ORM model in one line - Auto-infer URL prefix from model name (Author → authors, BookReview → book-reviews)
- Auto-detect PK type (string for MongoDB ObjectId)
- Support all viewset options: fields, exclude, readonly, pagination,
filtering, search, ordering, permissions, auth, throttling - Add 557 framework tests (+35 serve, adapter contract tests, type mapping tests)
- Add 183 example app tests across all four ORMs
v0.1.2 — Add native MCP and SKILL support
- Agent integration: auto-generated SKILL.md from viewsets, built-in MCP server via mount_mcp(), and structured API manifest at /manifest.json. Content negotiation with Accept header parsing.
- Authentication backends (Token, Basic, Session), throttling with rate limits, app-bound settings with configure(), and HasScope permission class for scope-based access control.
- SQLAlchemy decoupled from core — now an optional dependency via pip install fastrest[sqlalchemy]. ORM adapter auto-detected at runtime; custom adapters supported via set_default_adapter().
- Project status moved from Alpha to Beta.
Full Changelog: v0.1.1...v0.1.2
v0.1.1 — Pagination & Filtering
Added
PageNumberPagination—?page=1&page_size=20with configurablepage_sizeandmax_page_sizeLimitOffsetPagination—?limit=20&offset=0with configurabledefault_limitandmax_limit- Paginated response envelope:
{"count", "next", "previous", "results"} SearchFilter—?search=foo, case-insensitive containment acrossview.search_fieldsOrderingFilter—?ordering=-price,name, respectsview.ordering_fieldswhitelist andview.orderingdefault- Filter and pagination query parameters auto-appear in OpenAPI
/docs pagination_class,filter_backends,search_fields,ordering_fields,orderingviewset attributes
v0.1.0 — Initial Release
Added
- ModelSerializer with automatic field generation from SQLAlchemy models
- ModelViewSet and ReadOnlyModelViewSet with full CRUD support
- DefaultRouter and SimpleRouter with DRF-style URL patterns
- Per-method OpenAPI route registration with typed schemas
- Auto-generated Pydantic request/response models from serializers
@actiondecorator for custom viewset endpoints- Permission system with
&,|,~composition operators - Built-in permissions: AllowAny, IsAuthenticated, IsAdminUser, IsAuthenticatedOrReadOnly
- Field library: CharField, IntegerField, FloatField, BooleanField, DateTimeField, UUIDField, and more
- Validation: field-level, serializer-level, and per-field
validate_<name>hooks - Exception hierarchy matching DRF (ValidationError, NotFound, PermissionDenied, etc.)
- AsyncAPIClient for testing
- Pluggable ORM adapter (SQLAlchemy adapter included)