An django app to generate type information for rest_framework.
Project description
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
- Add
drftypegen
in 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.
TODO
- Support for Wagtail
- Support for Dart
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
drftypegen-0.0.1.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for drftypegen-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7fdd2a4a48506c517e202e5e081de88b7bc0d823328753dafbbb4337286409d |
|
MD5 | 02a5faa92b9a18e3533bfdba066658a3 |
|
BLAKE2b-256 | d13bfeda7dc4b10a44f99d3f88cdaf3dbef824644bbb89286d30c2fd89f44b02 |