https://github.com/brennerm/python-apt-repo
Python library to query APT repositories
https://github.com/brennerm/python-apt-repo
apt apt-get library
Last synced: 3 months ago
JSON representation
Python library to query APT repositories
- Host: GitHub
- URL: https://github.com/brennerm/python-apt-repo
- Owner: brennerm
- License: mit
- Created: 2018-07-17T13:52:23.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-06T07:05:12.000Z (almost 2 years ago)
- Last Synced: 2025-09-27T05:25:46.834Z (8 months ago)
- Topics: apt, apt-get, library
- Language: Python
- Homepage: https://shipit.dev/python-apt-repo/
- Size: 5.07 MB
- Stars: 13
- Watchers: 2
- Forks: 12
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python-apt-repo [](https://travis-ci.org/brennerm/python-apt-repo)
Python library to query APT repositories.
## Example
```python
from apt_repo import APTSources, APTRepository
url = 'http://archive.ubuntu.com/ubuntu'
components = ['main', 'universe', 'multiverse', 'restricted']
sources = APTSources([
APTRepository(url, 'xenial', components),
APTRepository(url, 'xenial-updates', components),
APTRepository(url, 'xenial-backports', components),
APTRepository(url, 'xenial-proposed', components)
])
print([(package.package, package.version) for package in sources.get_packages_by_name('docker.io')])
[('docker.io', '1.10.3-0ubuntu6'), ('docker.io', '1.13.1-0ubuntu1~16.04.2'), ('docker.io', '17.03.2-0ubuntu2~16.04.1')]
```
## [API Documentation](https://brennerm.github.io/python-apt-repo/apt_repo/)