Ninja API for Wagtail
Project description
wagtail-ninja
alpha version.
usage
in your wagtail project do something like this:
# api.py
from ninja import NinjaAPI
from wagtail_ninja.router import WagtailNinjaPagesRouter
pages_router = WagtailNinjaPagesRouter()
api = NinjaAPI()
api.add_router("/pages/", pages_router)
and then in your urls:
# urls.py
from some.path.api import api as ninja_api
urlpatterns = [
...
path("api/wagtail/v3/", ninja_api.urls),
...
]
et voila.
you should be able to:
- find the OpenAPI Ninja UI under e.g. http://localhost:8000/api/wagtail/v3/docs
- get the schema (for further processing) from http://localhost:8000/api/wagtail/v3/openapi.json
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wagtail_ninja-0.1.9.tar.gz
(8.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wagtail_ninja-0.1.9.tar.gz.
File metadata
- Download URL: wagtail_ninja-0.1.9.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27e87ccbf6c8ba91f3b93d5ed7bdbad450ef5458e90f1ed0089e33a0dc8f2b65
|
|
| MD5 |
3ef8e8911c23fcbe045e4601f1b59163
|
|
| BLAKE2b-256 |
452f74bd5a634cc5fbfd1194b000eb0a93b4c353614e468bb565b6cf8af59459
|
File details
Details for the file wagtail_ninja-0.1.9-py3-none-any.whl.
File metadata
- Download URL: wagtail_ninja-0.1.9-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a5fbd506a8a2aff4013b7cd93cfcaa27c2c80f14faa5bcd7a84f63159abcb47
|
|
| MD5 |
897b3c76316fe8b5543a1c250decd0cc
|
|
| BLAKE2b-256 |
f44209a6b3cc4efe6a40a4b735260c32cdf2b189c8b1336993c529f57b02abff
|