This is a simple program that simplifies the usage of apt declaratively, scripts are easier now!
Import Apt class
from apt import Apt
Create an object from Apt class
update = Apt(option="rup", assume_yes=False)
Call the exec() method
update.exec()
Easy! You just updated your repos.
Use this then
apt_in = Apt(option="in", assume_yes=False)
And now use
apt_in.change("gimp")
That installs gimp.
If you want to remove a package it's the same syntax as before but pass "rm" to option argument instead.
For multiple packages pass a string like this "package1 package2 package3"
Just change the assume_yes argument to True, simple.
up
: Updates packages(sudo apt upgrade
)dup
: Updates every package(sudo apt full-upgrade
)li
: Lists every package(sudo apt list
) Probably someday I will extend this one
Use exec() method for these ones. For rm
and in
use change(packages)