Skip to content

hemslo/sretoolbox

 
 

Repository files navigation

SRE Toolbox

Set of libraries commonly used by multiple SRE projects:

  • container.Image: class for container image inspection.
  • container.Skopeo: wrapper around Skopeo.
  • utils.replace_values: deep replace of object values according to values map.
  • utils.retry: decorator to add resilience to function calls.

Install

From PyPI:

$ pip install sretoolbox

From source:

$ python setup.py install

Use

Just import the library you want. Example:

>>> from sretoolbox import container
>>> image = container.Image('fedora')
>>> if image:
...     print('Image exists!')
...
Image exists!
>>>

Develop

Install the development requirements:

$  make develop

Run the code checks and tests:

$  make check

Release

Edit the VERSION file and change the new version. Submit a pull request to master. When it is merged, create a tag and push it to app-sre/sretoolbox.

This will trigger a CI job that will publish the package on pypi.

License

The default license of the code in this repository is [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). That applies for most of the code here, as they were written from scratch, but exceptions exist. In any case, each module carries the corresponding licensing information.

About

Set of libraries commonly used by multiple SRE projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.4%
  • Other 1.6%