Skip to main content

RepoLib is a Python library and CLI tool-set for managing your software system software repositories. It’s currently set up to handle APT repositories on Debian-based linux distributions.

RepoLib is intended to operate on DEB822-format sources. It aims to provide feature parity with software-properties for most commonly used functions.

Documentation

Documentation is available online at Read The Docs.

Basic CLI Usage

RepoLib includes a CLI program for managing software repositories, apt-manage .

Usage is divided into subcommands for most tasks. Currently implemented commands are:

apt-manage add # Adds repositories to the system apt-manage list # Lists configuration details of repositories

Additional information is available with the built-in help:

apt-manage –help

Add

Apt-manage allows entering a URL for a repository, a complete debian line, or a Launchpad PPA shortcut (e.g. “ppa:user/repo”). It also adds signing keys for PPA style repositories automatically.

List

With no options, it outputs a list of the currently configured repositories on the system (all those found in /etc/apt/sources.list.d/ . With a configured repository as an argument, it outputs the configuration details of the specified repository.

Remove

Accepts one repository as an argument. Removes the specified repository.

NOTE: The system repository (/etc/at/sources.list.d/system.sources) cannot be removed.

Source

Allows enabling or disabling source code for the given repository.

Modify

Allows changing configuration details of a given repository

Installation

From System Package Manager

If your operating system packages repolib, you can install it by running:

sudo apt install python3-repolib

Uninstall

To uninstall, simply do:

sudo apt remove python3-repolib

From PyPI

Repolib is available on PyPI. You can install it for your current user with:

pip3 install repolib

Alternatively, you can install it system-wide using:

sudo pip3 install repolib

Uninstall

To uninstall, simply do:

sudo pip3 uninstall repolib

From Git

First, clone the git repository onto your local system:

git clone https://github.com/isantop/repolib
cd repolib

Debian

On debian based distributions, you can build a .deb package locally and install it onto your system. You will need the following build-dependencies:

  • debhelper (>=11)

  • dh-python

  • python3-all

  • python3-setuptools

You can use this command to install these all in one go:

sudo apt install debhelper dh-python python3-all python3-setuptools

Then build and install the package:

debuild -us -uc
cd ..
sudo dpkg -i python3-repolib_*.deb

Uninstall

To uninstall, simply do:

sudo apt remove python3-repolib

setuptools setup.py

You can build and install the package using python3-setuptools. First, install the dependencies:

sudo apt install python3-all python3-setuptools

Then build and install the package:

sudo python3 ./setup.py install

Uninstall

You can uninstall RepoLib by removing the following files/directories:

  • /usr/local/lib/python3.7/dist-packages/repolib/

  • /usr/local/lib/python3.7/dist-packages/repolib-*.egg-info

  • /usr/local/bin/apt-manage

This command will remove all of these for you:

sudo rm -r /usr/local/lib/python3.7/dist-packages/repolib* /usr/local/bin/apt-manage

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repolib-1.5.1.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

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

repolib-1.5.1-py3-none-any.whl (65.5 kB view details)

Uploaded Python 3

File details

Details for the file repolib-1.5.1.tar.gz.

File metadata

  • Download URL: repolib-1.5.1.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.6

File hashes

Hashes for repolib-1.5.1.tar.gz
Algorithm Hash digest
SHA256 ff99aa7c46cce93cdb6f663165b77c32722132561f25f831a4ead938b2aae94b
MD5 a1be2c6afc105dc70a71b60f042e17ea
BLAKE2b-256 b5159c766ceb30834f473c73d3fe34e07b8b074248cb2d7dbc35828ba6c943df

See more details on using hashes here.

File details

Details for the file repolib-1.5.1-py3-none-any.whl.

File metadata

  • Download URL: repolib-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 65.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.6

File hashes

Hashes for repolib-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e08e7f2d155c7e90ccdb37d64ea45127486b057185bf982141e3489025301a1e
MD5 836ff84ea93e7079576079c824d9e2bd
BLAKE2b-256 ed4bbf65d3ebf89c0539912576949a8b4e8564db71d2f5809c3c3a5797f736b5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.5.1 This release

2 files

1.5.0

2 files

1.0.0

2 files

0.0.8

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page