Skip to main content

django-rest-gen

tests PyPI Version

This generates a fully functioning apis using generated serializers and class-views.

How to use it

  1. Install it in your django project pip install django-rest-gen.
  2. Run it and specify your app python -m django_rest_gen. You should also specify the appropriate arguments (e.g., python -m django_rest_gen --settings iires/settings.py --apppath iirapp) Note: if the file already exists and is not empty, the content will be printed instead in the stdout

Arguments

usage: django_rest_gen [-h] [--pythonpath PYTHONPATH] [--settings SETTINGS] [--apppath APPPATH] [--overwrite] [--dummy]

Generate Django REST API code

options:
  -h, --help            show this help message and exit
  --pythonpath PYTHONPATH
                        Python Path directory.
  --settings SETTINGS   The path to the django project settings
  --apppath APPPATH     The path to the app
  --overwrite           Whether to overwrite existing files if any
  --dummy               Whether to generate dummy data generator

Automatic detection

If --settings and --apppath are not passed, it will try to detect them. It will look for anypath within your project that has settings.py to be the default settings path and any directory that has models.py to be the app path. You need to specify this in case you have multiple apps in your django project.

Limitations

  • Flat. No nesting is provided as it depends on user preferences.

Rebuild package

  1. python3 -m build
  2. python3 -m twine upload dist/*

Metadata

Release files for django-rest-gen 0.1.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 django-rest-gen 0.1.2
File Size Uploaded
django_rest_gen-0.1.2.tar.gz 13.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-rest-gen 0.1.2
File Interpreter ABI Platform
django_rest_gen-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.9 kB

Release files / django_rest_gen-0.1.2.tar.gz

Download URL django_rest_gen-0.1.2.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2049110c53f7b46f7a2866bedd1d6c31427aa08b45ccf2e41d1d186e2f8ad807
BLAKE2b-256 checksum
How to use checksums
5742de3e74f44056cddc485dd140304e5dd59f1e1c53de40766c096c300148bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.6

Release files / django_rest_gen-0.1.2-py3-none-any.whl

Download URL django_rest_gen-0.1.2-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12737112d9e47cc2bf31979316c94e8f65ea964f28a392ef6131bfb8ab736159
BLAKE2b-256 checksum
How to use checksums
c0156dd3670f8a6d5f411ea0cd7c867141cf8b29d0577baaabd6d638a22352a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

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