bloom_rest 0.2.2
bloom_rest: ^0.2.2 copied to clipboard
DRF-style (Django REST Framework) REST layer on top of BloomApiRouter and bloom_db, providing serializers, ViewSets, pagination, filters, permissions, and throttling.
Changelog #
0.2.2 - 2026-08-31 #
Fixed #
bloom_restcould not be resolved by any consumer. The package depended onbloom_cache ^0.2.0, butbloom_cache0.2.x depends onbloom_server ^0.1.0, which contradicts this package's ownbloom_server ^0.2.0— sopub getfailed with "version solving failed" on 0.2.0 and 0.2.1. The constraint is nowbloom_cache ^0.3.0(0.3.0 being the firstbloom_cacherelease onbloom_server ^0.2.0), which is what the monorepo'sdependency_overridesalready resolved to. Those overrides are why the contradiction never showed up in local builds or tests.
Security & Hardening #
- Throttling Race Condition Elimination & Atomic Store Support:
- Introduced
BloomAtomicThrottleStoreandInMemoryAtomicThrottleStorefor race-free sliding-window rate limiting. - Documented that non-atomic
BloomCachefallback is subject to get-modify-set races under concurrent multi-process environments. - Hardened
ByUserOrIpwith immediate transport peer extraction (PeerAddressExtractor) andTrustedProxyPredicate. Forwarding headers (X-Forwarded-For,X-Real-IP) are never trusted unless verified against trusted proxies; falls back to a non-spoofable shared fallback key (anon:shared_untrusted).
- Introduced
- Sensitive Field Filtering (Secure by Default):
BloomModelSerializernow excludes conventionally sensitive fields (password,password_hash,token,access_token,refresh_token,secret,api_key) from serialized response output and write input by default.- Added
includeSensitiveFieldsconfiguration option (defaultfalse) onBloomModelSerializerto explicitly opt into sensitive field handling when needed.
- Permission Responses:
- Updated ViewSet permission guards to return
401 Unauthorizedstrictly when no verified caller identity exists, and403 Forbiddenfor authenticated callers denied by a permission policy.
- Updated ViewSet permission guards to return
- Deterministic Keyset Cursor Pagination:
- Fixed
CursorPaginationto honorCursorPagination.orderingFieldwhen query parameters are omitted. - Applied deterministic query ordering with primary-key tie-breaker (
(orderField, pkField)) and matching composite cursor predicates to eliminate pagination drift.
- Fixed
0.2.1 - 2026-08-25 #
Fixed #
- Bumped
bloom_serverdependency constraint from^0.1.0to^0.2.0— the stale constraint was incompatible with any sibling package (bloom_cache,bloom_i18n) requiringbloom_server ^0.2.0, breakingpub getin any app combining them.
0.2.0 - 2026-08-23 #
Breaking #
- Now depends on
bloom_serverinstead ofbloom_framework. Imports change frompackage:bloom_framework/bloom_server.darttopackage:bloom_server/bloom_server.dart. - No longer requires Flutter. The package now resolves against the Flutter-free
bloom_servercore, so it can be used from a plaindart run/dart compilebackend.
0.1.0 #
- Initial release of
bloom_rest— DRF-style (Django REST Framework) REST layer on top ofBloomApiRouter+bloom_db. BloomSerializer,BloomModelSerializer,BloomNestedSerializer, andBloomFieldSetfor field-level read/write exposure control and validation.BloomPaginationinterface withPageNumberPagination,LimitOffsetPagination, and keysetCursorPagination(opaque base64 cursor encoding).- Composable
BloomPermissionhierarchy (AllowAny,IsAuthenticated,IsStaff,IsSuperuser,IsReadOnly) with.and(),.or(),.negate(). BloomThrottlerate limiting with DRF rate strings (e.g."100/hour","10/minute") backed bybloom_cache'sBloomCache.- Composable
BloomFilterBackendstack:BloomFieldFilter,BloomSearchFilter,BloomOrderingFilter. BloomViewSetfor complete CRUD route mounting ontoBloomApiRouterin a single call with secure-by-default authentication posture.