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

docs for python scripting update #1102

Merged
merged 1 commit into from
Jan 29, 2025
Merged

docs for python scripting update #1102

merged 1 commit into from
Jan 29, 2025

Conversation

sanchitram1
Copy link
Contributor

--script is deprecated for uv

@mxcl
Copy link
Member

mxcl commented Jan 28, 2025

Did you test this works?

@sanchitram1
Copy link
Contributor Author

yessir

~/tea/pkgx main ?1 ······································································································ 15:47:43
❯ chmod +x test.py

~/tea/pkgx main ?1 ······································································································ 15:47:46
❯ cat test.py
#!/usr/bin/env -S pkgx [email protected] uv run --with requests<=3 --with rich

import requests
from rich.pretty import pprint

resp = requests.get("https://peps.python.org/api/peps.json")
data = resp.json()
pprint([(k, v["title"]) for k, v in data.items()][:10])

~/tea/pkgx main ?1 ······································································································ 15:47:48
❯ ./test.py
warning: `uv run` is experimental and may change without warning.
[
│   ('1', 'PEP Purpose and Guidelines'),
│   ('2', 'Procedure for Adding New Modules'),
│   ('3', 'Guidelines for Handling Bug Reports'),
│   ('4', 'Deprecation of Standard Modules'),
│   ('5', 'Guidelines for Language Evolution'),
│   ('6', 'Bug Fix Releases'),
│   ('7', 'Style Guide for C Code'),
│   ('8', 'Style Guide for Python Code'),
│   ('9', 'Sample Plaintext PEP Template'),
│   ('10', 'Voting Guidelines')
]

@mxcl
Copy link
Member

mxcl commented Jan 29, 2025

I rebased to get CI to pass. If you want your GPG signed commit, resign and force push.

@mxcl
Copy link
Member

mxcl commented Jan 29, 2025

Thanks, I verified locally. It wasn’t working when I wrote the docs. It would fork bomb! Definitely an experimental feature, but it is the best in class for python deps in scripts.

@sanchitram1
Copy link
Contributor Author

signed…had to reconfigure git to always sign all commits.

@mxcl mxcl merged commit a6cde02 into pkgxdev:main Jan 29, 2025
3 checks passed
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 this pull request may close these issues.

2 participants