libapt
Libapt provides a cross-platform pure Python interface for interacting with Debian APT repositories.
Libapt allows parsing the metadata of an apt repository, see libapt.pool.Pool.update.
When the metadata was downloaded and parsed, you can:
- List all Debian binary and source packages.
- Search for a Debian binary and source packages.
- Download the binary and source packages.
- Extract the metadata form Debian binary packages.
- Extract the content of Debian binary packages.
The primary API is Pool from libapt.pool.
The primary data structure for configuring APT repositories is AptConfig from libapt.apt.
For more details see docs/index.rst or https://elische.github.io/libapt/.
Example
The folder example contains an example app using libapt.
Try the example:
- Setup uv
- Run the example:
uv run python example/main.py
Contribute
This library makes use of uv and ruff.
Use the following steps to prepare your development environment:
- Prepare a virtual environment and install development dependencies:
uv sync - Activate the virtual environment:
source .venv/bin/activate
Please test your changes locally before raising and PR using ./test.sh all
Metadata
Release files for libapt 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| libapt-1.0.1.tar.gz | 4.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| libapt-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.2 MB
Release files / libapt-1.0.1.tar.gz
| Download URL | libapt-1.0.1.tar.gz |
|---|---|
| Size | 4.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b6e17381c0742d37e742aef505c40036434f3711d3ce4b454fac44504e87610
|
|
BLAKE2b-256 checksum How to use checksums |
dcde3acfdd28e33b393f20f502f79d9c3b5bd4e1df4430a5b38ab7f6e8f48e26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 16, 2025.
Transparency logRelease files / libapt-1.0.1-py3-none-any.whl
| Download URL | libapt-1.0.1-py3-none-any.whl |
|---|---|
| Size | 34.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
127e08c645e83da02f79505bc4cc0413bf5df9ec145d502f7d05718ee1addc24
|
|
BLAKE2b-256 checksum How to use checksums |
22b317ebd8609e1ec785000df23749bd42ce8d95698c80d5135432eebeaf0f7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 16, 2025.
Transparency log