pants
pyflow
Our great sponsors
pants | pyflow | |
---|---|---|
35 | 12 | |
3,100 | 1,306 | |
2.6% | - | |
9.8 | 0.0 | |
6 days ago | about 1 year ago | |
Python | Rust | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pants
-
The xz attack shell script
> C/C++'s header system with conditional inclusion
Wouldn't it be more accurate to say something like "older build systems"? I don't think any of the things you listed are "modern". Which isn't a criticism of their legacy! They have been very useful for a long time, and that's to be applauded. But they have huge problems, which is a big part of why newer systems have been created.
FWIW, I have been using pants[0] (v2) for a little under a year. We chose it after also evaluating it and bazel (but not nix, for better or worse). I think it's really really great! Also painful in some ways (as is inevitably the case with any software). And of course it's nearly impossible to entirely stomp out "genrules" use cases. But it's much easier to get much closer to true hermeticity, and I'm a big fan of that.
0: https://www.pantsbuild.org/
-
Monorepo + Microservices + Dependency Managment + Build system HELL
Does pants/bazel can help me?
- Pants 2: The ergonomic build system
-
Go Dependency management in large company projects - How do you do it?
Hyper-large tech companies managing hyper-large monorepos using Bazel (google), buck (Facebook), please (thought machine), pants (Twitter, Foursquare & Square) enjoy them but also have a lot of resources devoted to running and maintaining it.
-
Reason to use other Build Tool than Make?
Yeah there's definitely some alternatives out there. Pants is another one that has a lot of traction.
-
Is it possible pickle a function with its dependencies?
You should look into pex, or it’s parent build system pants. A PEX (Python EXecutable) file can package up all your code including dependencies and run on another machine of similar OS with just an available compatible interpreter.
-
Sanity check of my decision for "Iterative AI" (DVC, MLEM, CML) pipeline over Azure ML
We don't have the CD yet, but I think what I put in place counts as simple CI (even if incomplete)? Every push & PR trigger an azure pipeline, which runs pants. This install the dependencies from the lockfile, run some linters, uses DVC to pull the data necessary for tests, and run unit tests (mypy check is deactivated until I solve a weird error). Basically the same script runs on laptops cross-platform (one of us uses Max, one Ubuntu with GPU, one Ubuntu with CPU, the scripts runs on every platform). The only difference with CI is the installation of Pants and the gestion of Cache (needs to be downloaded in CI so it takes ~3min in CI versus 20 seconds on my laptop).
- Pants 2: fast, scalable, user-friendly build system for codebases of all sizes
-
Maintain a Clean Architecture in Python with Dependency Rules
This has also been recently integrated in pants.
https://github.com/pantsbuild/pants/issues/13393
- Blazing fast CI with MicroVMs
pyflow
-
Uv: Python Packaging in Rust
Very cool! Of note, I made something along these lines a few years ago, although with a slightly broader scope to also include managing and installing python versions. I abandoned it due to lack of free time, and edge cases breaking things. The major challenge is that Python packages that aren't wheels can do surprising things due to setup.py running arbitrary code. (https://github.com/David-OConnor/pyflow)
-
Incompatible Child Dependencies -- how are they resolved?
Pyflow
-
Freezing Requirements with Pip-Tools
Pyflow takes care of the use when you need pyenv to isolate different python versions, pipx to isolate some global python-based tools, and isolated, reproducible builds per project with on tool. I highly recommend people to give it go.
https://github.com/David-OConnor/pyflow#a-thoroughly-biased-...
-
Empty npm package '-' has over 700,000 downloads
Pyflow is a similar implementation of PEP582. NGL I wonder if it's better because of how good Rust stuff is. Probably a lot faster. Looks like you can install it via Pypi. I should've tested it before moving to PDM. Though it seems dev is a bit slow. Hmmm.
-
pip and cargo are not the same
I’m personally complaining that pip is so much behind cargo. I have some hope with Pyflow though.
-
XKCD | Python Environment
I literally stumbled into this issue again today. Has anyone leveraged Pyflow before? It looks pretty slick for keeping things organized. I don't do heavy dev work, just need something to keep things generally tidy. Was curious if anyone had used it and their opinion on it.
-
Moving from pipenv to poetry or PDM
PDM is pretty new so it’s not entirely clear how it’ll play out but if you’re interested in PEP 582 then it’s really that or pyflow.
- Python: Please stop screwing over Linux distros
- Pyflow: An Alternative to Poetry and Pyenv
-
Cooperative Package Management for Python
It's a good safeguard, and it's going in the direction of the other initiatives to make python package management default behavior saner.
PEP 852 is the another one to follow up: https://www.python.org/dev/peps/pep-0582/
It basically uses the concept of node_modules, making python interpreters local any local __pypackages__ directory. There are 2 differences though:
- unlike JS, python can only have one version of one lib
- but since having several versions of python often matters, you may have several __pypackages__/X.Y sub dirs to catter to each of them
It does also force you to use "-m" to use commands, which is the best practice anyway. I hope it will make jupyter fix "-m" on windows for them because that's a blocker for beginners.
If you are not already using "-m", start now. It solves a lot of different problems with running python cli programs.
E.G: instead of running "black" or "pylint", do "python -m black" or "python -m pylint". Or course you may want to chose a specific version of python, so "python3.8 -m black" for unix, or "py -3.8 -m black" on windows.
To test out __pypackages__, give a try to the pdm project: https://github.com/pdm-project/pdm
At last, some other tools that I wish people knew more about that solves packaging issues:
- pyflow (https://github.com/David-OConnor/pyflow): it's a package manager like poetry, but it also install whatever python you want like pyenv. Except it provides the binary, no need to compile anything. It's a young project, but I wish it succeeds because it's really a great concept.
- shiv (shiv.readthedocs.io/): it leverage the concept of zipapp, meaning the ability that python has to execute python inside a zip file. It's a successor to pex. Basically it lets you bundle your code + all deps from virtualenv inside a zip, like a Java .war file. You can then run the resulting zip, a .pyz file, like if it was a regular .py file. It will unzip on the first run automatically. It makes deployment almost as easy as with golang.
- nuitka (shiv.readthedocs.io/): take your code and all dependancies, turn them into C, and compiles it. Although it does require a bit of setup, since it needs headers and a compiler, it results reliably in a standalone compiled executable that will run on the same architecture with no need for anything else. Also it will speed up your Python program, up to 4 times.
What are some alternatives?
Bazel - a fast, scalable, multi-language and extensible build system
Poetry - Python packaging and dependency management made easy
megalinter - 🦙 MegaLinter analyzes 50 languages, 22 formats, 21 tooling formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a GitHub Action, other CI tools or locally.
PDM - A modern Python package and dependency manager supporting the latest PEP standards
please - High-performance extensible build system for reproducible multi-language builds.
dephell - :package: :fire: Python project management. Manage packages: convert between formats, lock, install, resolve, isolate, test, build graph, show outdated, audit. Manage venvs, build package, bump version.
pyupgrade - A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.
Nuitka - Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.
Buck - A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
WinPython - A free Python-distribution for Windows platform, including prebuilt packages for Scientific Python.
g-sorcery - Framework for automated ebuild generators