Just a demo of the uv package manager for Python.
Project description
uv-demo
PyPI package
A demo and template for a modern Python package managed by uv
. Very useless as a package.
Use this as a template for new projects, or as a reference for how to set up a Python project with the following:
-
uv
as the Python package manager. -
tox
for testing the three latest Python versions. -
pre-commit
hooks for code formatting and linting. - GitHub Actions for testing and publishing.
-
gh-act
for running GitHub Actions locally. - Makefile with common targets.
- Documentation with
pdoc
+ GitHub Pages. - Deptry to highlight missing and unused dependencies.
System Dependencies
uv
curl -LsSf https://astral.sh/uv/install.sh | sh
make
sudo apt install make
sudo pacman -S make
- For running GitHub Actions locally
Quick start
This will install all dependencies (uv sync
) and run the entrypoint script:
uv run uv-demo
Make targets
make
# equivalent to make install test
make install
# runs uv sync
make test
# runs tests for supported python versions
make serve-coverage
# serves coverage report on localhost:8000
make gact
# runs GitHub Actions locally with gh-act
#
# >>> WARNING: if the secrets file has a valid API key,
# this target will actually publish the package to PyPI.
#
# Install with: gh extension install nektos/gh-act
# or see https://github.com/nektos/act
make clean
# removes all venv, tox, cache, and generated files
make update
# updates uv and pre-commit hooks
make publish
# publishes the package to PyPI
#
# >>> WARNING: if the secrets file has a valid API key,
# this target will actually publish the package to PyPI.
Integration with GitHub Actions
See the Upload Python Package workflow file for this package.
Running actions locally
You can use act
to run GitHub Actions locally. Use cases:
- While writing a workflow, to test the workflow locally before pushing to the repository.
- Run the publishing workflow without setting secrets on GitHub.
- Before opening a pull request, to check the workflow will pass.
Copy the example secrets file and edit it with the required secrets:
cp config/secrets.env.example config/secrets.env
Then run make gact
to run the GitHub Actions workflow locally.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file uv_demo-0.2.5.tar.gz
.
File metadata
- Download URL: uv_demo-0.2.5.tar.gz
- Upload date:
- Size: 47.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbc9351c875b8779dcea52698d1235ca50d1298f88b02ab8ffbb1363eca9e561 |
|
MD5 | 55f27ccd0788f5bec7901bc5f4937d86 |
|
BLAKE2b-256 | 7b1c5183dc65a5cef63007e8d9faa82def4cc4f200b62678cd593198d2fcbac7 |
Provenance
The following attestation bundles were made for uv_demo-0.2.5.tar.gz
:
Publisher:
python-publish.yaml
on lucaspar/uv-demo
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
uv_demo-0.2.5.tar.gz
- Subject digest:
dbc9351c875b8779dcea52698d1235ca50d1298f88b02ab8ffbb1363eca9e561
- Sigstore transparency entry: 146058954
- Sigstore integration time:
- Predicate type:
File details
Details for the file uv_demo-0.2.5-py3-none-any.whl
.
File metadata
- Download URL: uv_demo-0.2.5-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0412467bbec8389ccab11bcbe7d8707007037859bf81f2245f4a6dca3b7136f4 |
|
MD5 | 7736ffe93f4e83528a69f534db97ff01 |
|
BLAKE2b-256 | c83140bfa4e7647e8a088e14070925e68bfdf68f829123490d4be7354b445acd |
Provenance
The following attestation bundles were made for uv_demo-0.2.5-py3-none-any.whl
:
Publisher:
python-publish.yaml
on lucaspar/uv-demo
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
uv_demo-0.2.5-py3-none-any.whl
- Subject digest:
0412467bbec8389ccab11bcbe7d8707007037859bf81f2245f4a6dca3b7136f4
- Sigstore transparency entry: 146058955
- Sigstore integration time:
- Predicate type: