{"categories":[{"label":"Build Tools","url":"https://skillfed.io/packages/category/software-development-build-tools/3"}],"enrichment":{"capability":"Generates TypeScript interfaces and enums from Django Rest Framework serializers, automating type definition creation for frontend-backend API contracts.","skillfed_tags":["code-generation","type-safety","api-contracts"],"use_cases":["Generate TypeScript types automatically when your Django API serializers change, keeping frontend type definitions in sync without manual editing.","Create separate TypeScript interface files for internal and external API versions using context-based filtering.","Export choice fields as TypeScript enums to enforce type-safe selection of predefined values in the frontend.","Reduce boilerplate by generating nested interface hierarchies that mirror your serializer structure.","Integrate into a build pipeline to regenerate TypeScript definitions on each API deployment."],"what_it_does":"django-typomatic is a code generator that reads Django Rest Framework serializers and outputs TypeScript interface definitions, eliminating manual type duplication between Python APIs and TypeScript frontends. It supports nested serializers, list fields, choice fields with optional enum generation, and field name camelization. The package offers two workflows: a decorator-based approach where you mark serializers with @ts_interface() and call generate_ts() to write files, or a CLI mode that scans your project for serializers without requiring decorators or manual function calls.\n\nThe tool bridges the impedance mismatch between Python's dynamic typing and TypeScript's static types by introspecting field definitions and mapping them to TypeScript equivalents. It handles patterns like many=True for arrays, nested object types, and choice constraints. Contexts allow you to partition serializers into separate output files, and the camelize option converts snake_case field names to camelCase for JavaScript conventions.","worth_installing":"Yes, with conditions. Install if you have a Django Rest Framework API and a TypeScript frontend, want to eliminate manual type synchronization, and are willing to verify the license status before production use. The low install friction and active repository make it reasonable, but the aging maintenance status means you should confirm it handles your serializer patterns before committing to it as a core build tool."},"id":"django-typomatic","links":{"html":"https://skillfed.io/packages/django-typomatic","md":"https://skillfed.io/packages/django-typomatic.md","pypi":"https://pypi.org/project/django-typomatic/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-07-02","license_spdx":null,"license_treatment":"unclear","name":"django-typomatic","python_support":"unspecified","summary":"A simple solution for generating Typescript interfaces from your Django Rest Framework Serializers."},"popularity":{"monthly_downloads":225894,"position":9211,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.5.2"}
