Skip to main content

drf_easyview

Rapidly generate DRF API views for all models in your Django project. Simplifies development, but use with caution in production.

Documentation License

DRF EasyView

The Django DRF Package is a convenient package designed to simplify the integration of Django and Django Rest Framework (DRF). It provides tools and utilities that automate common tasks, such as model registration and generation of serializers and viewsets, and setup of URL patterns for API endpoints.

DRF EasyView is a lightweight package that automates the creation of Django REST Framework (DRF) API views for all models in your Django project. With EasyView, you can effortlessly generate API endpoints and serializers, enabling seamless CRUD (Create, Retrieve, Update, Delete) operations for your models.

Simplify your development process and reduce boilerplate code by leveraging the power of DRF EasyView. It provides an intuitive and efficient solution for quickly exposing your models as robust and customizable APIs, allowing you to focus on building your application's core functionalities.

Key Features:

  • Automatic generation of API views and serializers for all models
  • Support for standard CRUD operations (Create, Retrieve, Update, Delete)
  • Seamless integration with Django and Django REST Framework
  • Customizable options for fine-grained control over API behavior

Get started with DRF EasyView today and streamline your API development workflow!

Django DRF Package

drf_easyview

Rapidly generate DRF API views for all models in your Django project. Simplifies development, but use with caution in production.

Documentation License

DRF EasyView

The Django DRF Package is a convenient package designed to simplify the integration of Django and Django Rest Framework (DRF). It provides tools and utilities that automate common tasks, such as model registration and generation of serializers and viewsets, and setup of URL patterns for API endpoints.

Installation

To install the package, you can use pip:

pip install drf-easyview==2.0.2

Usage

To use the package in your Django project, follow these steps:

  1. Add drf_easyview to the INSTALLED_APPS list in your project's settings file.

  2. Include the package's URLs in your project's urls.py file:

    from django.urls import include, path
    
    urlpatterns = [
        # Other URL patterns
        path('easyview/', include('drf_easyview.urls')),
    ]
    
  3. Start the server and check the root endpoint to have all your models APIs generated for you.

Usage

Once models are created, you can add this package to your Django project to automatically create an OpenAPI for all your models. With the reference provided by the package, you can start creating custom API views based on your business or personal requirements.

Here's how you can use the package to create your custom API views:

  1. Ensure that the Django DRF Package is installed and added to your project as explained in the installation steps.

  2. Start the development server by running the following command:

     python manage.py runserver
    
  3. Access the OpenAPI documentation for your models by appending /easyview/ to the base URL of your Django project. For example, if your project is running at http://localhost:8000/, the OpenAPI documentation will be available at http://localhost:8000/easyview/.

  4. Explore the available models and their corresponding endpoints in the OpenAPI documentation. This will provide you with the necessary information to create your custom API views.

  5. Based on your requirements, you can create custom API views using Django Rest Framework's class-based views or function-based views. Refer to the Django Rest Framework documentation for detailed instructions on creating custom API views.

Database Migration

Before using the package, run the database migration command to create the necessary tables:

python manage.py migrate

Starting the Server

To start the development server and access the APIs provided by your models, use the following command:

python manage.py runserver

Accessing the APIs

Once the server is running, you can access the APIs for your models by appending /easyview/ to the base URL of your Django project.

For example, if your Django project is running at http://localhost:8000/, you can access the APIs for your models at http://localhost:8000/easyview/. The root of the API will provide a list of available models and their corresponding endpoints.

Please note that you should replace http://localhost:8000/ with the actual base URL of your Django project.

Contributing

If you would like to contribute to the Django DRF Package, please refer to the CONTRIBUTING.md file for guidelines.

License

The Django DRF Package is released under the MIT License.

Contact

If you have any questions or feedback, please contact us at [bobburih@gmail.com].

Documentation

The latest documentation for this project can be found at drf-easyview.readthedocs.io.

Metadata

Release files for drf-easyview 2.0.2

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

Source distribution (sdist)

Source distribution for drf-easyview 2.0.2
File Size Uploaded
drf_easyview-2.0.2.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for drf-easyview 2.0.2
File Interpreter ABI Platform
drf_easyview-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / drf_easyview-2.0.2.tar.gz

Download URL drf_easyview-2.0.2.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7af13436b07ec352f0f2dbebe19d986ec7d559522208a57af47cc52690ca9d23
BLAKE2b-256 checksum
How to use checksums
105db1d5cb7920e57727ff0f528c5cf2e1a5d943f54a02855b6efdd4bfa5c6bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.5

Release files / drf_easyview-2.0.2-py3-none-any.whl

Download URL drf_easyview-2.0.2-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96f35f264aa78930bc215d6c3fae0dc5fe9ded1fa855348643416968613424c3
BLAKE2b-256 checksum
How to use checksums
625be174789a36122b522321f284202f3b63165069e34c9a79d9f412e0d076ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.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