Binary file wrapper
Project description
py-wrappers
Python wrapper for binary files
Usage
import wrapper
class Helm(wrapper.ExecWrapper):
"""
helm binary wrapper
helm = Helm(o='json')
resp = helm.ls() => `helm ls -o=json`
resp.raise_for_status()
print(resp.json)
helm = Helm()
helm.repo.add.bitnami('https://charts.bitnami.com/bitnami')
helm = Helm()
resp = helm.upgrade.redis('bitnami/redis', install=None, o='json')
# helm upgrade redis bitnami/redis --install -o json
# or same
resp = helm('upgrade', 'redis', 'bitnami/redis', '--install', o='json')
# helm upgrade redis bitnami/redis --install -o json
# or
resp = helm.upgrade.redis('bitnami/redis', i=None, o='json')
# helm upgrade redis bitnami/redis -i -o json
"""
def __init__(self, **kwargs):
super().__init__('helm', **kwargs)
def __getattr__(self, item):
h = Helm(**self._parent_kwargs)
h._parent_attrs = self._parent_attrs.copy()
h._parent_attrs.append(item.replace('_', '-', -1))
return h
def _pre(self, args, kwargs):
ns = kwargs.pop('n', None)
if ns:
kwargs.setdefault('namespace', ns)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file bin_wrapper-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: bin_wrapper-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 060001a51473b05edea9b7a48865d55bc0d860c0968e0df9ea62acda0c110805 |
|
MD5 | cfb6fa643b2956f807fba1eef5f53330 |
|
BLAKE2b-256 | 7adb656f491e726c9cf36ad03acc2fdabc2b6005bb9f64a2d8c832369733ede5 |