sigstore-python
nix-cde
sigstore-python | nix-cde | |
---|---|---|
4 | 9 | |
210 | 29 | |
0.5% | - | |
9.3 | 6.4 | |
7 days ago | about 17 hours ago | |
Python | Nix | |
GNU General Public License v3.0 or later | 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.
sigstore-python
-
How to improve Python packaging, or why 14 tools are at least 12 too many
You could use `pip-compile` if you want full pinning. That's what we do on another project -- we use GitHub Actions with `pip-compile` to provide a fully frozen copy of the dependency tree for users who'd like that[1].
In the context of `pip-audit`, that makes a little less sense: most of our dependencies are semantically versioned, and we'd rather users receive patches and fixes to our subdependencies automatically, rather than having to wait for us to release a corresponding fix version. Similarly, we expect users to install `pip-audit` into pre-existing virtual environments, meaning that excessive pinning will produce overly conservative dependency conflict errors.
[1]: https://github.com/sigstore/sigstore-python/tree/main/instal...
-
Use `Python -m Pip`
The conflicting advice is a serious problem.
I hope you'll forgive me for adding one additional piece of advice: for many Python packages, the only packaging metadata you need is `pyproject.toml`. You don't even need `setup.py` anymore, so long as you're using a build backend that supports editable installs with `pyproject.toml`.
Here's an example of a Python package that does everything in `pyproject.toml`[1]. You should be able to copy that into any of your projects, edit it to match your metadata, and everything will work exactly as if you have a `setup.cfg` or `setup.py`.
[1]: https://github.com/sigstore/sigstore-python
-
Bundling binary tools in Python wheels
You're right, both the infrastructure and metadata for cryptographic signatures on Python packages (both wheels and sdists) isn't quite there yet.
At the moment, we're working towards the "e2e" scheme you've described by adding support for Sigstore[1] certificates and signatures, which will allow any number of identities (including email addresses and individual GitHub release workflows) to sign for packages. The integrity/availability of those signing artifacts will in turn be enforced through TUF, like you mentioned.
You can follow some of the related Sigstore-in-Python work here[2], and the ongoing Warehouse (PyPI) TUF work here[3]. We're also working on adding OpenID Connect token consumption[4] to Warehouse itself, meaning that you'll be able to bootstrap from a trusted GitHub workflow to a PyPI release token without needing to share any secrets.
[1]: https://www.sigstore.dev/
[2]: https://github.com/sigstore/sigstore-python
[3]: https://github.com/pypa/warehouse/pull/10870
[4]: https://github.com/pypa/warehouse/pull/11272
- Project sigstore (free software signing service) just released a library to sign and verify python packages
nix-cde
-
The Magic Nix Cache
This is what I'm using with gitlab: https://github.com/takeda/nix-cde/blob/master/contrib/gitlab...
-
Using Nix as an alternative to dev containers in VScode.
I myself use https://github.com/takeda/nix-cde it just wraps other projects in an opinionated way and contains the boiler plate that I would normally use otherwise.
-
As if there weren't enough packaging tools already: mitsuhiko/rye: an experimental alternative to poetry/pip/pipenv/venv/virtualenv/pdm/hatch/…
There's a project that does this with using Nix: https://github.com/takeda/nix-cde (this is a wrapper around https://github.com/nix-community/poetry2nix)
- Docker multi-stage build with Poetry
-
Python 3.11 delivers.
I personally use this: https://github.com/takeda/nix-cde it has the benefit of a reproducible build environment, but unfortunately anything involving Nix has a steep learning curve.
-
The perfect way to handle project-specific developer configs
I use this myself: https://github.com/takeda/nix-cde
-
Asdf – the language tool version manager
I don't use NixOS myself, but have Nix installed on my Mac, and it seems to provide all functionality of package or version managers I needed.
I think though it is more complex because it is a programming language that provides this functionality instead of purpose build tool like asdf.
For my needs I created a framework for development: https://github.com/takeda/nix-cde to avoid cruft of including the same things over and over in my projects.
-
Use `Python -m Pip`
Not an OP, but I became a big fan of using poetry for managing dependencies. For managing python version I started using Nix package manager. It allows to describe all dependencies via code, but with time that code became a boilerplate, so I created this: https://github.com/takeda/nix-cde
It works very well for me so far.
What are some alternatives?
sampleproject - A sample project that exists for PyPUG's "Tutorial on Packaging and Distributing Projects"
hasql-interpolate
publishing-python-packages - Examples and exercises for Publishing Python Packages from Manning Books 🐍 📦 ⬆️
aws-lambda-python-runtime-interface-client
pigar - :coffee: A tool to generate requirements.txt for Python project, and more than that. (IT IS NOT A PACKAGE MANAGEMENT TOOL)
nixml - NIX + YAML for easy to use reproducible environments
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.
globus-timer-cli - CLI for interacting with the Timer API
auditwheel - Auditing and relabeling cross-distribution Linux wheels.
m1-terraform-provider-helper - CLI to support with downloading and compiling terraform providers for Mac with M1 chip
pip-audit - Audits Python environments, requirements files and dependency trees for known security vulnerabilities, and can automatically fix them
asdf - Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more