Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/katzenilpferd/snmppylite

A lightweight Python library for working with the SNMP protocol
https://github.com/katzenilpferd/snmppylite

network python snmp

Last synced: about 10 hours ago
JSON representation

A lightweight Python library for working with the SNMP protocol

Awesome Lists containing this project

README

        

# SnmpPyLite

**SnmpPyLite** β€” is a lightweight client for working with the SNMP protocol in Python, supporting the operations `GET`, `GET-NEXT`, `GET-BULK`, `GET-WALK` ΠΈ `SET`.

## πŸ“¦ Installation

Using `pip`:
```bash
pip install snmp_py_lite
```

Or cloning from the repository:
```bash
git clone https://github.com/katzeNilpferd/SnmpPyLite.git
cd SnmpPyLite
python setup.py install
```

## πŸš€ Usage

Example of use for performing the `GET` operation:
```bash
from snmp_py_lite.client import SNMPClient

client = SNMPClient(ip="192.168.126.10", community="public", version='1')
response = client.get("1.3.6.1.2.1.1.1.0")
print(response)
```

Example of the `SET` operation:
```bash
value = "New Device Name"
client.set("1.3.6.1.2.1.1.5.0", value, "STRING")
```

## 🌐 Supported versions of the SNMP

- `1` β€” initial version of the protocol.
- `2c` β€” includes improvements in performance, security, privacy and communication between managers compared to the previous version.

## πŸ“š Supported operations

- `GET` β€” getting the value by OID.
- `GET-NEXT` β€” getting the next value by OID.
- `GET-BULK` β€” mass receipt of values (SNMPv2c).
- `GET-WALK` β€” recursively retrieving values in the table (iterating over the OID).
- `SET` β€” changing the value by OID.

## πŸ› οΈ Supported data types

- `INTEGER`
- `OCTET STRING`
- `NULL`
- `OID`
- `Ip Address`
- `Counter`
- `Gauge`
- `TimeTicks`

## πŸ“ License

This project is licensed under the MIT license. For details, see the LICENSE file.

## 🀝 Contribution

Your contribution is welcome! If you want to improve the project, create a fork, make changes and send a Pull Request.

1. Make a fork of the repository
2. Create a new branch (`git checkout -b feature/your_feature`)
3. Commit the changes (`git commit -m "Added a new feature"`)
4. Start the branch (`git push origin feature/your_feature`)
5. Open the Pull Request

## πŸ“ž Contacts

- Email: [email protected]