Skip to main content

RouterOS v7 REST API python module

Project description

RosRestPy

PyPi Package Version Supported Python versions LICENSE

RouterOS v7 REST API python module

RouterOS v7 REST API Support

Not all types and methods of the RouterOS v7 REST API are supported, yet.

Installing

You can install or upgrade rosrestpy with:

pip install rosrestpy --upgrade

Example

from ros import Ros

ros = Ros("https://192.168.88.1/", "admin", "")
if ros.system.resource.cpu_load > 90:
    print(f"{ros.system.identity}'s CPU > 90%")

for interface in ros.interface():
    print(interface.name)

queues = ros.queue.simple(name="Hotspot")
if len(queues) == 1:
    queue = queues[0]
    print(f"Usage {queue.bytes}")

bw_tests = ros.tool.bandwith_test("172.16.0.1", "3s", "admin", direction="both")
result_bw_test = bw_tests[-1]
print(f"Download {result_bw_test.rx_total_average}")
print(f"Upload {result_bw_test.tx_total_average}")

Resources

The RouterOS REST API is the technical reference for rosrestpy.

Contributing

Contributions of all sizes are welcome. Please review our contribution guidelines to get started. You can also help by reporting bugs or feature requests.

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

rosrestpy-0.3.0.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

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

rosrestpy-0.3.0-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

Details for the file rosrestpy-0.3.0.tar.gz.

File metadata

  • Download URL: rosrestpy-0.3.0.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.8.16 Linux/5.15.0-1031-azure

File hashes

Hashes for rosrestpy-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f7a89b1a75eea664614d892548e2b640119011c422669b87478239a142705534
MD5 16d6dd0340922171e1e4bc62d9291aa6
BLAKE2b-256 54c4135f7a78621cc06816c17601e5b48a5506e8cb05da2790e531245bc8449d

See more details on using hashes here.

File details

Details for the file rosrestpy-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: rosrestpy-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 42.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.8.16 Linux/5.15.0-1031-azure

File hashes

Hashes for rosrestpy-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1866260e898669ee32ae4234f66ecb60c5e1525c49453009f51f84a03e4cc588
MD5 cbca66058d6a3ac6a6259d614d90b98d
BLAKE2b-256 d6e8c0476d577a3752a24645c6fc3b5c3c46f92edfacc9c21fd9996d3ac4fbc9

See more details on using hashes here.

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