Yeti-web Admin API SDK
Project description
Yeti-web Admin API SDK
The documentation for the Yeti-web Admin API can be found here.
Installation
Install from PyPi using pip, a package manager for Python.
pip3 install yeti-switch-api
Or download source code and run:
python3 setup.py install
Usage
import yeti_switch_api
yeti_switch_api.orm.OrmClient({
'API_ROOT': 'https://myhost.com/api/rest/admin',
'AUTH_CREDS': {
'login': 'mylogin',
'password': 'mypassword',
},
'VALIDATE_SSL': True,
'TIMEOUT': 10,
})
# refresh auth token in any time
yeti_switch_api.orm.OrmClient.auth.refresh_token()
# use the api
found_contractors = yeti_switch_api.orm.Contractor.get_list()
See examples/ for detailed usage examples.
Development
Requirements
pipenv can be installed via apt install pipenv
Python 3.7+
Install dependencies
pipenv install --dev
Lint with flake8
pipenv run python -m flake8 . --count --show-source --statistics
Fix code format with Black
pipenv run python -m black .
Release
Change __version_info__ in yeti_switch_api/__init__.py
Build package
pipenv run python setup.py sdist
pipenv run python setup.py bdist_wheel
As result you will have files:
dist/yeti_switch_api-<VERSION>.tar.gz
dist/yeti_switch_api-<VERSION>-py3-none-any.whl
Check package
pipenv run python -m twine check dist/*
Upload package to pypi
pipenv run python -m twine upload dist/*
Notes: see this guide how to set up pypi account
Upload package to test pypi
pipenv run python -m twine upload -r testpypi dist/*
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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yeti_switch_api-1.2.1.tar.gz.
File metadata
- Download URL: yeti_switch_api-1.2.1.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
122da687d97ed513cfa916bc69be47d677d23048c299a5dad1cf4fa52c1558ff
|
|
| MD5 |
98e8d754dc5dd987a820919710047f42
|
|
| BLAKE2b-256 |
38e0986fb992622cbac9a200f163af7170bf24eaeab72ec07239ac2615f843b0
|
Provenance
The following attestation bundles were made for yeti_switch_api-1.2.1.tar.gz:
Publisher:
pypi_release.yml on yeti-switch/yeti-switch-api-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yeti_switch_api-1.2.1.tar.gz -
Subject digest:
122da687d97ed513cfa916bc69be47d677d23048c299a5dad1cf4fa52c1558ff - Sigstore transparency entry: 439805911
- Sigstore integration time:
-
Permalink:
yeti-switch/yeti-switch-api-python@48c263c2d3d19c6767a09f700c1f7d5dd24f3aa8 -
Branch / Tag:
refs/tags/1.2.1 - Owner: https://github.com/yeti-switch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_release.yml@48c263c2d3d19c6767a09f700c1f7d5dd24f3aa8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file yeti_switch_api-1.2.1-py3-none-any.whl.
File metadata
- Download URL: yeti_switch_api-1.2.1-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b76b40995be5c6e1b5a26fe6503dc41a72b3517291f44ff0eef01c544677affb
|
|
| MD5 |
571e7ff2ef79a8a383d614b2a1bef789
|
|
| BLAKE2b-256 |
6f073f14aa01b64bf6e04d56278b797da3fca400bb16b770ec046c14274276cc
|
Provenance
The following attestation bundles were made for yeti_switch_api-1.2.1-py3-none-any.whl:
Publisher:
pypi_release.yml on yeti-switch/yeti-switch-api-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yeti_switch_api-1.2.1-py3-none-any.whl -
Subject digest:
b76b40995be5c6e1b5a26fe6503dc41a72b3517291f44ff0eef01c544677affb - Sigstore transparency entry: 439805924
- Sigstore integration time:
-
Permalink:
yeti-switch/yeti-switch-api-python@48c263c2d3d19c6767a09f700c1f7d5dd24f3aa8 -
Branch / Tag:
refs/tags/1.2.1 - Owner: https://github.com/yeti-switch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_release.yml@48c263c2d3d19c6767a09f700c1f7d5dd24f3aa8 -
Trigger Event:
release
-
Statement type: