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 Provenance Actions
drftypegen-0.3.2.tar.gz 8.1 kB Without provenance Details for drftypegen-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for drftypegen 0.3.2
File Interpreter ABI Platform Actions
drftypegen-0.3.2-py3-none-any.whl Python 3 none any Details for drftypegen-0.3.2-py3-none-any.whl

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

Security for drftypegen 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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