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

Support for specifying a dependency via an import within the function itself instead of being passed in as a string in the decorator #8

Open
elviskahoro opened this issue Aug 30, 2024 · 0 comments

Comments

@elviskahoro
Copy link

elviskahoro commented Aug 30, 2024

Pare example:

@pare.endpoint(name="3rd-party-deps", dependencies=["pydantic", ...])
def function_with_pyndantic_dependency() -> str:

I've used a similar service that's supports offloading a function / computation to the cloud. They supported including an actual import statement in the function itself in lieu of passing in a list of strings to dependencies. This developer experience was great and would be much appreciated!

@pare.endpoint(name="3rd-party-deps")
def function_with_pyndantic_dependency() -> str:

    import pydantic
    
    # use pydantic for something
    return "continue with function logic"
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

No branches or pull requests

1 participant