ninja-devx 0.0.1__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.
- ninja_devx-0.0.1/.dockerignore +16 -0
- ninja_devx-0.0.1/.gitignore +90 -0
- ninja_devx-0.0.1/CHANGELOG.md +195 -0
- ninja_devx-0.0.1/CODE_OF_CONDUCT.md +49 -0
- ninja_devx-0.0.1/CONTRIBUTING.md +77 -0
- ninja_devx-0.0.1/LICENSE +202 -0
- ninja_devx-0.0.1/NOTICE +4 -0
- ninja_devx-0.0.1/PKG-INFO +171 -0
- ninja_devx-0.0.1/README.md +113 -0
- ninja_devx-0.0.1/SECURITY.md +73 -0
- ninja_devx-0.0.1/benchmarks/__init__.py +0 -0
- ninja_devx-0.0.1/benchmarks/asgi.py +6 -0
- ninja_devx-0.0.1/benchmarks/budget.json +6 -0
- ninja_devx-0.0.1/benchmarks/data_paths.py +163 -0
- ninja_devx-0.0.1/benchmarks/load.py +180 -0
- ninja_devx-0.0.1/benchmarks/overhead.py +169 -0
- ninja_devx-0.0.1/benchmarks/settings.py +34 -0
- ninja_devx-0.0.1/benchmarks/urls.py +85 -0
- ninja_devx-0.0.1/benchmarks/wsgi.py +6 -0
- ninja_devx-0.0.1/compose.yaml +53 -0
- ninja_devx-0.0.1/docker/Dockerfile +18 -0
- ninja_devx-0.0.1/docker/minio.Dockerfile +10 -0
- ninja_devx-0.0.1/docs/getting-started/examples.md +41 -0
- ninja_devx-0.0.1/docs/getting-started/installation.md +52 -0
- ninja_devx-0.0.1/docs/getting-started/quickstart.md +76 -0
- ninja_devx-0.0.1/docs/getting-started/tutorial.md +168 -0
- ninja_devx-0.0.1/docs/guide/api-keys.md +128 -0
- ninja_devx-0.0.1/docs/guide/async.md +147 -0
- ninja_devx-0.0.1/docs/guide/audit.md +128 -0
- ninja_devx-0.0.1/docs/guide/checks.md +65 -0
- ninja_devx-0.0.1/docs/guide/codegen.md +146 -0
- ninja_devx-0.0.1/docs/guide/conditional.md +64 -0
- ninja_devx-0.0.1/docs/guide/controllers.md +159 -0
- ninja_devx-0.0.1/docs/guide/crud.md +317 -0
- ninja_devx-0.0.1/docs/guide/dependency-injection.md +106 -0
- ninja_devx-0.0.1/docs/guide/errors.md +96 -0
- ninja_devx-0.0.1/docs/guide/hooks.md +125 -0
- ninja_devx-0.0.1/docs/guide/i18n.md +46 -0
- ninja_devx-0.0.1/docs/guide/index.md +32 -0
- ninja_devx-0.0.1/docs/guide/layers.md +328 -0
- ninja_devx-0.0.1/docs/guide/middleware.md +148 -0
- ninja_devx-0.0.1/docs/guide/mounting.md +24 -0
- ninja_devx-0.0.1/docs/guide/object-permissions.md +171 -0
- ninja_devx-0.0.1/docs/guide/permissions.md +72 -0
- ninja_devx-0.0.1/docs/guide/recipes.md +76 -0
- ninja_devx-0.0.1/docs/guide/settings.md +60 -0
- ninja_devx-0.0.1/docs/guide/tenancy.md +78 -0
- ninja_devx-0.0.1/docs/guide/testing.md +148 -0
- ninja_devx-0.0.1/docs/guide/throttling.md +58 -0
- ninja_devx-0.0.1/docs/guide/typing.md +13 -0
- ninja_devx-0.0.1/docs/guide/uploads.md +144 -0
- ninja_devx-0.0.1/docs/guide/visibility.md +78 -0
- ninja_devx-0.0.1/docs/guide/webhooks.md +244 -0
- ninja_devx-0.0.1/docs/index.md +122 -0
- ninja_devx-0.0.1/docs/javascripts/tables.js +26 -0
- ninja_devx-0.0.1/docs/migration/drf.md +209 -0
- ninja_devx-0.0.1/docs/migration/ninja-extra.md +193 -0
- ninja_devx-0.0.1/docs/migration/ninja.md +180 -0
- ninja_devx-0.0.1/docs/migration/review-integration.md +106 -0
- ninja_devx-0.0.1/docs/options/commands.md +109 -0
- ninja_devx-0.0.1/docs/options/contrib.md +392 -0
- ninja_devx-0.0.1/docs/options/controllers.md +199 -0
- ninja_devx-0.0.1/docs/options/crud.md +192 -0
- ninja_devx-0.0.1/docs/options/dependency-injection.md +202 -0
- ninja_devx-0.0.1/docs/options/errors.md +61 -0
- ninja_devx-0.0.1/docs/options/http.md +57 -0
- ninja_devx-0.0.1/docs/options/index.md +26 -0
- ninja_devx-0.0.1/docs/options/middleware.md +124 -0
- ninja_devx-0.0.1/docs/options/permissions.md +160 -0
- ninja_devx-0.0.1/docs/options/settings.md +32 -0
- ninja_devx-0.0.1/docs/options/testing.md +118 -0
- ninja_devx-0.0.1/docs/project/changelog.md +1 -0
- ninja_devx-0.0.1/docs/project/code-of-conduct.md +1 -0
- ninja_devx-0.0.1/docs/project/comparison.md +106 -0
- ninja_devx-0.0.1/docs/project/contributing.md +1 -0
- ninja_devx-0.0.1/docs/project/performance.md +96 -0
- ninja_devx-0.0.1/docs/project/releasing.md +136 -0
- ninja_devx-0.0.1/docs/project/scope.md +130 -0
- ninja_devx-0.0.1/docs/project/security.md +1 -0
- ninja_devx-0.0.1/docs/project/support.md +77 -0
- ninja_devx-0.0.1/docs/reference.md +87 -0
- ninja_devx-0.0.1/docs/stylesheets/accessibility.css +54 -0
- ninja_devx-0.0.1/examples/async_api/README.md +65 -0
- ninja_devx-0.0.1/examples/async_api/config/__init__.py +0 -0
- ninja_devx-0.0.1/examples/async_api/config/asgi.py +6 -0
- ninja_devx-0.0.1/examples/async_api/config/settings.py +56 -0
- ninja_devx-0.0.1/examples/async_api/config/urls.py +20 -0
- ninja_devx-0.0.1/examples/async_api/manage.py +9 -0
- ninja_devx-0.0.1/examples/async_api/mypy.ini +9 -0
- ninja_devx-0.0.1/examples/async_api/orders/__init__.py +0 -0
- ninja_devx-0.0.1/examples/async_api/orders/api.py +99 -0
- ninja_devx-0.0.1/examples/async_api/orders/apps.py +5 -0
- ninja_devx-0.0.1/examples/async_api/orders/migrations/0001_initial.py +66 -0
- ninja_devx-0.0.1/examples/async_api/orders/migrations/__init__.py +0 -0
- ninja_devx-0.0.1/examples/async_api/orders/models.py +29 -0
- ninja_devx-0.0.1/examples/async_api/orders/payments.py +45 -0
- ninja_devx-0.0.1/examples/async_api/orders/tests/__init__.py +0 -0
- ninja_devx-0.0.1/examples/async_api/orders/tests/test_orders.py +103 -0
- ninja_devx-0.0.1/examples/async_api/orders/tests/test_session_login.py +32 -0
- ninja_devx-0.0.1/examples/async_api/pytest.ini +6 -0
- ninja_devx-0.0.1/examples/async_api/ruff.toml +9 -0
- ninja_devx-0.0.1/examples/async_api/templates/registration/login.html +16 -0
- ninja_devx-0.0.1/examples/blog/README.md +60 -0
- ninja_devx-0.0.1/examples/blog/blog/__init__.py +0 -0
- ninja_devx-0.0.1/examples/blog/blog/api/__init__.py +0 -0
- ninja_devx-0.0.1/examples/blog/blog/api/comments.py +26 -0
- ninja_devx-0.0.1/examples/blog/blog/api/posts.py +50 -0
- ninja_devx-0.0.1/examples/blog/blog/api/tags.py +16 -0
- ninja_devx-0.0.1/examples/blog/blog/apps.py +5 -0
- ninja_devx-0.0.1/examples/blog/blog/migrations/0001_initial.py +86 -0
- ninja_devx-0.0.1/examples/blog/blog/migrations/__init__.py +0 -0
- ninja_devx-0.0.1/examples/blog/blog/models.py +39 -0
- ninja_devx-0.0.1/examples/blog/blog/tests/__init__.py +0 -0
- ninja_devx-0.0.1/examples/blog/blog/tests/test_api.py +60 -0
- ninja_devx-0.0.1/examples/blog/blog/tests/test_posts_generated.py +21 -0
- ninja_devx-0.0.1/examples/blog/blog/tests/test_session_login.py +32 -0
- ninja_devx-0.0.1/examples/blog/clients/blog.ts +245 -0
- ninja_devx-0.0.1/examples/blog/clients/blog_client.py +907 -0
- ninja_devx-0.0.1/examples/blog/config/__init__.py +0 -0
- ninja_devx-0.0.1/examples/blog/config/settings.py +44 -0
- ninja_devx-0.0.1/examples/blog/config/urls.py +29 -0
- ninja_devx-0.0.1/examples/blog/manage.py +9 -0
- ninja_devx-0.0.1/examples/blog/mypy.ini +9 -0
- ninja_devx-0.0.1/examples/blog/pytest.ini +4 -0
- ninja_devx-0.0.1/examples/blog/ruff.toml +9 -0
- ninja_devx-0.0.1/examples/blog/templates/registration/login.html +16 -0
- ninja_devx-0.0.1/examples/quickstart/README.md +44 -0
- ninja_devx-0.0.1/examples/quickstart/config/__init__.py +0 -0
- ninja_devx-0.0.1/examples/quickstart/config/settings.py +44 -0
- ninja_devx-0.0.1/examples/quickstart/config/urls.py +16 -0
- ninja_devx-0.0.1/examples/quickstart/manage.py +9 -0
- ninja_devx-0.0.1/examples/quickstart/mypy.ini +9 -0
- ninja_devx-0.0.1/examples/quickstart/notes/__init__.py +0 -0
- ninja_devx-0.0.1/examples/quickstart/notes/api.py +43 -0
- ninja_devx-0.0.1/examples/quickstart/notes/apps.py +5 -0
- ninja_devx-0.0.1/examples/quickstart/notes/migrations/0001_initial.py +40 -0
- ninja_devx-0.0.1/examples/quickstart/notes/migrations/__init__.py +0 -0
- ninja_devx-0.0.1/examples/quickstart/notes/models.py +16 -0
- ninja_devx-0.0.1/examples/quickstart/notes/tests/__init__.py +0 -0
- ninja_devx-0.0.1/examples/quickstart/notes/tests/test_api.py +53 -0
- ninja_devx-0.0.1/examples/quickstart/notes/tests/test_session_login.py +32 -0
- ninja_devx-0.0.1/examples/quickstart/pytest.ini +4 -0
- ninja_devx-0.0.1/examples/quickstart/ruff.toml +9 -0
- ninja_devx-0.0.1/examples/quickstart/templates/registration/login.html +16 -0
- ninja_devx-0.0.1/examples/recipes/README.md +61 -0
- ninja_devx-0.0.1/examples/recipes/config/__init__.py +0 -0
- ninja_devx-0.0.1/examples/recipes/config/settings.py +41 -0
- ninja_devx-0.0.1/examples/recipes/config/urls.py +22 -0
- ninja_devx-0.0.1/examples/recipes/cosmic/__init__.py +6 -0
- ninja_devx-0.0.1/examples/recipes/cosmic/api.py +39 -0
- ninja_devx-0.0.1/examples/recipes/cosmic/use_cases.py +63 -0
- ninja_devx-0.0.1/examples/recipes/cosmic/wiring.py +15 -0
- ninja_devx-0.0.1/examples/recipes/hacksoft/__init__.py +5 -0
- ninja_devx-0.0.1/examples/recipes/hacksoft/api.py +39 -0
- ninja_devx-0.0.1/examples/recipes/hacksoft/selectors.py +9 -0
- ninja_devx-0.0.1/examples/recipes/hacksoft/services.py +30 -0
- ninja_devx-0.0.1/examples/recipes/interactors/__init__.py +6 -0
- ninja_devx-0.0.1/examples/recipes/interactors/api.py +31 -0
- ninja_devx-0.0.1/examples/recipes/interactors/gateways.py +44 -0
- ninja_devx-0.0.1/examples/recipes/interactors/interactors.py +46 -0
- ninja_devx-0.0.1/examples/recipes/interactors/wiring.py +23 -0
- ninja_devx-0.0.1/examples/recipes/manage.py +9 -0
- ninja_devx-0.0.1/examples/recipes/mypy.ini +9 -0
- ninja_devx-0.0.1/examples/recipes/pytest.ini +4 -0
- ninja_devx-0.0.1/examples/recipes/ruff.toml +9 -0
- ninja_devx-0.0.1/examples/recipes/shop/__init__.py +0 -0
- ninja_devx-0.0.1/examples/recipes/shop/apps.py +5 -0
- ninja_devx-0.0.1/examples/recipes/shop/errors.py +11 -0
- ninja_devx-0.0.1/examples/recipes/shop/migrations/0001_initial.py +64 -0
- ninja_devx-0.0.1/examples/recipes/shop/migrations/__init__.py +0 -0
- ninja_devx-0.0.1/examples/recipes/shop/models.py +29 -0
- ninja_devx-0.0.1/examples/recipes/shop/schemas.py +15 -0
- ninja_devx-0.0.1/examples/recipes/templates/registration/login.html +16 -0
- ninja_devx-0.0.1/examples/recipes/tests/__init__.py +0 -0
- ninja_devx-0.0.1/examples/recipes/tests/test_contract.py +83 -0
- ninja_devx-0.0.1/examples/recipes/tests/test_cosmic_unit.py +37 -0
- ninja_devx-0.0.1/examples/recipes/tests/test_session_login.py +32 -0
- ninja_devx-0.0.1/examples/saas/README.md +63 -0
- ninja_devx-0.0.1/examples/saas/config/__init__.py +0 -0
- ninja_devx-0.0.1/examples/saas/config/settings.py +27 -0
- ninja_devx-0.0.1/examples/saas/config/urls.py +27 -0
- ninja_devx-0.0.1/examples/saas/manage.py +9 -0
- ninja_devx-0.0.1/examples/saas/mypy.ini +9 -0
- ninja_devx-0.0.1/examples/saas/pytest.ini +4 -0
- ninja_devx-0.0.1/examples/saas/ruff.toml +9 -0
- ninja_devx-0.0.1/examples/saas/tracker/__init__.py +0 -0
- ninja_devx-0.0.1/examples/saas/tracker/api.py +134 -0
- ninja_devx-0.0.1/examples/saas/tracker/apps.py +5 -0
- ninja_devx-0.0.1/examples/saas/tracker/migrations/0001_initial.py +135 -0
- ninja_devx-0.0.1/examples/saas/tracker/migrations/0002_document.py +46 -0
- ninja_devx-0.0.1/examples/saas/tracker/migrations/__init__.py +0 -0
- ninja_devx-0.0.1/examples/saas/tracker/models.py +80 -0
- ninja_devx-0.0.1/examples/saas/tracker/schemas.py +47 -0
- ninja_devx-0.0.1/examples/saas/tracker/tenancy.py +42 -0
- ninja_devx-0.0.1/examples/saas/tracker/tests/__init__.py +0 -0
- ninja_devx-0.0.1/examples/saas/tracker/tests/conftest.py +31 -0
- ninja_devx-0.0.1/examples/saas/tracker/tests/test_contract.py +29 -0
- ninja_devx-0.0.1/examples/saas/tracker/tests/test_tracker.py +215 -0
- ninja_devx-0.0.1/mkdocs.yml +153 -0
- ninja_devx-0.0.1/pyproject.toml +173 -0
- ninja_devx-0.0.1/src/ninja_devx/__init__.py +273 -0
- ninja_devx-0.0.1/src/ninja_devx/_internal/__init__.py +1 -0
- ninja_devx-0.0.1/src/ninja_devx/_internal/cache.py +16 -0
- ninja_devx-0.0.1/src/ninja_devx/_internal/compat.py +19 -0
- ninja_devx-0.0.1/src/ninja_devx/_internal/generics.py +130 -0
- ninja_devx-0.0.1/src/ninja_devx/_internal/i18n.py +14 -0
- ninja_devx-0.0.1/src/ninja_devx/_internal/streaming.py +154 -0
- ninja_devx-0.0.1/src/ninja_devx/_internal/types.py +79 -0
- ninja_devx-0.0.1/src/ninja_devx/_permission_eval.py +63 -0
- ninja_devx-0.0.1/src/ninja_devx/_permission_eval_async.py +60 -0
- ninja_devx-0.0.1/src/ninja_devx/apps.py +21 -0
- ninja_devx-0.0.1/src/ninja_devx/codegen/__init__.py +14 -0
- ninja_devx-0.0.1/src/ninja_devx/codegen/openapi.py +300 -0
- ninja_devx-0.0.1/src/ninja_devx/codegen/python.py +833 -0
- ninja_devx-0.0.1/src/ninja_devx/codegen/source.py +87 -0
- ninja_devx-0.0.1/src/ninja_devx/codegen/typescript.py +367 -0
- ninja_devx-0.0.1/src/ninja_devx/configuration/__init__.py +1 -0
- ninja_devx-0.0.1/src/ninja_devx/configuration/checks.py +143 -0
- ninja_devx-0.0.1/src/ninja_devx/configuration/runtime.py +33 -0
- ninja_devx-0.0.1/src/ninja_devx/configuration/settings.py +222 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/__init__.py +0 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/apikeys/__init__.py +16 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/apikeys/admin.py +51 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/apikeys/api.py +92 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/apikeys/apps.py +8 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/apikeys/auth.py +213 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/apikeys/management/__init__.py +0 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/apikeys/management/commands/__init__.py +0 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/apikeys/management/commands/devx_apikey.py +58 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/apikeys/migrations/0001_initial.py +58 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/apikeys/migrations/__init__.py +0 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/apikeys/models.py +43 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/audit/__init__.py +13 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/audit/admin.py +36 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/audit/api.py +122 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/audit/apps.py +8 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/audit/log.py +230 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/audit/migrations/0001_initial.py +68 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/audit/migrations/__init__.py +0 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/audit/models.py +47 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/audit/privacy.py +65 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/dishka.py +135 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/grants/__init__.py +6 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/grants/admin.py +22 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/grants/apps.py +8 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/grants/backends.py +53 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/grants/migrations/0001_initial.py +82 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/grants/migrations/__init__.py +0 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/grants/models.py +59 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/otel.py +122 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/svcs.py +54 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/uploads/__init__.py +23 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/uploads/api.py +317 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/uploads/backends.py +201 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/uploads/models.py +27 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/__init__.py +19 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/admin.py +146 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/api.py +198 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/apps.py +8 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/maintenance.py +57 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/management/__init__.py +0 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/management/commands/__init__.py +0 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/management/commands/devx_webhooks.py +115 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/migrations/0001_initial.py +126 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/migrations/0002_outboxevent_audience_webhookdelivery_lease_token_and_more.py +27 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/migrations/__init__.py +0 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/models.py +119 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/network.py +173 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/outbox.py +375 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/secrets.py +95 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/signing.py +104 -0
- ninja_devx-0.0.1/src/ninja_devx/contrib/webhooks/tasks.py +35 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/__init__.py +84 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/annotations.py +274 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/async_controllers.py +21 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/auto.py +140 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/bulk.py +198 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/controllers.py +822 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/fields.py +94 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/filters.py +119 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/nested.py +130 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/optimization.py +187 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/pagination.py +252 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/persistence.py +5 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/scoping.py +58 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/shaping.py +136 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/sharing.py +164 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/soft_delete.py +182 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/transfer.py +350 -0
- ninja_devx-0.0.1/src/ninja_devx/crud/writes.py +51 -0
- ninja_devx-0.0.1/src/ninja_devx/dependencies/__init__.py +1 -0
- ninja_devx-0.0.1/src/ninja_devx/dependencies/container.py +302 -0
- ninja_devx-0.0.1/src/ninja_devx/dependencies/contracts.py +67 -0
- ninja_devx-0.0.1/src/ninja_devx/dependencies/engine.py +287 -0
- ninja_devx-0.0.1/src/ninja_devx/dependencies/injection.py +144 -0
- ninja_devx-0.0.1/src/ninja_devx/dependencies/instances.py +206 -0
- ninja_devx-0.0.1/src/ninja_devx/dependencies/introspection.py +51 -0
- ninja_devx-0.0.1/src/ninja_devx/dependencies/scope.py +61 -0
- ninja_devx-0.0.1/src/ninja_devx/dependencies/state.py +82 -0
- ninja_devx-0.0.1/src/ninja_devx/exceptions.py +42 -0
- ninja_devx-0.0.1/src/ninja_devx/http/__init__.py +1 -0
- ninja_devx-0.0.1/src/ninja_devx/http/conditional.py +207 -0
- ninja_devx-0.0.1/src/ninja_devx/http/errors.py +180 -0
- ninja_devx-0.0.1/src/ninja_devx/http/health.py +221 -0
- ninja_devx-0.0.1/src/ninja_devx/http/middleware.py +284 -0
- ninja_devx-0.0.1/src/ninja_devx/http/throttling.py +226 -0
- ninja_devx-0.0.1/src/ninja_devx/idempotency/__init__.py +5 -0
- ninja_devx-0.0.1/src/ninja_devx/idempotency/models.py +29 -0
- ninja_devx-0.0.1/src/ninja_devx/idempotency/policy.py +172 -0
- ninja_devx-0.0.1/src/ninja_devx/idempotency/store.py +114 -0
- ninja_devx-0.0.1/src/ninja_devx/layers/__init__.py +58 -0
- ninja_devx-0.0.1/src/ninja_devx/layers/context.py +39 -0
- ninja_devx-0.0.1/src/ninja_devx/layers/dual.py +98 -0
- ninja_devx-0.0.1/src/ninja_devx/layers/errors.py +113 -0
- ninja_devx-0.0.1/src/ninja_devx/layers/persistence.py +82 -0
- ninja_devx-0.0.1/src/ninja_devx/layers/policies.py +41 -0
- ninja_devx-0.0.1/src/ninja_devx/layers/repository.py +111 -0
- ninja_devx-0.0.1/src/ninja_devx/layers/selectors.py +19 -0
- ninja_devx-0.0.1/src/ninja_devx/layers/services.py +54 -0
- ninja_devx-0.0.1/src/ninja_devx/layers/tasks.py +93 -0
- ninja_devx-0.0.1/src/ninja_devx/layers/testing.py +75 -0
- ninja_devx-0.0.1/src/ninja_devx/management/__init__.py +0 -0
- ninja_devx-0.0.1/src/ninja_devx/management/commands/__init__.py +0 -0
- ninja_devx-0.0.1/src/ninja_devx/management/commands/devx_openapi.py +71 -0
- ninja_devx-0.0.1/src/ninja_devx/management/commands/devx_scaffold.py +124 -0
- ninja_devx-0.0.1/src/ninja_devx/management/commands/devx_startapp.py +33 -0
- ninja_devx-0.0.1/src/ninja_devx/management/commands/devx_uploads.py +31 -0
- ninja_devx-0.0.1/src/ninja_devx/migrations/0001_initial.py +31 -0
- ninja_devx-0.0.1/src/ninja_devx/migrations/0002_uploadrecord.py +37 -0
- ninja_devx-0.0.1/src/ninja_devx/migrations/__init__.py +0 -0
- ninja_devx-0.0.1/src/ninja_devx/models.py +6 -0
- ninja_devx-0.0.1/src/ninja_devx/py.typed +0 -0
- ninja_devx-0.0.1/src/ninja_devx/pytest_plugin.py +3 -0
- ninja_devx-0.0.1/src/ninja_devx/routing/__init__.py +1 -0
- ninja_devx-0.0.1/src/ninja_devx/routing/bindings.py +58 -0
- ninja_devx-0.0.1/src/ninja_devx/routing/compiler.py +510 -0
- ninja_devx-0.0.1/src/ninja_devx/routing/controller.py +436 -0
- ninja_devx-0.0.1/src/ninja_devx/routing/hooks.py +136 -0
- ninja_devx-0.0.1/src/ninja_devx/routing/invocation.py +368 -0
- ninja_devx-0.0.1/src/ninja_devx/routing/mounting.py +82 -0
- ninja_devx-0.0.1/src/ninja_devx/routing/operations.py +203 -0
- ninja_devx-0.0.1/src/ninja_devx/routing/plugins.py +46 -0
- ninja_devx-0.0.1/src/ninja_devx/routing/use_cases.py +128 -0
- ninja_devx-0.0.1/src/ninja_devx/security/__init__.py +1 -0
- ninja_devx-0.0.1/src/ninja_devx/security/auth.py +224 -0
- ninja_devx-0.0.1/src/ninja_devx/security/object_permissions.py +456 -0
- ninja_devx-0.0.1/src/ninja_devx/security/permission_leaf.py +50 -0
- ninja_devx-0.0.1/src/ninja_devx/security/permissions.py +486 -0
- ninja_devx-0.0.1/src/ninja_devx/security/tenancy.py +130 -0
- ninja_devx-0.0.1/src/ninja_devx/serialization/__init__.py +1 -0
- ninja_devx-0.0.1/src/ninja_devx/serialization/pydantic.py +24 -0
- ninja_devx-0.0.1/src/ninja_devx/serialization/renderers.py +64 -0
- ninja_devx-0.0.1/src/ninja_devx/serialization/schemas.py +167 -0
- ninja_devx-0.0.1/src/ninja_devx/serialization/visibility.py +278 -0
- ninja_devx-0.0.1/src/ninja_devx/templates/app_template/__init__.py-tpl +0 -0
- ninja_devx-0.0.1/src/ninja_devx/templates/app_template/api.py-tpl +19 -0
- ninja_devx-0.0.1/src/ninja_devx/templates/app_template/apps.py-tpl +6 -0
- ninja_devx-0.0.1/src/ninja_devx/templates/app_template/migrations/__init__.py-tpl +0 -0
- ninja_devx-0.0.1/src/ninja_devx/templates/app_template/models.py-tpl +4 -0
- ninja_devx-0.0.1/src/ninja_devx/templates/app_template/schemas.py-tpl +6 -0
- ninja_devx-0.0.1/src/ninja_devx/templates/app_template/services.py-tpl +6 -0
- ninja_devx-0.0.1/src/ninja_devx/templates/app_template/tests/__init__.py-tpl +0 -0
- ninja_devx-0.0.1/src/ninja_devx/templates/app_template/tests/test_api.py-tpl +13 -0
- ninja_devx-0.0.1/src/ninja_devx/testing/__init__.py +1 -0
- ninja_devx-0.0.1/src/ninja_devx/testing/clients.py +200 -0
- ninja_devx-0.0.1/src/ninja_devx/testing/contracts.py +58 -0
- ninja_devx-0.0.1/src/ninja_devx/testing/plugin.py +169 -0
- ninja_devx-0.0.1/src/ninja_devx/tooling/__init__.py +1 -0
- ninja_devx-0.0.1/src/ninja_devx/tooling/drift.py +252 -0
- ninja_devx-0.0.1/src/ninja_devx/tooling/scaffold.py +419 -0
- ninja_devx-0.0.1/src/ninja_devx/tooling/unasync.py +183 -0
- ninja_devx-0.0.1/src/ninja_devx/unasync.py +6 -0
- ninja_devx-0.0.1/tests/__init__.py +0 -0
- ninja_devx-0.0.1/tests/__snapshots__/test_snapshot/openapi.json +2093 -0
- ninja_devx-0.0.1/tests/conftest.py +29 -0
- ninja_devx-0.0.1/tests/custom_userapp/__init__.py +1 -0
- ninja_devx-0.0.1/tests/custom_userapp/contract.py +66 -0
- ninja_devx-0.0.1/tests/custom_userapp/migrations/0001_initial.py +113 -0
- ninja_devx-0.0.1/tests/custom_userapp/migrations/__init__.py +0 -0
- ninja_devx-0.0.1/tests/custom_userapp/models.py +8 -0
- ninja_devx-0.0.1/tests/custom_userapp/settings.py +9 -0
- ninja_devx-0.0.1/tests/custom_userapp/urls.py +1 -0
- ninja_devx-0.0.1/tests/future_annotations_app.py +27 -0
- ninja_devx-0.0.1/tests/settings.py +65 -0
- ninja_devx-0.0.1/tests/test_admin.py +106 -0
- ninja_devx-0.0.1/tests/test_apikeys.py +189 -0
- ninja_devx-0.0.1/tests/test_async_crud.py +115 -0
- ninja_devx-0.0.1/tests/test_async_streaming.py +66 -0
- ninja_devx-0.0.1/tests/test_audit.py +192 -0
- ninja_devx-0.0.1/tests/test_auto_crud.py +90 -0
- ninja_devx-0.0.1/tests/test_builtin_http_contract.py +40 -0
- ninja_devx-0.0.1/tests/test_checks.py +111 -0
- ninja_devx-0.0.1/tests/test_codegen.py +217 -0
- ninja_devx-0.0.1/tests/test_codegen_http_contract.py +347 -0
- ninja_devx-0.0.1/tests/test_codegen_source_safety.py +192 -0
- ninja_devx-0.0.1/tests/test_codegen_transfer.py +193 -0
- ninja_devx-0.0.1/tests/test_conditional.py +194 -0
- ninja_devx-0.0.1/tests/test_configurable.py +186 -0
- ninja_devx-0.0.1/tests/test_container.py +426 -0
- ninja_devx-0.0.1/tests/test_contract.py +23 -0
- ninja_devx-0.0.1/tests/test_contrib.py +200 -0
- ninja_devx-0.0.1/tests/test_controller.py +405 -0
- ninja_devx-0.0.1/tests/test_crud.py +343 -0
- ninja_devx-0.0.1/tests/test_crud_features.py +472 -0
- ninja_devx-0.0.1/tests/test_crud_v1.py +240 -0
- ninja_devx-0.0.1/tests/test_custom_user.py +25 -0
- ninja_devx-0.0.1/tests/test_docs.py +59 -0
- ninja_devx-0.0.1/tests/test_drift.py +95 -0
- ninja_devx-0.0.1/tests/test_errors.py +190 -0
- ninja_devx-0.0.1/tests/test_exports.py +32 -0
- ninja_devx-0.0.1/tests/test_generated_docs.py +31 -0
- ninja_devx-0.0.1/tests/test_health_otel_renderers.py +194 -0
- ninja_devx-0.0.1/tests/test_hooks.py +245 -0
- ninja_devx-0.0.1/tests/test_i18n.py +45 -0
- ninja_devx-0.0.1/tests/test_idempotency.py +260 -0
- ninja_devx-0.0.1/tests/test_inject_and_async.py +300 -0
- ninja_devx-0.0.1/tests/test_instance.py +104 -0
- ninja_devx-0.0.1/tests/test_layers.py +227 -0
- ninja_devx-0.0.1/tests/test_middleware.py +169 -0
- ninja_devx-0.0.1/tests/test_mounting.py +76 -0
- ninja_devx-0.0.1/tests/test_multidb.py +150 -0
- ninja_devx-0.0.1/tests/test_no_any.py +19 -0
- ninja_devx-0.0.1/tests/test_object_permissions.py +203 -0
- ninja_devx-0.0.1/tests/test_openapi.py +82 -0
- ninja_devx-0.0.1/tests/test_operations.py +100 -0
- ninja_devx-0.0.1/tests/test_optimizer.py +99 -0
- ninja_devx-0.0.1/tests/test_pagination.py +160 -0
- ninja_devx-0.0.1/tests/test_permissions.py +244 -0
- ninja_devx-0.0.1/tests/test_postgres_concurrency.py +136 -0
- ninja_devx-0.0.1/tests/test_pytest_plugin.py +89 -0
- ninja_devx-0.0.1/tests/test_redis_concurrency.py +42 -0
- ninja_devx-0.0.1/tests/test_release_tools.py +29 -0
- ninja_devx-0.0.1/tests/test_response_shaping.py +135 -0
- ninja_devx-0.0.1/tests/test_responses.py +57 -0
- ninja_devx-0.0.1/tests/test_review_security.py +261 -0
- ninja_devx-0.0.1/tests/test_runtime_ownership.py +62 -0
- ninja_devx-0.0.1/tests/test_s3_upload_integration.py +100 -0
- ninja_devx-0.0.1/tests/test_scaffold.py +109 -0
- ninja_devx-0.0.1/tests/test_schemas.py +57 -0
- ninja_devx-0.0.1/tests/test_snapshot.py +19 -0
- ninja_devx-0.0.1/tests/test_startapp.py +26 -0
- ninja_devx-0.0.1/tests/test_stream_preflight_asgi.py +161 -0
- ninja_devx-0.0.1/tests/test_tenancy.py +168 -0
- ninja_devx-0.0.1/tests/test_testing.py +102 -0
- ninja_devx-0.0.1/tests/test_throttling.py +95 -0
- ninja_devx-0.0.1/tests/test_transfer.py +181 -0
- ninja_devx-0.0.1/tests/test_unasync.py +58 -0
- ninja_devx-0.0.1/tests/test_upload_lifecycle.py +118 -0
- ninja_devx-0.0.1/tests/test_uploads.py +132 -0
- ninja_devx-0.0.1/tests/test_use_cases.py +128 -0
- ninja_devx-0.0.1/tests/test_visibility.py +93 -0
- ninja_devx-0.0.1/tests/test_webhooks.py +529 -0
- ninja_devx-0.0.1/tests/testapp/__init__.py +0 -0
- ninja_devx-0.0.1/tests/testapp/api.py +91 -0
- ninja_devx-0.0.1/tests/testapp/apps.py +7 -0
- ninja_devx-0.0.1/tests/testapp/migrations/0001_initial.py +178 -0
- ninja_devx-0.0.1/tests/testapp/migrations/__init__.py +0 -0
- ninja_devx-0.0.1/tests/testapp/models.py +70 -0
- ninja_devx-0.0.1/tests/typing/check_public_api.py +345 -0
- ninja_devx-0.0.1/tests/urls.py +11 -0
- ninja_devx-0.0.1/tools/check_docs_links.py +63 -0
- ninja_devx-0.0.1/tools/check_release.py +42 -0
- ninja_devx-0.0.1/tools/generate_docs.py +1061 -0
- ninja_devx-0.0.1/tools/messages.py +165 -0
- ninja_devx-0.0.1/tools/verify_examples.py +47 -0
- ninja_devx-0.0.1/tools/verify_local.py +87 -0
- ninja_devx-0.0.1/tools/verify_package.py +156 -0
- ninja_devx-0.0.1/tools/verify_sdist.py +49 -0
- ninja_devx-0.0.1/uv.lock +3254 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Python bytecode and caches
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
.hypothesis/
|
|
7
|
+
.mypy_cache/
|
|
8
|
+
.dmypy.json
|
|
9
|
+
.pyright/
|
|
10
|
+
.ruff_cache/
|
|
11
|
+
.tox/
|
|
12
|
+
.nox/
|
|
13
|
+
.coverage
|
|
14
|
+
.coverage.*
|
|
15
|
+
coverage.xml
|
|
16
|
+
htmlcov/
|
|
17
|
+
|
|
18
|
+
# Virtual environments and local Python tooling
|
|
19
|
+
.venv/
|
|
20
|
+
venv/
|
|
21
|
+
env/
|
|
22
|
+
ENV/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.pdm-build/
|
|
25
|
+
.python-version.local
|
|
26
|
+
.direnv/
|
|
27
|
+
.envrc
|
|
28
|
+
|
|
29
|
+
# Build and distribution outputs
|
|
30
|
+
/build/
|
|
31
|
+
/dist/
|
|
32
|
+
/wheelhouse/
|
|
33
|
+
*.whl
|
|
34
|
+
*.tar.gz
|
|
35
|
+
*.zip
|
|
36
|
+
|
|
37
|
+
# Documentation and generated reports
|
|
38
|
+
/site/
|
|
39
|
+
/artifacts/
|
|
40
|
+
/reports/
|
|
41
|
+
/release-evidence/
|
|
42
|
+
benchmarks/results*.json
|
|
43
|
+
*.log
|
|
44
|
+
*.out
|
|
45
|
+
*.pid
|
|
46
|
+
|
|
47
|
+
# Local databases and application uploads
|
|
48
|
+
*.sqlite3
|
|
49
|
+
*.sqlite3-journal
|
|
50
|
+
*.sqlite3-shm
|
|
51
|
+
*.sqlite3-wal
|
|
52
|
+
/media/
|
|
53
|
+
/uploads/
|
|
54
|
+
/tmp/
|
|
55
|
+
|
|
56
|
+
# Environment files and local secrets
|
|
57
|
+
.env
|
|
58
|
+
.env.*
|
|
59
|
+
!.env.example
|
|
60
|
+
*.pem
|
|
61
|
+
*.key
|
|
62
|
+
*.p12
|
|
63
|
+
*.secret
|
|
64
|
+
|
|
65
|
+
# JavaScript tooling and logs
|
|
66
|
+
node_modules/
|
|
67
|
+
npm-debug.log*
|
|
68
|
+
yarn-debug.log*
|
|
69
|
+
yarn-error.log*
|
|
70
|
+
pnpm-debug.log*
|
|
71
|
+
.npm/
|
|
72
|
+
.cache/
|
|
73
|
+
|
|
74
|
+
# Docker local overrides and runtime state
|
|
75
|
+
docker-compose.override.yml
|
|
76
|
+
compose.override.yaml
|
|
77
|
+
.docker-volumes/
|
|
78
|
+
|
|
79
|
+
# Editors and operating-system files
|
|
80
|
+
.idea/
|
|
81
|
+
.vscode/*
|
|
82
|
+
!.vscode/extensions.json
|
|
83
|
+
!.vscode/settings.example.json
|
|
84
|
+
*.swp
|
|
85
|
+
*.swo
|
|
86
|
+
*.orig
|
|
87
|
+
*.rej
|
|
88
|
+
*~
|
|
89
|
+
.DS_Store
|
|
90
|
+
Thumbs.db
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. ninja-devx follows
|
|
4
|
+
[semantic versioning](https://semver.org); see the support and stability page for what
|
|
5
|
+
that means before 1.0.
|
|
6
|
+
|
|
7
|
+
## 0.0.1
|
|
8
|
+
|
|
9
|
+
First alpha release candidate. The section below is the reviewed release content;
|
|
10
|
+
publication occurs only when the matching tag passes the release workflow.
|
|
11
|
+
|
|
12
|
+
### Compatibility and operational requirements
|
|
13
|
+
|
|
14
|
+
- Python 3.11+, Django 4.2+ and django-ninja 1.7.x (`<2`); supported interpreter/framework
|
|
15
|
+
combinations are listed in the support policy.
|
|
16
|
+
- Core migrations are required for durable idempotency and upload lifecycle records.
|
|
17
|
+
Contrib apps have their own migrations and optional dependencies.
|
|
18
|
+
- Owner/tenant/parent scope and persisted object permissions apply to built-in writes.
|
|
19
|
+
Audit history is paginated and staff-protected by default.
|
|
20
|
+
- Idempotency requires independent durable claims; webhook delivery is at-least-once;
|
|
21
|
+
upload checksum/version enforcement is configurable.
|
|
22
|
+
- Generated clients support JSON, simple multipart and declared text/binary responses.
|
|
23
|
+
Cookie parameters, SSE and complex encodings fail generation explicitly.
|
|
24
|
+
- Internal modules were reorganized before release. See the
|
|
25
|
+
[migration notes](https://ctolon.github.io/ninja-devx/migration/review-integration/).
|
|
26
|
+
|
|
27
|
+
### Foundations
|
|
28
|
+
|
|
29
|
+
- Class-based controllers compiled into native `ninja.Router`s: `@get/@post/...` with
|
|
30
|
+
typed options, request and singleton scopes, lifecycle methods, static-first routing,
|
|
31
|
+
`mount()` with versioned prefixes.
|
|
32
|
+
- Composable permissions (`&`, `|`, `~`, `Also`), object-level and async checks,
|
|
33
|
+
`DjangoModelPermissions`, `IsOwner`, typed users (`AuthedRequest[User]`,
|
|
34
|
+
`current_user`).
|
|
35
|
+
- Generic CRUD (`CRUDController[Model, Out, In]` and mixins): `owner_field`,
|
|
36
|
+
`Instance[Model]`, generated filters and ordering, nested `Parent`, soft delete, bulk
|
|
37
|
+
operations, `Patch[In]`, `idempotent()`, `atomic=True`.
|
|
38
|
+
- A small typed DI container plus dishka and svcs adapters.
|
|
39
|
+
- Operation hooks, `LoggingHook`, OpenTelemetry.
|
|
40
|
+
- pytest plugin with OpenAPI snapshots, `devx_scaffold` and `devx_openapi` (typed
|
|
41
|
+
TypeScript and Python clients).
|
|
42
|
+
- mypy strict and pyright strict, with no `typing.Any` in the package.
|
|
43
|
+
|
|
44
|
+
### APIs and integrations
|
|
45
|
+
|
|
46
|
+
**Errors and layers**
|
|
47
|
+
|
|
48
|
+
- `ErrorMap`: typed exception → response rules on operations, controllers, settings
|
|
49
|
+
(`NINJA_DEVX["ERRORS"]`) and APIs (`install(api)`, using Ninja's exception handlers).
|
|
50
|
+
- Django `ValidationError`, `ObjectDoesNotExist` and `PermissionDenied` map to 422, 404
|
|
51
|
+
and 403 by default.
|
|
52
|
+
- `raises=` documents errors in OpenAPI and is checked against the rules.
|
|
53
|
+
- `ERROR_FORMAT = "problem+json"` (RFC 9457).
|
|
54
|
+
- `ninja_devx.layers`, HTTP-free: `DomainError` (`NotFound`, `Conflict`,
|
|
55
|
+
`PermissionDenied`, `ValidationFailed`), `Repository`/`AsyncRepository` protocols,
|
|
56
|
+
`ModelRepository`, `ModelService`, `dual` (one method for sync and `.a` async callers),
|
|
57
|
+
`RequestContext`, `TaskQueue` (`OnCommitTaskQueue`, `ImmediateTaskQueue`,
|
|
58
|
+
`RecordingTaskQueue`), `after_commit`, `Policy`/`require`, `Selector`.
|
|
59
|
+
- `layers.testing`: `InMemoryRepository`, `make_context`.
|
|
60
|
+
- CRUD `service_class` and `selector_class`, resolved from the container.
|
|
61
|
+
- `use_case(decorator, Handler, command=...)` operations.
|
|
62
|
+
- Architecture recipes (HackSoft, Cosmic-lite, dishka interactors) with shared contract
|
|
63
|
+
tests.
|
|
64
|
+
|
|
65
|
+
**Dependency injection**
|
|
66
|
+
|
|
67
|
+
- Operation-level injection: `Inject[T]` and `Annotated[T, Resolve(fn)]`, validated at
|
|
68
|
+
startup.
|
|
69
|
+
- Container: async and async-generator factories, `aresolve`, `container.scope(values)`
|
|
70
|
+
for tasks and commands, `close`/`aclose`, captive dependency checks, and
|
|
71
|
+
`check(key, asynchronous=...)`.
|
|
72
|
+
- `request_context(User, tenant=...)` / `arequest_context`, `aauthenticated_user`,
|
|
73
|
+
`acurrent_user`, `arequest_user`.
|
|
74
|
+
- dishka: `DishkaResolver(container, async_container=...)` for both modes,
|
|
75
|
+
`provide_controllers`, startup validation.
|
|
76
|
+
|
|
77
|
+
**Async and sync**
|
|
78
|
+
|
|
79
|
+
- `mode = "sync" | "async" | "auto"` (`NINJA_DEVX["ASYNC_MODE"]`) and `async_variant` for
|
|
80
|
+
reusable bases. The CRUD mixins implement both modes from one class.
|
|
81
|
+
- `run_sync`/`run_atomic`: one thread hop per unit of work. Async CRUD writes take a
|
|
82
|
+
single hop.
|
|
83
|
+
- `AsyncOperationHook` (`around_async`), blocking sync hooks (`blocking = True`), async
|
|
84
|
+
lifecycle methods, async permission checks everywhere.
|
|
85
|
+
- Hooks and DI scopes wrap whole streams; permissions are checked before the first item
|
|
86
|
+
of async streams.
|
|
87
|
+
- Teaching errors: `AsyncLazyAccessError`, `BlockingCallWarning` (`WARN_BLOCKING_MS`),
|
|
88
|
+
`MixedPathWarning`, `ASYNC_FETCH_MODE = "raise"` (Django 6.1 `FETCH_RAISE`), and the
|
|
89
|
+
pytest `AsyncDatabaseTestWarning`.
|
|
90
|
+
- `python -m ninja_devx.tooling.unasync` generates sync twins of async code (`--check` for CI).
|
|
91
|
+
|
|
92
|
+
**Permissions and operations**
|
|
93
|
+
|
|
94
|
+
- `Also(...)` adds operation permissions to the controller's.
|
|
95
|
+
- `IsReadOnly`, `as_permission(policy, User)`.
|
|
96
|
+
- `owner_field` follows relations (`"project__owner"`).
|
|
97
|
+
- `Locked[Model]` (`select_for_update`).
|
|
98
|
+
- Typed operation metadata: `meta=(...)` and `operation.meta(Kind)`.
|
|
99
|
+
- `atomic="durable"` and `database=`.
|
|
100
|
+
- `ControllerPlugin` protocol (`on_operation`, `bindings`, `checks`), via options or
|
|
101
|
+
`NINJA_DEVX["PLUGINS"]`.
|
|
102
|
+
|
|
103
|
+
**Quality and tooling**
|
|
104
|
+
|
|
105
|
+
- Django system checks (`ninja_devx.E001`–`E004`, `W003`), `Controller.checks()`,
|
|
106
|
+
`NINJA_DEVX["CHECK_APIS"]`.
|
|
107
|
+
- `manage.py devx_scaffold --check` reports model/schema drift.
|
|
108
|
+
- Query optimizer v2: `Prefetch` querysets join foreign keys inside prefetched relations;
|
|
109
|
+
`optimize_queries = "only"`; `query_plan()`.
|
|
110
|
+
- Testing: `assert_max_hops`, `capture_commits` / `captured_commits` fixture.
|
|
111
|
+
- Benchmarks v2: interleaved in-process overhead with thread-hop counts and an optional
|
|
112
|
+
budget check (`benchmarks/budget.json`), plus WSGI/ASGI load tests with p50/p99
|
|
113
|
+
(`benchmarks/load.py`).
|
|
114
|
+
- Docs: errors, layers, async and sync, system checks, recipes, support policy; every
|
|
115
|
+
code block in the docs is compiled by the test suite.
|
|
116
|
+
|
|
117
|
+
### SaaS, HTTP and schemas
|
|
118
|
+
|
|
119
|
+
- Multi-tenancy: `tenant_field`, tenant resolvers (sync or async, settings, `RequestContext`,
|
|
120
|
+
`request.tenant`), `Parent(..., tenant_field=...)`, `current_tenant(request)`.
|
|
121
|
+
- Conditional requests: `etag = ETag()` (304 on reads, `If-Match` → 412/428 on writes),
|
|
122
|
+
`conditional()` for any GET.
|
|
123
|
+
- `CursorPagination` following the request's ordering; `pagination_options`.
|
|
124
|
+
- Throttles: `UserRateThrottle`, `AnonRateThrottle`, `ClientRateThrottle`,
|
|
125
|
+
`ScopedRateThrottle` (`THROTTLE_RATES`), `TenantRateThrottle`; thread-safe and atomic.
|
|
126
|
+
- Role-based field visibility: `VisibleTo(...)` and the `FieldVisibility` mixin.
|
|
127
|
+
- Contract tests: `ninja_contract` fixture on schemathesis (`[contract]` extra).
|
|
128
|
+
- Nothing hard-coded: `routes` (rename, reconfigure or disable operations), `lookup_param`,
|
|
129
|
+
`ordering_param`, `SoftDelete(field, deleted=, active=, deleted_at=, deleted_by=)`.
|
|
130
|
+
- Invalid lookup values reach Ninja and return JSON 422 (path converters are opt-in with
|
|
131
|
+
`lookup_converter`).
|
|
132
|
+
- Schema generation: `devx_scaffold` writes model constraints (`max_length`, `min_length`,
|
|
133
|
+
patterns, ranges, decimals, `help_text`); `devx_openapi --format python` generates
|
|
134
|
+
validated pydantic models (default) or TypedDicts; drift checks flag `max_length`
|
|
135
|
+
mismatches; system check `W005`.
|
|
136
|
+
|
|
137
|
+
### Security and optional integrations
|
|
138
|
+
|
|
139
|
+
- Object permissions: `ObjectPermissions()` on any model controller (DRF
|
|
140
|
+
`DjangoObjectPermissions` semantics: 404 without `view`, 403 without the method's
|
|
141
|
+
permission, lists filtered in SQL), backends for the new `ninja_devx.contrib.grants`
|
|
142
|
+
app, django-guardian (`[guardian]`) and `user.has_perm`; `assign_perm`, `remove_perm`,
|
|
143
|
+
`get_perms`, `get_objects_for_user`, `grants_for`; `ObjectSharingMixin` endpoints;
|
|
144
|
+
`OBJECT_PERMISSION_BACKEND` setting.
|
|
145
|
+
- Response shaping: `sparse_fields` (`?fields=`) and `Expandable()` relations
|
|
146
|
+
(`?expand=`), with the query planner joining only what is expanded.
|
|
147
|
+
- `AutoCRUDController[Model]` and `AutoReadOnlyController[Model]`: schemas generated with
|
|
148
|
+
Ninja's `create_schema` (`schema_fields`, `read_only_fields`, `write_only_fields`).
|
|
149
|
+
- `LimitOffsetPagination`: links that keep query parameters, `count=False`, `max_offset`,
|
|
150
|
+
stable ordering.
|
|
151
|
+
- `ExportMixin` / `ImportMixin`: streamed CSV and JSON Lines export honoring filters and
|
|
152
|
+
visibility; all-or-nothing imports with row-level 422 errors and `dry_run`.
|
|
153
|
+
- Middleware for APIs, routers, mounts and controllers (`use_middleware`,
|
|
154
|
+
`ControllerOptions(middleware=...)`) on Ninja's `add_decorator`: `RequestIDMiddleware`,
|
|
155
|
+
`ServerTimingMiddleware`, `DeprecationMiddleware` (RFC 9745 / RFC 8594),
|
|
156
|
+
`RateLimitHeadersMiddleware` (added automatically with ninja-devx throttles).
|
|
157
|
+
- `HealthController` (`/live`, `/ready`) with database, cache and migration checks.
|
|
158
|
+
- `ORJSONRenderer` and `MsgspecRenderer`; `OpenTelemetryMetricsMiddleware`.
|
|
159
|
+
- `contrib.apikeys`: hashed, scoped, expiring API keys (`APIKeyAuth`, `APIKeyBearer`,
|
|
160
|
+
`HasScopes`, `RequiresScope`), a self-service controller and `devx_apikey`.
|
|
161
|
+
- `contrib.audit`: `AuditMixin` records creates, updates (field diffs) and deletes in the
|
|
162
|
+
same transaction, with redaction and request ids; `record()`, `AuditLogController`,
|
|
163
|
+
`AuditHistoryMixin`.
|
|
164
|
+
- `contrib.webhooks`: transactional outbox (`publish`), Standard Webhooks signatures,
|
|
165
|
+
retries with backoff, endpoint disabling, `SKIP LOCKED` workers (`devx_webhooks
|
|
166
|
+
deliver`), `WebhookEndpointController`, `verify_signature` for receivers.
|
|
167
|
+
- `contrib.uploads`: presigned direct uploads (`S3Signer` with `[s3]`, `FakeSigner`),
|
|
168
|
+
upload policies and ownership checks.
|
|
169
|
+
- Webhooks hardening: SSRF protection (`URLPolicy`, `check_url`, `SafeHTTPTransport` checks
|
|
170
|
+
the connected address, so DNS rebinding is covered too), optional encryption of signing
|
|
171
|
+
secrets (`WEBHOOK_SECRET_KEYS`, `[crypto]`, `devx_webhooks generate-key` /
|
|
172
|
+
`encrypt-secrets`), and delivery right after commit through task queues
|
|
173
|
+
(`publish(queue=...)`, `deliver_event`, `django.tasks` task).
|
|
174
|
+
- API keys: per-key `rate_limit` and `APIKeyRateThrottle`.
|
|
175
|
+
- `sparse_fields` operations document `<Out>Partial` responses (no required properties), so
|
|
176
|
+
validating generated clients accept `?fields=` responses.
|
|
177
|
+
- Django admin for `ObjectGrant`, `APIKey` (revoke action), `AuditEntry` (read-only) and
|
|
178
|
+
webhooks (secret shown once, rotate, retry, enable).
|
|
179
|
+
- Translations: client-facing messages use `gettext` (`default_message` on domain errors,
|
|
180
|
+
`gettext_noop` permission messages), and `tools/messages.py` to extract and compile
|
|
181
|
+
catalogs without GNU gettext. English defaults ship; add catalogs for other languages.
|
|
182
|
+
- `ObjectSharingMixin.validate_holder()` restricts who objects may be shared with.
|
|
183
|
+
- `devx_startapp`: Django's `startapp` with a ninja-devx template.
|
|
184
|
+
- "Did you mean" suggestions for misspelled fields, routes and settings.
|
|
185
|
+
- Project: `SECURITY.md`, `CONTRIBUTING.md`, versioned documentation with mike, a
|
|
186
|
+
PostgreSQL test job and SQLite/PostgreSQL load tests in CI.
|
|
187
|
+
|
|
188
|
+
### Known limitations
|
|
189
|
+
|
|
190
|
+
- A permission denial on an async streaming operation closes the stream empty (with a
|
|
191
|
+
logged warning) instead of returning 403: Ninja starts the response before the stream
|
|
192
|
+
runs.
|
|
193
|
+
- `Container.instance` and `Container.override` validate values at registration rather
|
|
194
|
+
than in type checkers, because mypy cannot infer the type from abstract or protocol
|
|
195
|
+
keys.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
This policy applies to issues, pull requests, discussions, reviews and other project
|
|
4
|
+
spaces, and to conduct when representing ninja-devx publicly.
|
|
5
|
+
|
|
6
|
+
## Expected conduct
|
|
7
|
+
|
|
8
|
+
Treat people with respect. Discuss code, evidence and tradeoffs without attacking the
|
|
9
|
+
person proposing them. Make criticism specific enough to act on. Respect differing
|
|
10
|
+
experience, backgrounds and communication styles. Accept that maintainers may decline a
|
|
11
|
+
proposal because of scope, maintenance cost or compatibility.
|
|
12
|
+
|
|
13
|
+
## Unacceptable conduct
|
|
14
|
+
|
|
15
|
+
Harassment, threats, discriminatory language, sexualized attention, deliberate humiliation,
|
|
16
|
+
impersonation, sustained disruption and publication of another person's private information
|
|
17
|
+
without consent are not permitted. Repeated unwanted contact and retaliation against a
|
|
18
|
+
reporter are also violations. Technical disagreement does not excuse these behaviors.
|
|
19
|
+
|
|
20
|
+
## Private reporting
|
|
21
|
+
|
|
22
|
+
Send conduct reports to **[cevatbatuhan.tolon@gmail.com](mailto:cevatbatuhan.tolon@gmail.com)**.
|
|
23
|
+
Include links or dates, a factual description and any immediate safety concern. Do not put
|
|
24
|
+
personal details in a public issue. Share only information needed to assess the incident.
|
|
25
|
+
|
|
26
|
+
Reports are handled by the project maintainer. Information is shared only as needed to
|
|
27
|
+
investigate and respond; absolute confidentiality cannot be guaranteed where platform
|
|
28
|
+
moderation or immediate safety requires disclosure. There is no guaranteed response-time
|
|
29
|
+
service. For urgent threats, use the platform's abuse reporting or appropriate local
|
|
30
|
+
emergency services.
|
|
31
|
+
|
|
32
|
+
If the complaint concerns the maintainer, use
|
|
33
|
+
[GitHub's reporting process](https://docs.github.com/en/site-policy/content-removal-policies/github-community-guidelines#reporting-abuse)
|
|
34
|
+
for conduct on GitHub. This project currently has no independent conduct committee.
|
|
35
|
+
|
|
36
|
+
Report software vulnerabilities through [SECURITY.md](https://github.com/ctolon/ninja-devx/blob/main/SECURITY.md), not through public
|
|
37
|
+
conduct discussions.
|
|
38
|
+
|
|
39
|
+
## Enforcement
|
|
40
|
+
|
|
41
|
+
Maintainers may remove or edit content, limit a discussion, issue a warning, temporarily
|
|
42
|
+
restrict participation or permanently exclude a participant. The response depends on
|
|
43
|
+
severity, impact, repetition and immediate risk. A serious threat or disclosure of private
|
|
44
|
+
information may warrant immediate exclusion without a prior warning.
|
|
45
|
+
|
|
46
|
+
Where doing so does not expose the reporter or create further harm, the affected person
|
|
47
|
+
will receive the reason and duration of an action. They may send relevant additional facts
|
|
48
|
+
to the same private address. Retaliation or attempts to evade a restriction may lead to
|
|
49
|
+
further action. Maintainers are subject to this policy as participants.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Changes should solve a concrete application or maintenance problem. For a substantial API
|
|
4
|
+
change, describe the use case, proposed interface, alternatives and compatibility cost in
|
|
5
|
+
an issue before building it. Security reports belong in [SECURITY.md](https://github.com/ctolon/ninja-devx/blob/main/SECURITY.md); project
|
|
6
|
+
participation follows the [Code of Conduct](https://github.com/ctolon/ninja-devx/blob/main/CODE_OF_CONDUCT.md).
|
|
7
|
+
|
|
8
|
+
## Development
|
|
9
|
+
|
|
10
|
+
Use Python 3.11 or later and [uv](https://docs.astral.sh/uv/). The default validation
|
|
11
|
+
interpreter is Python 3.13; supported combinations are listed in the support documentation.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
uv sync --locked --group docs --group verification
|
|
15
|
+
uv run --no-sync pytest -q
|
|
16
|
+
uv run --no-sync ruff check .
|
|
17
|
+
uv run --no-sync ruff format --check .
|
|
18
|
+
uv run --no-sync mypy
|
|
19
|
+
uv run --no-sync pyright --pythonpath .venv/bin/python
|
|
20
|
+
uv run --no-sync python tools/messages.py --check
|
|
21
|
+
uv run --no-sync python tools/generate_docs.py --check
|
|
22
|
+
uv run --no-sync mkdocs build --strict
|
|
23
|
+
uv run --no-sync python tools/check_docs_links.py site
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Run backend-dependent changes in the disposable Docker stack described in the
|
|
27
|
+
[release runbook](https://ctolon.github.io/ninja-devx/project/releasing/). Local SQLite tests
|
|
28
|
+
do not establish PostgreSQL lock behavior, Redis counter atomicity or S3 upload semantics.
|
|
29
|
+
|
|
30
|
+
Each example is a separate Django project. Run it from its directory, for example:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cd examples/blog
|
|
34
|
+
uv run --no-sync --project ../.. pytest -q
|
|
35
|
+
uv run --no-sync --project ../.. mypy blog config clients/blog_client.py
|
|
36
|
+
uv run --no-sync --project ../.. python manage.py makemigrations --check --dry-run
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Design and review
|
|
40
|
+
|
|
41
|
+
- Keep HTTP adaptation separate from a business rule that has non-HTTP callers. A service
|
|
42
|
+
or repository interface is useful when it owns a real boundary, not merely another name
|
|
43
|
+
for every ORM call.
|
|
44
|
+
- Preserve request, object and queryset authorization boundaries. Custom hooks must state
|
|
45
|
+
their transaction and database ownership. Test rejection paths and side effects.
|
|
46
|
+
- Keep request state out of shared controller/permission objects. Resource dependencies
|
|
47
|
+
need success, failure and cancellation cleanup tests.
|
|
48
|
+
- Public APIs must pass strict mypy/Pyright checks. Avoid widening a public type to hide a
|
|
49
|
+
mismatch. Implementation modules are not automatically public extension points.
|
|
50
|
+
- Add a regression test for a bug. Prefer tests of observable behavior over copies of the
|
|
51
|
+
implementation. Concurrency changes need deterministic coordination and deadlines.
|
|
52
|
+
- Update guides/examples, changelog and migration notes when behavior changes. Explain the
|
|
53
|
+
trigger, resulting behavior, limitations and operational requirements in plain language.
|
|
54
|
+
Avoid unsupported performance claims or feature rankings.
|
|
55
|
+
- Wrap user-facing messages in Django gettext and refresh the matching catalogs with
|
|
56
|
+
`tools/messages.py`. Regenerate option references with `tools/generate_docs.py`.
|
|
57
|
+
|
|
58
|
+
## Dependencies and generated files
|
|
59
|
+
|
|
60
|
+
Edit dependency constraints intentionally and regenerate `uv.lock`; do not submit a stale
|
|
61
|
+
lock. CI uses `--locked`. Docker base digests and action commit pins require reviewed updates;
|
|
62
|
+
Dependabot proposals are input to that review, not automatic authorization to merge.
|
|
63
|
+
|
|
64
|
+
Do not edit generated option tables, sync twins or API clients manually. Run their documented
|
|
65
|
+
generator and review the diff. A generated artifact can still expose an incorrect public
|
|
66
|
+
contract; successful generation is not sufficient review.
|
|
67
|
+
|
|
68
|
+
## Pull requests
|
|
69
|
+
|
|
70
|
+
Describe the concrete problem and final behavior for a reviewer who has not followed the
|
|
71
|
+
issue. Include relevant validation and material limits. Keep unrelated refactors separate.
|
|
72
|
+
Contributions are licensed under Apache-2.0; do not include material you cannot license
|
|
73
|
+
under the repository's terms.
|
|
74
|
+
|
|
75
|
+
Maintainers use the [release runbook](https://ctolon.github.io/ninja-devx/project/releasing/)
|
|
76
|
+
for tag validation, test gates, Trusted Publishing, recovery and repository settings.
|
|
77
|
+
Do not publish a tag or distribution as part of an ordinary contribution.
|
ninja_devx-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
ninja_devx-0.0.1/NOTICE
ADDED