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

Create generic method to generate a pydantic class for each function in a module: #230

Open
mengerj opened this issue Dec 11, 2024 · 2 comments · Fixed by #241
Open

Create generic method to generate a pydantic class for each function in a module: #230

mengerj opened this issue Dec 11, 2024 · 2 comments · Fixed by #241

Comments

@mengerj
Copy link
Contributor

mengerj commented Dec 11, 2024

Input: any python module
Output: A list of pydantic classes of all functions (that don't start with "_") available in the module

@mengerj mengerj linked a pull request Dec 12, 2024 that will close this issue
@mengerj
Copy link
Contributor Author

mengerj commented Dec 12, 2024

Previously no defaults were included in the generated pydantic classes.
The last pull request #241 includes the defaults and the types of the parameters. But since including the types properly needs for all the classes to be available in the environment, it was decided to just use the type Any for all parameter types. But the original class is at least included in the description of the parameter.

@mengerj
Copy link
Contributor Author

mengerj commented Dec 12, 2024

Should allow the method to also work if a single function is provided as input

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 a pull request may close this issue.

1 participant