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.8.tar.gz
(8.5 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.8.tar.gz.
File metadata
- Download URL: wagtail_ninja-0.1.8.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b5e9401ae4f9e5514bc55683d5891986fb40ffa258082a40203ec665c975b12
|
|
| MD5 |
81827f4f0640add24324d68b7979fdd3
|
|
| BLAKE2b-256 |
d117677f01d07eb91e6077633914761b3f4b9703dfcd84702230a24cea1746e5
|
File details
Details for the file wagtail_ninja-0.1.8-py3-none-any.whl.
File metadata
- Download URL: wagtail_ninja-0.1.8-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
321e63a8f1e2e83a15799bf0a2328942699289e4e4051b623b473084551ef410
|
|
| MD5 |
b6493fbf59d16c49415625d6e84b9392
|
|
| BLAKE2b-256 |
39b9113a781f0e12a5c75552ac7d8cc291f29f024e060a708e3c11869c59fa30
|