Skip to content

Python: add opt-in keep-property-names option - #3100

Open
foobra wants to merge 1 commit into
glideapps:masterfrom
foobra:agent/python-keep-property-names-fork
Open

Python: add opt-in keep-property-names option#3100
foobra wants to merge 1 commit into
glideapps:masterfrom
foobra:agent/python-keep-property-names-fork

Conversation

@foobra

@foobra foobra commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #3099

This adds an opt-in --keep-property-names Python renderer option.

When enabled, valid original JSON property names such as source_m3u8 are kept as Python attributes, so generated from_dict/to_dict mappings and Pydantic/FastAPI request fields use the same name. Invalid identifiers continue to use the existing naming logic.

The default remains unchanged.

Tests:

  • npm run test:unit
  • npm run build

@github-actions

Copy link
Copy Markdown

No generated-output differences

✅ This PR does not change generated outputs.

@foobra
foobra marked this pull request as ready for review July 31, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: add an option to keep valid original property names

1 participant