Skip to main content

SWToolz-Core API wrapper.

Project description

SWToolz-Core API wrapper

Make queries to Swtoolz-Core (forked from xcme/swtoolz-core) easier than ever.

Install

pip install swtoolz

Examples

Enable port 10 on switch 10.90.90.90

from swtoolz import SWToolz

swtoolz_community_number = 2
swtoolz_port = 7377

swt = SWToolz('swtoolz_url', 'swtoolz_user', swtoolz_community_number, swtoolz_port)
swt.change_port_admin_state('10.90.90.90', 10, 'enabled')

Available methods

get_port_admin_state(device_ip, port_num, media='copper')

Returns admin state of port in human-readable format ('enabled'/'disabled')

change_port_admin_state(device_ip, port_num, target_state)

Changes admin state of port to target_state ('enabled'/'disabled').

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

swtoolz-0.2.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

swtoolz-0.2.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file swtoolz-0.2.0.tar.gz.

File metadata

  • Download URL: swtoolz-0.2.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for swtoolz-0.2.0.tar.gz
Algorithm Hash digest
SHA256 165b4d571f7ce994e06f1a03486d87607726c5445263742656a631f872ec8ef3
MD5 aaa4b62f0d3f4d6527b5475033be6357
BLAKE2b-256 b84c7bcc5551d8930343fa0841c89fad59e9ea18a7a61859e886735622d0aaa6

See more details on using hashes here.

File details

Details for the file swtoolz-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: swtoolz-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for swtoolz-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acceff606c212311e105259488959e98aa17be4b0ea02c4883eb3b30ff98d217
MD5 7f157bf94b75741bbddf7207880da963
BLAKE2b-256 de8c0885d61a03cf20c13f9c04529efaef7deffdef51127591088e049fae2f48

See more details on using hashes here.

Supported by

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