Python libraries to assist with writing Linux Ops scripts.
Project description
OpScripts
Python libraries to assist with writing Linux Ops scripts.
Python Compatibility
This library currently requires compatibility with:
2.6
2.7
3.4
However, additional versions are tested automatically:
API Versioning
Each module is versioned so that they can undergo significant changes without impacting the function and stability of the scripts that use them.
For example:
from opscripts.config import v6 as ops_config from opscripts.logging import v2 as ops_logging from opscripts.utils import v8 as ops_utils
For a more in-depth examples, see the:
Dependencies
opscripts.config
opscripts.yaml
ordereddict (only required by Python 2.6)
Unit Tests
mock (only required by Python < 3.3)
Testing Quick Start
Change directory into repository (into same directory as where this README resides).
Install virtual environment:
mkvirtualenv -a . -r tests/requirements.txt opscripts_test
If installing requirements errors, update pip:
pip install --upgrade pip
Install requirements:
pip install -r tests/requirements.txt
Run pytest:
py.test
To test against alternate Python versions, it may be useful to create virtual environments with an interpreter other than the one with which virtualenv was installed, e.g. for non-default python3:
mkvirtualenv -a . -p $(which python3) -r tests/requirements.txt opscripts_test3
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.