Skip to main content

# django-easy-api

Now there is no need to create apis for common CRUD operation for any model. By using django-easy-api its really easy. Kindly follow the below steps for including this library into your project.

  1. Create Your django project.

  2. Add easy_api in settings.py

    INSTALLED_APPS = [ . . . ‘easy_api’ ]

  3. Create your django app

  4. Now in models.py follow create your model by inheriting EasyAPI model from easy_api app.

    from django.db import models from easy_api.models import EasyAPI

    class MyModel(EasyAPI):

    # Your Requried field here.

  5. Migrate your models.

  6. This is the last step. You need to add this model in your app’s urls.py

    from django.urls import path from .models import MyModel

    urlpatterns = [

    path(‘myurl/’, MyModel.as_view()),

    ]

7. That’s it. Now you will have common GET/POST/PUT/DELETE methods on your model. Also you can attach query_params only for id in your url. For example:

http://localhost:8000/myurl/?id=1

8. You can also override get, post, put and delete method according to your need. For example:

from django.db import models from easy_api.models import EasyAPI

class MyModel(EasyAPI):

# Your Requried field here.

def get(self, request):

#Your logic

Release files for django-model-api 1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for django-model-api 1.4
File Interpreter ABI Platform
django_model_api-1.4-py3-none-any.whl Python 3 none any Details

Release files / django_model_api-1.4-py3-none-any.whl

Download URL django_model_api-1.4-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74a3ee5d948bae1f6f8635b23f633a8f6b5af7916325de7e6cbd6ac6630d5c4c
BLAKE2b-256 checksum
How to use checksums
8bafbd50b5bd33e2ad43512d207015637bf6f7ae91bf814611f3d42176689d48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.4 This release

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page