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.3.tar.gz (314.9 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.3-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl (847.1 kB view details)

Uploaded PyPymanylinux: glibc 2.31+ riscv64

python_alpm-0.4.3-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.3-cp314-cp314t-manylinux_2_31_riscv64.whl (848.0 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.31+ riscv64

python_alpm-0.4.3-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.3-cp313-cp313t-manylinux_2_31_riscv64.whl (848.0 kB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.31+ riscv64

python_alpm-0.4.3-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.3-cp310-abi3-manylinux_2_31_riscv64.whl (850.0 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.31+ riscv64

python_alpm-0.4.3-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.3-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.3.tar.gz.

File metadata

  • Download URL: python_alpm-0.4.3.tar.gz
  • Upload date:
  • Size: 314.9 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.3.tar.gz
Algorithm Hash digest
SHA256 bc9a71bd2e3659a3063865f6c71dead2feb47554ab374b1c230120650cac9406
MD5 12b0615e3edcca88d52229fab963423e
BLAKE2b-256 7af71656f797cd264692d6c79e7587cfc2cb5324c03a1924efe54cdad621ae7b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_alpm-0.4.3-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl
  • Upload date:
  • Size: 847.1 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.3-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl
Algorithm Hash digest
SHA256 faa04d051567bc29624a5357eea8008ba35fd2ab49969c8c418fe61e4279961c
MD5 f147d3720a12ca30e2f040f78d3b06e6
BLAKE2b-256 2bc4987ebdca673d8db5931840bae679baeeb1419650226158685ae1565e076b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_alpm-0.4.3-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.3-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 35c260dd23460e4150bcc5e4416e2572e229c62d4b512821870b6c6c362b16e7
MD5 596521968a14510d14d18da436e3db31
BLAKE2b-256 aaa9f0a81fafe2a6b0d6ff15fb6e2d3100980568d9ead5c10d8dceedc6c1c370

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_alpm-0.4.3-cp314-cp314t-manylinux_2_31_riscv64.whl
  • Upload date:
  • Size: 848.0 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.3-cp314-cp314t-manylinux_2_31_riscv64.whl
Algorithm Hash digest
SHA256 c89dad06357d6624625399c4682f6bfe89d0f8135e27b3a4e3cf255c0fbd5862
MD5 dafaca804d6164767871a195e957a1fc
BLAKE2b-256 d1b023af8576591af25839afa5c33baea1b6ba666da405d8d9ab932b292a7376

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_alpm-0.4.3-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.3-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 45f0f4246822dbe130083065a087f6c755e1ba4cee73b92169a62f36ac5ab613
MD5 81f88c2dc906c8264d7ff67d9f82ab16
BLAKE2b-256 81ed91015f38d4bb894d6ab20355faebdfbbaf614f67e46ffb28a1b4292b56e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_alpm-0.4.3-cp313-cp313t-manylinux_2_31_riscv64.whl
  • Upload date:
  • Size: 848.0 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.3-cp313-cp313t-manylinux_2_31_riscv64.whl
Algorithm Hash digest
SHA256 01d66e5bc925d3f0d4887467c4cec60c996c706ab7c1e45d938ab64c1f59f138
MD5 a6febf9e69d8e8c58a79ec350ff36303
BLAKE2b-256 6f07969cdab0ab83afa24532a5243f578640e64ff50ea11df05e97ce142666c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_alpm-0.4.3-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.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 58bff2c31b0e0cb25291490531d40dab117627fdac5dc1dd06a5e846391b3f9f
MD5 173f4eeb1e66ee03a7342f48596b71d2
BLAKE2b-256 a6ff3844539a4e0a1e12c96109db8e8738f0dd529021c88ce8382a9866542826

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_alpm-0.4.3-cp310-abi3-manylinux_2_31_riscv64.whl
  • Upload date:
  • Size: 850.0 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.3-cp310-abi3-manylinux_2_31_riscv64.whl
Algorithm Hash digest
SHA256 1f2df1c7e22ea244423b34b66f8e859d8d6da3c42f6632342b6f31100d0780e5
MD5 73fbcd29a9713f596fb03b40ab5db400
BLAKE2b-256 44671016e44bc81eb50ecd560f650eef82ea9871719963e0f5e114b9d2f72170

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_alpm-0.4.3-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.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ff7d38dc63573091ecd144b557c59054b9925ac554fa6e7f1a6c2e6a74164f6
MD5 507fc6633991477f9d071522659e8ab1
BLAKE2b-256 84a7f6b5bc1d01bd4e2770fec36023214231290c03922dc3ee8b6f21e27fd309

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_alpm-0.4.3-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.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0352f042f3a7317d9020a69984a30f5ed3be1ba342a4493590081a3fd45190a5
MD5 6331e712e2fdfc6df940ab398743db90
BLAKE2b-256 71b08bf4daf0c6f2cd366bceb9a224c81a4d388923da40e401c3eb41b7eef8db

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