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

Accept database models as API inputs #274

Open
mmaelicke opened this issue Feb 13, 2023 · 0 comments
Open

Accept database models as API inputs #274

mmaelicke opened this issue Feb 13, 2023 · 0 comments
Assignees
Labels
api Issue is affecting Python API enhancement New feature or request model This issue is affecting the database model priority high

Comments

@mmaelicke
Copy link
Member

Right now, lookup values (ie. the Unit used when creating a Variable) have to be passed as Union[int, str] to the api functions, ie: api.add_variable(unit: Union[int, str]).

We should rework the whole ADD API to accept the actual model and its dictionary representation as well. Thus, the argument should be of type: Union[int, str, models.Unit, dict].

This might apply to the FIND APIs as well.

@mmaelicke mmaelicke added enhancement New feature or request api Issue is affecting Python API model This issue is affecting the database model labels Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue is affecting Python API enhancement New feature or request model This issue is affecting the database model priority high
Projects
None yet
Development

No branches or pull requests

2 participants