Skip to main content

An django app to generate type information for rest_framework.

Project description


DRFTypeGen is a app to enable user to generate type information for various languages.


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.


  1. Install from pip:

    pip install drftypgen
  2. Add drftypegen in your INSTALLED_APP.



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:

./ genTSTypes


  1. Support for Wagtail
  2. Support for Dart

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for drftypegen, version 0.3.2
Filename, size File type Python version Upload date Hashes
Filename, size drftypegen-0.3.2-py3-none-any.whl (13.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size drftypegen-0.3.2.tar.gz (8.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page