python-aur-api
A thin client for the AUR web API
Installation
Even though the repository is called python-aur-api, you should find it by
the name aur-api in PyPI:
pip install aur-api
Usage
First, import the symbols you need from the aur package:
from aur import (
ErrorResult, InfoResult, SearchBy, SearchResult,
get_pkg_info, search_pkgbase_startswith, search_pkgname_startswith, search_pkg,
)
The package exposes four functions to interact with the AUR web API endpoints:
get_pkg_info(pkgnames: list[str]) -> InfoResult|ErrorResultsearch_pkgbase_startswith(term: str) -> list[str]search_pkgname_startswith(term: str) -> list[str]search_pkg(term: str, search_by: SearchBy) -> SearchResult|ErrorResult
All fucntions make a request to the AUR and return a well-typed result object. You can check whether you got an error with the following code:
result = get_pkg_info([]) # An empty list will fail!
if isinstance(result, ErrorResult):
print(f"The error was: {result.error}")
Check the tests/test_basic.py file for some simple examples.
Testing
You can run pytest to run the tests. Since this is a very small project, we
strive to have 100% code coverage:
pytest --cov=src --cov-report=html --cov-branch --strict-markers
Metadata
Release files for aur-api-client 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aur_api_client-1.0.0.tar.gz | 16.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aur_api_client-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.1 kB
Release files / aur_api_client-1.0.0.tar.gz
| Download URL | aur_api_client-1.0.0.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed434b2e97df2709fdb20fd1ea6721157f4686e41551245e2c2c51d9104db377
|
|
BLAKE2b-256 checksum How to use checksums |
b243b1d25ecc71b38d4d3e2b16bece35f843ee92887f3fc4d043ebd92909e583
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / aur_api_client-1.0.0-py3-none-any.whl
| Download URL | aur_api_client-1.0.0-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4694f66cf58e7d763d47576e51c64090e83ae285216699886ab1da18ca0a109b
|
|
BLAKE2b-256 checksum How to use checksums |
8d511f8828073f6d503b1cd99a6cabc8610dc0e18a56d2f9d71cc352a5e013c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for aur-api-client 1.0.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.