Thank you, this goes to the top of my reading pile for tomorrow! We've been doing a lot of uv conversions at work and I have a specific personal use for this as well
Literally it's best feature, because then you can download a binary and guarantee that with that binary, you have a working python virtualenv on every platform UV supports.
That means it can't be maintained by the community it's serving. For those skilled in both Rust and Python can understand why it would appear as the best thing since sliced bread.
What about for those not skilled in Rust? Should we also learn 15 other coding languages while we are at it?
wreck is written in Python and manages dependencies. via hierarchy of requirements files, not TOML. It's venv aware. For Python package authors.
UV has a shitload of features. I've only ever really used it for making virtualemvs for easier cross platform compatibility, but even just for that, there's tons of options related to which packages, from where, etc.
tl:dr probably, although differentiating between "deploy" and "dev" installs is the task of the package config which UV doesn't (to my knowledge) replace in any way.
From *.in requirements files would produce *.unlock and *.lock files for venv .venv. Package versions are sync'ed within all requirements files within that venv.
nice! It just works (harlequin.sh is a python program that allows to interact with databases using SQL qury langues, you can also load csv and json data)
21 Comments
beeng@discuss.tchncs.de · 21 pts · 299d
Using the UV hashbang and a few doc strings for dependencies so you can run full on python scripts as executables is fucking crack.
synae@lemmy.sdf.org · 6 pts · 299d
I have an idea of what this might look like, but do you have any examples I can crib from?
rainwall@piefed.social · 7 pts · 299d
This article looks like it explains the process:
https://mathspp.com/blog/til/standalone-executable-python-scripts-with-uv
CannonFodder@lemmy.world · 6 pts · 299d
Cool. But for God's sake don't run python code from the internet, that's such a huge security risk,
rainwall@piefed.social · 3 pts · 296d
Dont worry, I just vibe run it.
synae@lemmy.sdf.org · 2 pts · 298d
Thank you, this goes to the top of my reading pile for tomorrow! We've been doing a lot of uv conversions at work and I have a specific personal use for this as well
solrize@lemmy.ml · 15 pts · 299d
And it isn't even written in Python!
chrash0@lemmy.world · 29 pts · 299d
spoiler alert: Python isn’t written in Python
rtxn@lemmy.world · 8 pts · 299d
It's
turtlesGCC all the way down.logging_strict@programming.dev · 1 pts · 296d
spoiler alert: Python isn't written in fortran, cobol, pascal, assembly, VBA, Java, javascript, or Rust (ignoring clunky pypy). uv is written in Rust.
spoiler alert: Don't have to be a C coder to use Python
_stranger_@lemmy.world · 17 pts · 299d
Literally it's best feature, because then you can download a binary and guarantee that with that binary, you have a working python virtualenv on every platform UV supports.
witty_username@feddit.nl · 14 pts · 299d
This page said it's written in Rust. Is this the same UV?
eager_eagle@lemmy.world · 14 pts · 299d
yes
logging_strict@programming.dev · 0 pts · 296d
That means it can't be maintained by the community it's serving. For those skilled in both Rust and Python can understand why it would appear as the best thing since sliced bread.
What about for those not skilled in Rust? Should we also learn 15 other coding languages while we are at it?
wreck is written in Python and manages dependencies. via hierarchy of requirements files, not TOML. It's venv aware. For Python package authors.
admin@lemmy.my-box.dev · 8 pts · 299d
Does it allow differentiating between dependencies and dev dependencies though? I couldn't gather that from the article.
eager_eagle@lemmy.world · 18 pts · 299d
it does, I use it every day
this is the standard https://packaging.python.org/en/latest/specifications/dependency-groups/
_stranger_@lemmy.world · 11 pts · 299d
UV has a shitload of features. I've only ever really used it for making virtualemvs for easier cross platform compatibility, but even just for that, there's tons of options related to which packages, from where, etc.
tl:dr probably, although differentiating between "deploy" and "dev" installs is the task of the package config which UV doesn't (to my knowledge) replace in any way.
logging_strict@programming.dev · -1 pts · 296d
wreck can. It's venv aware. Takes full advantage of hierarchical requirement files. Is intuitive. The learning curve is minimal. Written in Python.
reqs fix --venv-relpath='.venv'reqs fix --venv-relpath='.doc/.venv'From
*.inrequirements files would produce*.unlockand*.lockfiles for venv.venv. Package versions are sync'ed within all requirements files within that venv.PlanterTree@discuss.tchncs.de · 2 pts · 284d
example of using uv to install a python tool:
nice! It just works (harlequin.sh is a python program that allows to interact with databases using SQL qury langues, you can also load csv and json data)
Vulwsztyn@programming.dev · 2 pts · 283d
I know it's not the point of this comment, but I'll check harlequin out
Unsealed9041@lemmy.ca · -1 pts · 297d
They kind of lost me at piping a script to sh. Is this the official way? Get your shit packaged into the popular distros. DevOps isn't that hard.