Python3 Module to interact with the SonicWall® SonicOS API.
Project description
sonicapi
Python3 Module to interact with the SonicWall® SonicOS API
This Module currently only contains basic functionality:
- Address Objects
- Address Groups
- Service Objects
- Service Groups
- Zones
- Access Rules
- NAT Policies
- Route Policies
- Restart
- VPN Policies
Installation:
pip3 install sonicapi
Usage:
from sonicapi import sonicapi
import json
def main():
# This example connects to the API, dumps out a JSON list of Address Objects, and logs out.
s = sonicapi('192.168.168.168', 443, 'admin', 'password')
print(json.dumps(s.auth(login=True), indent=2))
print(json.dumps(s.AddressObjects(type='ipv4'), indent=2))
print(json.dumps(s.AddressObjects(type='ipv6'), indent=2))
print(json.dumps(s.auth(logout=True), indent=2))
if __name__ == "__main__":
main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sonicapi-0.2.5.tar.gz
(7.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sonicapi-0.2.5.tar.gz.
File metadata
- Download URL: sonicapi-0.2.5.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ed0b050e20228364d44ea489dcc029f935a297d93c015d6e713157ccd424e05
|
|
| MD5 |
3104b2c1948204b12a6c3ea580fb32f2
|
|
| BLAKE2b-256 |
83d00de3d8db75dd1f6d8f97d1cd78ead668fa7db4deb9e7e912690a585915ac
|
File details
Details for the file sonicapi-0.2.5-py3-none-any.whl.
File metadata
- Download URL: sonicapi-0.2.5-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df23857e297f294e3447ef3216e5e49c04616b1b24dc0162f7f660e1eb8f99f4
|
|
| MD5 |
cd4394aadb608e3a81e49c49801c115b
|
|
| BLAKE2b-256 |
cc0b37614e312b9cf91178db531f5fd2cb3e27e6f40eacfd2d6f780dd2eceaa6
|