Skip to main content

Python bindings for the Rust-based ALPM project

Project description

python-alpm

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

We are currently awaiting decision from PyPI maintainers to allow us to publish this package under the name alpm. Until then, we are using the name python-alpm. You can view the support ticket here.

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.

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

python_alpm-0.4.2.tar.gz (314.8 kB view details)

Uploaded Source

Built Distributions

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

python_alpm-0.4.2-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl (869.5 kB view details)

Uploaded PyPymanylinux: glibc 2.31+ riscv64

python_alpm-0.4.2-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

python_alpm-0.4.2-cp314-cp314t-manylinux_2_31_riscv64.whl (870.2 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.31+ riscv64

python_alpm-0.4.2-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ ARM64

python_alpm-0.4.2-cp313-cp313t-manylinux_2_31_riscv64.whl (870.2 kB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.31+ riscv64

python_alpm-0.4.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARM64

python_alpm-0.4.2-cp310-abi3-manylinux_2_31_riscv64.whl (872.1 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.31+ riscv64

python_alpm-0.4.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

python_alpm-0.4.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

File details

Details for the file python_alpm-0.4.2.tar.gz.

File metadata

  • Download URL: python_alpm-0.4.2.tar.gz
  • Upload date:
  • Size: 314.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20260317.0.501684","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for python_alpm-0.4.2.tar.gz
Algorithm Hash digest
SHA256 4e42df9a597e976289ce19ced0ce04288ed20b04b2ead51ec5548687a44594c9
MD5 5bbb465cb28e29233b4bc1797baf39f4
BLAKE2b-256 3deec11eafb57c586741dabc5ada8292dc504a1cb7af00ea38415de56228ea7e

See more details on using hashes here.

File details

Details for the file python_alpm-0.4.2-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl.

File metadata

  • Download URL: python_alpm-0.4.2-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl
  • Upload date:
  • Size: 869.5 kB
  • Tags: PyPy, manylinux: glibc 2.31+ riscv64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20260317.0.501684","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for python_alpm-0.4.2-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl
Algorithm Hash digest
SHA256 579ebeece6bd09348c9273df146147dc00ab1604464b371ea57d96f7db3ca82b
MD5 8e89e0b4904c7661368edb500078ecd8
BLAKE2b-256 0c0f00c7ae8efe8394b3a5ea2339a59fb91c0b2d149dfbbbc8e1b1eda4db4265

See more details on using hashes here.

File details

Details for the file python_alpm-0.4.2-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: python_alpm-0.4.2-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: PyPy, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20260317.0.501684","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for python_alpm-0.4.2-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6e3b05d1fab0e4900d113181aad77de83039151d9c59969182231d9465a81ec1
MD5 43f0a322ce8db5b864bd3c02fdf7836e
BLAKE2b-256 60a525bb2fa7ea455fc0e02453d69e700a97d715b6319fbad79caa976f3d0ccf

See more details on using hashes here.

File details

Details for the file python_alpm-0.4.2-cp314-cp314t-manylinux_2_31_riscv64.whl.

File metadata

  • Download URL: python_alpm-0.4.2-cp314-cp314t-manylinux_2_31_riscv64.whl
  • Upload date:
  • Size: 870.2 kB
  • Tags: CPython 3.14t, manylinux: glibc 2.31+ riscv64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20260317.0.501684","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for python_alpm-0.4.2-cp314-cp314t-manylinux_2_31_riscv64.whl
Algorithm Hash digest
SHA256 1d25ecc8d921e0a9c147bce7072dd22643220d6011abb690ceb00f0ca04df476
MD5 fb3852bf867efc6c2bc078376d33c4d6
BLAKE2b-256 cb07f9c10f85f0cbec24f294a7bc7fa0264f601bbeafce8b1774efc0a6297470

See more details on using hashes here.

File details

Details for the file python_alpm-0.4.2-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: python_alpm-0.4.2-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.14t, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20260317.0.501684","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for python_alpm-0.4.2-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 642f638254822a91e690cc06794e93aa6821da7b68ba20a42173a3bb41173be0
MD5 63476086af1b9dff380e93cf0aea36ee
BLAKE2b-256 55dc6ba669dadb0f93e9b0648aa4c80c51211947fada9cab9fe9aeabc0cc1a71

See more details on using hashes here.

File details

Details for the file python_alpm-0.4.2-cp313-cp313t-manylinux_2_31_riscv64.whl.

File metadata

  • Download URL: python_alpm-0.4.2-cp313-cp313t-manylinux_2_31_riscv64.whl
  • Upload date:
  • Size: 870.2 kB
  • Tags: CPython 3.13t, manylinux: glibc 2.31+ riscv64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20260317.0.501684","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for python_alpm-0.4.2-cp313-cp313t-manylinux_2_31_riscv64.whl
Algorithm Hash digest
SHA256 026eca84231503c0d08ad69d4bde7ba563fd8aba5e1586fd639a035604f323f9
MD5 9c23062a03b3248864e8c522d1eace62
BLAKE2b-256 15a2ab14eb37a662db0a92dc69007877a11eecc6b06503ea2d9b5b64a0cd2166

See more details on using hashes here.

File details

Details for the file python_alpm-0.4.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: python_alpm-0.4.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.13t, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20260317.0.501684","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for python_alpm-0.4.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 319de708a015012b0ca3bc929ee6ea1c8da15abd157fd62605db73b99314ef32
MD5 df83b95d140cc0114d199dd9383be479
BLAKE2b-256 9ca4dcc521760a1e757cc6e3ea9c17bf3fa37914b751f27e3a520806a36c608b

See more details on using hashes here.

File details

Details for the file python_alpm-0.4.2-cp310-abi3-manylinux_2_31_riscv64.whl.

File metadata

  • Download URL: python_alpm-0.4.2-cp310-abi3-manylinux_2_31_riscv64.whl
  • Upload date:
  • Size: 872.1 kB
  • Tags: CPython 3.10+, manylinux: glibc 2.31+ riscv64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20260317.0.501684","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for python_alpm-0.4.2-cp310-abi3-manylinux_2_31_riscv64.whl
Algorithm Hash digest
SHA256 d67cc5ad36605a325e11923557ca990cb1f95fcbbfffeb35441c7e176b70fbd6
MD5 b9572a1df3b56529e40c33694ae865d1
BLAKE2b-256 2a8bbeb84967bbcb3fbe146a5eb30c6c6c112c63310a39179f190c5648892484

See more details on using hashes here.

File details

Details for the file python_alpm-0.4.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: python_alpm-0.4.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20260317.0.501684","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for python_alpm-0.4.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd538d8c8db3be24d44a43f1605009e10c7d29450d6e3fac0c0188a85a7c7e89
MD5 fda6d46536c0248d044c0b779335c63c
BLAKE2b-256 0d33cd42c9de5ad76db6a3bc5730930061d066be09f9435426e1fe2e88dcded9

See more details on using hashes here.

File details

Details for the file python_alpm-0.4.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: python_alpm-0.4.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":"20260317.0.501684","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for python_alpm-0.4.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 00560613ff7ab0ff90405f9e85df20011de1557a63c234018b854a2afa52e2b8
MD5 218e76a92ee4e190fa75305104c30356
BLAKE2b-256 cf8a52f69310880610ef8ed412750d33c0f103cc8d1950d9bc8812914f156d0c

See more details on using hashes here.

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