Skip to content

[python] emit typeddicts in a folder /types/ to allow for patching #11356

Open

Description

instead of generating a types.py file on its own can we generate a types/ folder that includes a _patch.py and _types.py like what we do for models/ but with typeddicts

Activity

  1. github-actions commented on Jul 22, 2026

    @github-actions
    Contributor

    🎯 Issue Triage

    Feature request to have the Python client emitter output TypedDicts into a dedicated /typed/ subfolder, enabling users to patch or override those definitions without conflicts.

    Category: Feature Request
    Area: emitter:client:python

    🔍 Analysis
    • This targets the @typespec/http-client-python emitter's code generation output structure.
    • Placing TypedDicts under a /typed/ directory would create a stable, well-known location that end users can patch or extend without modifying generated files directly.
    • Similar patterns exist in other SDKs for customization/patching support (e.g., _patch.py in Azure SDK for Python).
    • No issue body was provided — additional context from the author would help clarify the desired output structure.
    📝 Suggested next steps
    • Author to provide more detail on the desired folder structure and file naming (e.g., typed/models.py vs typed/_models.py)
    • Determine if this should be opt-in (via emitter option) or the default output layout
    • Assess impact on existing generated code and whether this would be a breaking change for current consumers

    Generated by Agentic Triage

  2. changed the title [-][python] emit typeddicts in a folder /typed/ to allow for patching[/-] [+][python] emit typeddicts in a folder /types/ to allow for patching[/+] on Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

emitter:client:pythonIssue for the Python client emitter: @typespec/http-client-pythonfeatureNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions