Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/memdealer/yarl-yetanotherrancherlibrary
Another attempt to make a rancher compatible library for python 3, which supports 2-beta.
https://github.com/memdealer/yarl-yetanotherrancherlibrary
library python3 rancher rancher2
Last synced: about 1 month ago
JSON representation
Another attempt to make a rancher compatible library for python 3, which supports 2-beta.
- Host: GitHub
- URL: https://github.com/memdealer/yarl-yetanotherrancherlibrary
- Owner: memdealer
- License: agpl-3.0
- Created: 2020-07-18T21:55:45.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T11:33:06.000Z (about 2 years ago)
- Last Synced: 2024-12-16T06:35:38.796Z (about 1 month ago)
- Topics: library, python3, rancher, rancher2
- Language: Python
- Homepage:
- Size: 38.1 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YARL-YetAnotherRancherLibrary
Yet another attempt to make a rancher compatible library for python 3, which supports 2-beta.## This lib presents two classes:
### RancherCow - which is a main class for interferring with rancher. I'm updating it once I need new methods.
### RancherAuthToken - This class contains methods to control(spawn/delete/disable) API keys for an environment if you wish so, using your admin credentials.Usage:
```
from RancherCow import RancherCow
from RancherAuthToken import RancherAuthToken# initialize class
rauth = RancherAuthToken("htttp(s)//blah.com:8080", "login", "pass")
# unpack sc,ac,key_id
_secret_key, _acccess_key, _key_id = rauth.generate_api_token(name="foo", description="bar")# initialize class
rancher = RancherCow('http(s)://blah.com:8080', "_acccess_key", "_secret_key", "rancher_env")
rancher.get_status_of_container(i1ad)# remove key_id if neccessary
rauth.deactivate_api_token(_key_id)
rauth.delete_api_token(_key_id)
```Alternatively, you can install it via PIP:
pip install rancher-yarl==0.3