DRFTypeGen
DRFTypeGen is a app to enable user to generate type information for various languages.
Why?
Nowadays we use statically-typed languages in many consumer apps for our APIs. Of course there are 'schemas' to describe your API but generating types are better. This will enable projects to generate relevant type file(s) for using in other projects.
Installation
-
Install from pip:
pip install drftypgen
-
Add
drftypegenin yourINSTALLED_APP.
Usage
TypeScript
from drftypgen.compilers import TypeScriptCompiler
tscompiler = TypeScriptCompiler()
types_data = tscompiler.generate()
Now you can save the types_data in file or serve in a view.
Or, you can generate TypeScript File with this management command with optional filename with --file option:
./manage.py genTSTypes
TODO
Support for Wagtail- Support for Dart
Metadata
Release files for drftypegen 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| drftypegen-0.3.2.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| drftypegen-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.9 kB
Release files / drftypegen-0.3.2.tar.gz
| Download URL | drftypegen-0.3.2.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6a611375a84e89f7c812d7bc6d7a09656ac8754dd37abad681410baf758bc6b
|
|
BLAKE2b-256 checksum How to use checksums |
af03d30e689cb3848eda16d37c60964c717a4bad57736fb91e29d25992c03a7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
|
Release files / drftypegen-0.3.2-py3-none-any.whl
| Download URL | drftypegen-0.3.2-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ba7f67eeadd6899824c6226d1be2aeae977ac67d62af975ba8d0e435d3ae211
|
|
BLAKE2b-256 checksum How to use checksums |
dfd65c1ae08182bfbc476dad0acaee76ebb3bd4cc7a47370abeb5fc8e9e86516
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
|