A simple rest api generator for django based on models
Project description
easyapi-django
A simple rest api generator for django based on models
API in 4 easy steps!
Install
pip install easyapi-django
Add middleware in Django settings
MIDDLEWARE = [
...
'easyapi.ExceptionMiddleware',
]
Create Resource based on your model
from easyapi import BaseResource
from your_models import YOUR_DJANGO_MODEL
class ResourceName(BaseResource):
model = YOUR_DJANGO_MODEL
Add to your routes url
from easyapi.routes import get_routes
from resourcefile import ResourceName
endpoints = {
'endpointname(.\*)$': ResourceName,
}
routes = get_routes(endpoints)
urlpatterns = [
...
] + routes
Your api with GET, PUT, POST and DELETE is ready. Start using it
How easy and cool is that???
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
easyapi_django-0.0.6.tar.gz
(9.2 kB
view details)
Built Distribution
File details
Details for the file easyapi_django-0.0.6.tar.gz
.
File metadata
- Download URL: easyapi_django-0.0.6.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20f20e948c633d278389a7112b7aafc4b1bb2f4c3500ee182c07dea861d758e7 |
|
MD5 | 2fb7150fbe621d623f49f94417f24479 |
|
BLAKE2b-256 | 3b793ea2def63cf7956fcf498f3c5397b59ee2e4ae1c31dffe46002232faceb4 |
File details
Details for the file easyapi_django-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: easyapi_django-0.0.6-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92b6ab7fb8e2b71d78657276b24bb15578966a64b9461676c1044c9bd10f5b0a |
|
MD5 | b5d53d2430aee5741d1ca78261cd18ee |
|
BLAKE2b-256 | 5c98477849eb9c62cf5ee11fca28fda96ea4389865bdebbf5112c13803c736ec |