Skip to main content

Interface with Debian APT package repositories.

Project description

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

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

libapt-1.0.0.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libapt-1.0.0-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

Details for the file libapt-1.0.0.tar.gz.

File metadata

  • Download URL: libapt-1.0.0.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for libapt-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a666cca552c9cd43a23cacad7bee8a774f3afe08c247efe46f51bdc3aff2d835
MD5 ad66c37251b3a328a32d1920e8829ef9
BLAKE2b-256 dcdee5e52b70c146b4738673d3f8fa727f452a96f1c245e331b77a02867663c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for libapt-1.0.0.tar.gz:

Publisher: publish-to-test-pypi.yml on eLiSCHe/libapt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libapt-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: libapt-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for libapt-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67b77f636418b7be3b02c864cfd917eaefb2039e1ac444cd9f0220112bb30548
MD5 1b446daad696a29f86566c13ca3e49d7
BLAKE2b-256 3da5d464363c369c8277e55e7d1bf02d40f40231068060fb7f2c011da1b2da07

See more details on using hashes here.

Provenance

The following attestation bundles were made for libapt-1.0.0-py3-none-any.whl:

Publisher: publish-to-test-pypi.yml on eLiSCHe/libapt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page