Skip to main content

Yeti-web Admin API SDK

Project description

Yeti-web Admin API SDK

tests workflow

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yeti_switch_api-1.2.2.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yeti_switch_api-1.2.2-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file yeti_switch_api-1.2.2.tar.gz.

File metadata

  • Download URL: yeti_switch_api-1.2.2.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yeti_switch_api-1.2.2.tar.gz
Algorithm Hash digest
SHA256 934fed4e0652cc558d9b1e0b99795e52b842d0278db4e5f0523524e48c78ea19
MD5 bdaa685e24c8167c41bf28f741c63c8a
BLAKE2b-256 2a4b84e12f75fe34d039451e11cafe54d880212358197ea604b52d2afb35bd9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for yeti_switch_api-1.2.2.tar.gz:

Publisher: pypi_release.yml on yeti-switch/yeti-switch-api-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file yeti_switch_api-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for yeti_switch_api-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7f7d20a7d28c1d8bb2b44fe743b86e2dcc41820b53c3e948dfee0beaf577e9ac
MD5 0c275c85e35cc3e1c0aba7375aa8a8f9
BLAKE2b-256 018de3d23c3f25df3108cd9a86a0a449c50e2796b3f2255873680a3ee2feda0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for yeti_switch_api-1.2.2-py3-none-any.whl:

Publisher: pypi_release.yml on yeti-switch/yeti-switch-api-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page