# fabric-package-management
As the name implies, fabric-package-management is a collection of [Fabric](http://www.fabfile.org/)
tasks for package management. There's nothing too fancy going on here. It's aim is to simply not
have to copy and paste similar convenience functions into many a Fabfile.
[](https://travis-ci.org/andrewsomething/fabric-package-management) [](http://fabric-package-management.readthedocs.io/en/latest/) [](https://codecov.io/gh/andrewsomething/fabric-package-management) [](https://pypi.python.org/pypi/fabric-package-management)
## Example:
```py
#!/usr/bin/python
from fabric.api import task, prompt, env
from fabric.context_managers import cd
from fabric.operations import reboot
from fabric_package_managment import apt
@task()
def run():
apt.update()
apt.upgrade()
apt.install(['bpython', 'git'])
with cd('/tmp'):
apt.source("python-libcloud", download_only=True)
apt.remove('bpython', purge=True)
apt.autoremove()
apt.autoclean()
if apt.reboot_required():
prompt("Reboot required. Initiate now?\nYes/No?",
"response",
default="No",
validate=r'yes|Yes|YES|no|No|NO')
if env.response.lower() == "yes":
reboot()
```
As the name implies, fabric-package-management is a collection of [Fabric](http://www.fabfile.org/)
tasks for package management. There's nothing too fancy going on here. It's aim is to simply not
have to copy and paste similar convenience functions into many a Fabfile.
[](https://travis-ci.org/andrewsomething/fabric-package-management) [](http://fabric-package-management.readthedocs.io/en/latest/) [](https://codecov.io/gh/andrewsomething/fabric-package-management) [](https://pypi.python.org/pypi/fabric-package-management)
## Example:
```py
#!/usr/bin/python
from fabric.api import task, prompt, env
from fabric.context_managers import cd
from fabric.operations import reboot
from fabric_package_managment import apt
@task()
def run():
apt.update()
apt.upgrade()
apt.install(['bpython', 'git'])
with cd('/tmp'):
apt.source("python-libcloud", download_only=True)
apt.remove('bpython', purge=True)
apt.autoremove()
apt.autoclean()
if apt.reboot_required():
prompt("Reboot required. Initiate now?\nYes/No?",
"response",
default="No",
validate=r'yes|Yes|YES|no|No|NO')
if env.response.lower() == "yes":
reboot()
```
Release files for fabric-package-management 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fabric_package_management-0.1.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
| fabric_package_management-0.1.2-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 15.0 kB
Release files / fabric_package_management-0.1.2-py2.py3-none-any.whl
| Download URL | fabric_package_management-0.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a7f9f05f9b5333b83892ec2772b9df53899d12ac5c4a0bd5bbec3ec22adaee0f
|
|
BLAKE2b-256 checksum How to use checksums |
16c860a013fe0d21ca5f25e65d23bbf1759ef27b129518247aca27b5b3213574
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / fabric_package_management-0.1.2-py2-none-any.whl
| Download URL | fabric_package_management-0.1.2-py2-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
de14b3e6b99da50d532f52acc1e2406dbc23726a315fe15ff3a9052a4e177aa6
|
|
BLAKE2b-256 checksum How to use checksums |
7efbcd8564e048d0f3a24a51adef28fe5cce13fa5a8826e5353c5d8b2453b623
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |