Skip to main content

RouterOS

Build Status

RouterOS is a API client for Mikrotik RouterOS.

How can I install it?

$ pip install routeros 

The usage of a virtualenv is recommended.

How to use it?

In [1]: from routeros import login

In [2]: routeros = login('user', 'password', '10.1.0.1')

In [3]: routeros('/ip/pool/print')
Out[3]: 
({'.id': '*1', 'name': 'dhcp', 'ranges': '192.168.88.10-192.168.88.254'},
 {'.id': '*2', 'name': 'hs-pool-8', 'ranges': '10.5.50.2-10.5.50.254'})

In [4]: routeros.close()

In [5]: 

Also can use query

Query can consult specific attributes on routeros.

Methods:

  • query.has(*args)
  • query.hasnot(*args)
  • query.equal(**kwargs)
  • query.lower(**kwargs)
  • query.greater(**kwargs)
In [1]: from routeros import login

In [2]: routeros = login('user', 'password', '10.1.0.1')

In [3]: routeros.query('/ip/pool/print').equal(name='dhcp')
Out[3]: ({'.id': '*1', 'name': 'dhcp', 'ranges': '192.168.88.10-192.168.88.254'},)

In [4]: routeros.close()

In [5]: 

How to use non-default (8728) API port for login, such as 9999

routeros = login('user', 'password', '10.1.0.1', 9999)

How to use pre-v6.43 login method

routeros = login('user', 'password', '10.1.0.1', 8728, True)

Metadata

Release files for routeros 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for routeros 0.1.1
File Size Uploaded Provenance Actions
routeros-0.1.1.tar.gz 5.8 kB Without provenance Details for routeros-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for routeros 0.1.1
File Interpreter ABI Platform Actions
routeros-0.1.1-py2.py3-none-any.whl Python 3, Python 2 none any Details for routeros-0.1.1-py2.py3-none-any.whl

Total release size: 12.4 kB

Release files / routeros-0.1.1.tar.gz

Download URL routeros-0.1.1.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9f14ea58479a613a5b48fdcea4ed9f9f2548cf7584d17541dcaea3603d6f5a25
BLAKE2b-256 checksum
How to use checksums
119e666e87a72b8ea4c8d4d3215cce39918c6fdde315689d9cd5f06ca9c086d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.7.5 Linux/5.6.16-1-MANJARO

Release files / routeros-0.1.1-py2.py3-none-any.whl

Download URL routeros-0.1.1-py2.py3-none-any.whl
Size 6.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
abf5df4c87377fe28b749b72cca9ef1d3e8c168c291390868a354b1329f8f748
BLAKE2b-256 checksum
How to use checksums
004f4dd6bec02402a1bcc0dba549237f077c73b1ee40da3b660de490daeaa473
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.7.5 Linux/5.6.16-1-MANJARO

Security for routeros 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page