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

Add uv script at top of example #556

Closed

Conversation

raybellwaves
Copy link

@raybellwaves raybellwaves commented Dec 27, 2024

Any thoughts on adding requirements to the top of the example scripts like I have done here?

It can make the examples even easier to run as a one-liner and it doesn't affect any existing functionality.

You can try it using uv run https://raw.githubusercontent.com/raybellwaves/pydantic-ai/refs/heads/add-uv-script-at-top-of-example/examples/pydantic_ai_examples/pydantic_model.py

Screenshot 2024-12-27 at 5 14 09 PM

@sydney-runkle sydney-runkle added the documentation Improvements or additions to documentation label Dec 28, 2024
@samuelcolvin
Copy link
Member

This seems unnecessary. We already distribute examples as a separate package that includes required dependencies. I also thing this would be a significant maintenance burden as we have to keep dependencies that are crammed into python files up to date and in sync.

What's the advantage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants