Skip to main content

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

  1. Install from pip:

    pip install drftypgen
    
  2. Add drftypegen in your INSTALLED_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

  1. Support for Wagtail
  2. 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)

Source distribution for drftypegen 0.3.2
File Size Uploaded
drftypegen-0.3.2.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for drftypegen 0.3.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

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