Skip to main content

python-alpm

Python bindings for the Arch Linux Package Management (ALPM) project.

Documentation

Latest documentation is available at https://alpm.archlinux.page/pdoc.

Installation

pip install python-alpm

Examples

Validating and comparing versions

>>> from alpm.alpm_types import PackageVersion, PackageRelease, FullVersion, SchemaVersion

>>> full_version = FullVersion(
...     pkgver=PackageVersion("0.1.0alpha"), pkgrel=PackageRelease(minor=1)
... )
>>> full_version
FullVersion(pkgver=PackageVersion('0.1.0alpha'), pkgrel=PackageRelease(major=0, minor=1))

>>> PackageVersion("1.0.1") > full_version.pkgver
True

>>> version_one = SchemaVersion.from_str("1.0.0")
>>> version_one
SchemaVersion(major=1, minor=0, patch=0, pre='', build='')

>>> version_one == SchemaVersion(major=1)
True

Parsing .SRCINFO

>>> from alpm.alpm_srcinfo import SourceInfoV1
>>> from alpm.alpm_types import Architecture

>>> srcinfo = SourceInfoV1.from_file("../alpm-srcinfo/tests/correct/all_overrides.srcinfo")

>>> srcinfo.base
PackageBase(name='example', version=FullVersion(pkgver=PackageVersion('0.1.0'), pkgrel=PackageRelease(major=1), epoch=1))

>>> srcinfo.base.architectures
Architectures([Architecture('x86_64'), Architecture('aarch64')])

>>> srcinfo.packages
[Package(name='example')]

>>> srcinfo.packages_for_architecture(Architecture("aarch64"))
[MergedPackage(architecture=Architecture('aarch64'), name='example', version=FullVersion(pkgver=PackageVersion('0.1.0'), pkgrel=PackageRelease(major=1), epoch=1))]

Working with package metadata

>>> from alpm.alpm_srcinfo.source_info.v1.package import Package, Override
>>> from alpm.alpm_types import License

>>> pkg = Package("testpkg")

>>> pkg.description = Override("A test package")
>>> pkg.description
Override(value='A test package')

>>> pkg.licenses = Override([License("MIT"), License("custom-license")])
>>> pkg.licenses
Override(value=[License('MIT'), License('custom-license')])

>>> {str(lic): lic.is_spdx for lic in pkg.licenses.value}
{'MIT': True, 'custom-license': False}

Contributing

Please refer to the contribution guidelines to learn how to contribute to this project.

License

This project can be used under the terms of the Apache-2.0 or MIT. Contributions to this project, unless noted otherwise, are automatically licensed under the terms of both of those licenses.

Metadata

Release files for python-alpm 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-alpm 0.6.0
File Size Uploaded Provenance Actions
python_alpm-0.6.0.tar.gz 367.4 kB Without provenance Details for python_alpm-0.6.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for python-alpm 0.6.0
File Interpreter ABI Platform Actions
python_alpm-0.6.0-cp310-abi3-manylinux_2_31_riscv64.whl CPython 3.10 abi3 Linux glibc 2.31+ RISC-V 64 Details for python_alpm-0.6.0-cp310-abi3-manylinux_2_31_riscv64.whl
python_alpm-0.6.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for python_alpm-0.6.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
python_alpm-0.6.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for python_alpm-0.6.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Total release size: 3.2 MB

Release files / python_alpm-0.6.0.tar.gz

Download URL python_alpm-0.6.0.tar.gz
Size 367.4 kB
Tags Source
SHA-256 checksum
How to use checksums
980789f7e5c0474dc7bb23ab3a7d8ad903f11cff768e3f8898902651e83ef802
BLAKE2b-256 checksum
How to use checksums
1899032cb76dda1ac65a8c89507ed70b29e492d6a02597ecadf03bab3142ab39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20261014.0.610722","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / python_alpm-0.6.0-cp310-abi3-manylinux_2_31_riscv64.whl

Download URL python_alpm-0.6.0-cp310-abi3-manylinux_2_31_riscv64.whl
Size 926.7 kB
Tags CPython 3.10 Linux glibc 2.31+ RISC-V 64 abi3
SHA-256 checksum
How to use checksums
ce41408d1e625e213286872725e285a5d172065867922acba96482a0cb3f33e1
BLAKE2b-256 checksum
How to use checksums
a4b1c86785d6160da8f4b7daa1cb4fd1591512c995c09279573b721a9e4971d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20261014.0.610722","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / python_alpm-0.6.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL python_alpm-0.6.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 930.5 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
7eba04a904a1f1384afe1125424762a83f99f2790bfc2ff5996b90c3513641e1
BLAKE2b-256 checksum
How to use checksums
9518d67747325f937522f9d0c83131bc74465296a635146beb6c5477055eb774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20261014.0.610722","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / python_alpm-0.6.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL python_alpm-0.6.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 938.5 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
f8cf5ce3a625e096704b5294ec03c6c69cccf95bfffed7e5ef914a6ea21aba73
BLAKE2b-256 checksum
How to use checksums
864d1374722d50319fec69c3e18041b8604137f46fa37804fb1f2c7a69daa563
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20261014.0.610722","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for python-alpm 0.6.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page