Skip to main content

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

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


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.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

sonicapi-0.2.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file sonicapi-0.2.1.tar.gz.

File metadata

  • Download URL: sonicapi-0.2.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for sonicapi-0.2.1.tar.gz
Algorithm Hash digest
SHA256 dd9eb78e2b10b9e614240b4023c64bde69842186349d2b75e1bcd92ca79f9919
MD5 b60df0f9da3a0e83a9f3856757b45273
BLAKE2b-256 7899b258bb41e4bd22929e3e038ebe84c9324486634228f2bee01e0a2ac1a44c

See more details on using hashes here.

File details

Details for the file sonicapi-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: sonicapi-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for sonicapi-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2650b4eb3827ef7a81de1231dab124398674b79db0ed1f705dc9905dede20e43
MD5 fb888751fde3f53e54266728ec365011
BLAKE2b-256 c948569712e4896ca8f4705c67c7ae958f06846c5e676b4ca83b4ebe10882cd9

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