django-ninja-boost 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- django_ninja_boost-0.2.0/CHANGELOG.md +58 -0
- django_ninja_boost-0.2.0/LICENSE +21 -0
- django_ninja_boost-0.2.0/MANIFEST.in +7 -0
- django_ninja_boost-0.2.0/PKG-INFO +1562 -0
- django_ninja_boost-0.2.0/README.md +1485 -0
- django_ninja_boost-0.2.0/pyproject.toml +103 -0
- django_ninja_boost-0.2.0/setup.cfg +4 -0
- django_ninja_boost-0.2.0/src/django_ninja_boost.egg-info/PKG-INFO +1562 -0
- django_ninja_boost-0.2.0/src/django_ninja_boost.egg-info/SOURCES.txt +54 -0
- django_ninja_boost-0.2.0/src/django_ninja_boost.egg-info/dependency_links.txt +1 -0
- django_ninja_boost-0.2.0/src/django_ninja_boost.egg-info/entry_points.txt +2 -0
- django_ninja_boost-0.2.0/src/django_ninja_boost.egg-info/requires.txt +29 -0
- django_ninja_boost-0.2.0/src/django_ninja_boost.egg-info/top_level.txt +1 -0
- django_ninja_boost-0.2.0/src/ninja_boost/__init__.py +208 -0
- django_ninja_boost-0.2.0/src/ninja_boost/api.py +87 -0
- django_ninja_boost-0.2.0/src/ninja_boost/apps.py +130 -0
- django_ninja_boost-0.2.0/src/ninja_boost/async_support.py +358 -0
- django_ninja_boost-0.2.0/src/ninja_boost/audit.py +687 -0
- django_ninja_boost-0.2.0/src/ninja_boost/caching.py +339 -0
- django_ninja_boost-0.2.0/src/ninja_boost/cli.py +338 -0
- django_ninja_boost-0.2.0/src/ninja_boost/conf.py +107 -0
- django_ninja_boost-0.2.0/src/ninja_boost/dependencies.py +64 -0
- django_ninja_boost-0.2.0/src/ninja_boost/docs.py +317 -0
- django_ninja_boost-0.2.0/src/ninja_boost/events.py +187 -0
- django_ninja_boost-0.2.0/src/ninja_boost/exceptions.py +64 -0
- django_ninja_boost-0.2.0/src/ninja_boost/health.py +231 -0
- django_ninja_boost-0.2.0/src/ninja_boost/idempotency.py +398 -0
- django_ninja_boost-0.2.0/src/ninja_boost/integrations.py +141 -0
- django_ninja_boost-0.2.0/src/ninja_boost/lifecycle.py +259 -0
- django_ninja_boost-0.2.0/src/ninja_boost/logging_structured.py +271 -0
- django_ninja_boost-0.2.0/src/ninja_boost/metrics.py +490 -0
- django_ninja_boost-0.2.0/src/ninja_boost/middleware.py +72 -0
- django_ninja_boost-0.2.0/src/ninja_boost/pagination.py +304 -0
- django_ninja_boost-0.2.0/src/ninja_boost/permissions.py +348 -0
- django_ninja_boost-0.2.0/src/ninja_boost/plugins.py +204 -0
- django_ninja_boost-0.2.0/src/ninja_boost/policies.py +337 -0
- django_ninja_boost-0.2.0/src/ninja_boost/py.typed +0 -0
- django_ninja_boost-0.2.0/src/ninja_boost/rate_limiting.py +320 -0
- django_ninja_boost-0.2.0/src/ninja_boost/responses.py +23 -0
- django_ninja_boost-0.2.0/src/ninja_boost/router.py +108 -0
- django_ninja_boost-0.2.0/src/ninja_boost/security_headers.py +312 -0
- django_ninja_boost-0.2.0/src/ninja_boost/services.py +259 -0
- django_ninja_boost-0.2.0/src/ninja_boost/versioning.py +286 -0
- django_ninja_boost-0.2.0/src/ninja_boost/webhook.py +313 -0
- django_ninja_boost-0.2.0/template/apps/__init__.py +0 -0
- django_ninja_boost-0.2.0/template/apps/users/__init__.py +0 -0
- django_ninja_boost-0.2.0/template/apps/users/migrations/__init__.py +0 -0
- django_ninja_boost-0.2.0/template/apps/users/routers.py +24 -0
- django_ninja_boost-0.2.0/template/apps/users/schemas.py +19 -0
- django_ninja_boost-0.2.0/template/apps/users/services.py +28 -0
- django_ninja_boost-0.2.0/template/project_name/__init__.py +0 -0
- django_ninja_boost-0.2.0/template/project_name/settings.py +55 -0
- django_ninja_boost-0.2.0/template/project_name/urls.py +15 -0
- django_ninja_boost-0.2.0/tests/conftest.py +23 -0
- django_ninja_boost-0.2.0/tests/test_core.py +227 -0
- django_ninja_boost-0.2.0/tests/urls.py +8 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to django-ninja-boost are documented here.
|
|
4
|
+
|
|
5
|
+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
|
+
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [0.2.0] — 2026-02-24
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **30 production modules** — complete automation layer for Django Ninja APIs
|
|
15
|
+
- `AutoAPI` / `AutoRouter` — drop-in replacements with auto-wired auth, DI, pagination, rate limiting
|
|
16
|
+
- `inject_context` — injects `ctx = {user, ip, trace_id, services}` into every view
|
|
17
|
+
- `auto_paginate` / `cursor_paginate` — transparent pagination with `?page=&size=` params
|
|
18
|
+
- `rate_limit` decorator — per-route and global rate limiting (`InMemoryBackend`, `CacheBackend`)
|
|
19
|
+
- `require` / `require_async` — declarative permissions (`IsAuthenticated`, `IsStaff`, `HasPermission`, `IsOwner`, combinators `&`, `|`, `~`)
|
|
20
|
+
- `BasePolicy` / `PolicyRegistry` — resource-level policy registry with `authorize()` and `@policy` decorator
|
|
21
|
+
- `BoostService` / `ServiceRegistry` — IoC service container with scoped and singleton services
|
|
22
|
+
- `EventBus` — pub/sub lifecycle events (`before_request`, `after_response`, `on_error`, …)
|
|
23
|
+
- `BoostPlugin` / `PluginRegistry` — plugin architecture with full lifecycle hooks
|
|
24
|
+
- `Metrics` — pluggable metrics (`PrometheusBackend`, `StatsDBackend`, `LoggingBackend`)
|
|
25
|
+
- `StructuredJsonFormatter` / `StructuredLoggingMiddleware` — JSON structured logging with request context
|
|
26
|
+
- `cache_response` / `CacheManager` — response caching with configurable key strategies
|
|
27
|
+
- `SecurityHeadersMiddleware` / `@with_headers` — HSTS, CSP, CORP, COOP, and more
|
|
28
|
+
- `audit_log` / `AuditRouter` / `emit` — structured audit trail with sync and async support
|
|
29
|
+
- `idempotent` / `IdempotencyMiddleware` — idempotency key support for POST/PATCH
|
|
30
|
+
- `VersionedRouter` / `versioned_api` / `@deprecated` — API versioning utilities
|
|
31
|
+
- `harden_docs` / `DocGuard` — docs access control with IP allowlist and staff-only mode
|
|
32
|
+
- `health_router` / `register_check` — Kubernetes-ready liveness and readiness probes
|
|
33
|
+
- `verify_webhook` / `stripe_webhook` / `github_webhook` / `slack_webhook` — HMAC webhook verification
|
|
34
|
+
- `async_inject_context` / `async_paginate` / `async_rate_limit` — full async view support
|
|
35
|
+
- `LifecycleMiddleware` — single middleware integrating all lifecycle events
|
|
36
|
+
- `TracingMiddleware` / `AsyncTracingMiddleware` — UUID trace ID on every request
|
|
37
|
+
- `JWTAuth` / `create_jwt_token` — production-ready JWT bearer auth
|
|
38
|
+
- `ninja-boost` CLI — `startproject`, `startapp`, `config` scaffolding commands
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- `async_support.ensure_sync`: used `loop.run_until_complete()` inside a running event loop — replaced with `ThreadPoolExecutor` to avoid `RuntimeError`
|
|
43
|
+
- `audit_log`: `skip_reads` parameter was accepted but silently ignored — now correctly skips GET audit records
|
|
44
|
+
- `security_headers.with_headers`: per-view overrides stored on request but never read by middleware — `_apply_extra_headers()` now wires them through
|
|
45
|
+
- `router`: global rate limit was applied after `inject_context` — reordered so `paginate → inject_context → rate_limit → view`
|
|
46
|
+
- `caching`: `cache_response` stored raw Django QuerySets (not picklable) — QuerySets are now materialised to lists before `cache.set()`
|
|
47
|
+
- `health`: `readiness()` returned `JsonResponse` object that AutoAPI's envelope tried to re-wrap — returns plain `HttpResponse` now
|
|
48
|
+
- `docs`: `_patch_docs_views` fetched unbound method from `type(api)` — replaced with bound method from instance
|
|
49
|
+
- `webhook`: `stripe_webhook` used `dict()` to parse `Stripe-Signature` header — duplicate `v1=` keys silently dropped during key rotation; fixed with manual parsing
|
|
50
|
+
- `integrations`: `create_jwt_token` used deprecated `datetime.utcnow()` — replaced with `datetime.now(timezone.utc)`
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## [0.1.0] — 2026-01-15
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
58
|
+
- Initial release: `AutoAPI`, `AutoRouter`, `inject_context`, `auto_paginate`, `rate_limit`, `TracingMiddleware`, `register_exception_handlers`, `wrap_response`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 BENJAMIN SYLVESTER
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|