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.7.tar.gz
(8.3 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.7.tar.gz.
File metadata
- Download URL: wagtail_ninja-0.1.7.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41fe54b381bce9acc162c0ec5742ce69700fe40798f521312345d2e33221b90f
|
|
| MD5 |
06284c3a28cefe80075319a0e9120989
|
|
| BLAKE2b-256 |
56d1651988a63b8d01bf84728fc6f85aa67ebf58a6dc7231e7fdd98c4c1403ad
|
File details
Details for the file wagtail_ninja-0.1.7-py3-none-any.whl.
File metadata
- Download URL: wagtail_ninja-0.1.7-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d72603768bb1c318865c8fc43b8498923be2462b83a08347953de6282346a38
|
|
| MD5 |
a6d90e4197d4a8a6d9305192407103bf
|
|
| BLAKE2b-256 |
e49e2acab8a07a87ce64f3a0e38e143794ee717936504bb84df45ac833d864f9
|