Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically create proto plus schema classes #350

Open
matthew29tang opened this issue Mar 17, 2023 · 1 comment
Open

Dynamically create proto plus schema classes #350

matthew29tang opened this issue Mar 17, 2023 · 1 comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@matthew29tang
Copy link

(Filing a feature request here as instructed by Anthonios)

I would like to use proto-plus to dynamically generate a proto plus schema.

Currently, a proto-plus schema class must have all its fields statically defined at the time of class definition (since the metaclass new method compiles all the fields). We would like to be able to create a schema with field names that are not known until runtime (retrieving field names from a variable). The dynamic creation should also work for nested protos as well.

@matthew29tang matthew29tang added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Mar 17, 2023
@tonycombocurve
Copy link

Agree this would be a very useful feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants