Skip to main content

Python SDK for the SonicOS REST API

Project description

SonicWall SDK for Python

Python client for SonicOS REST API with async-first APIs, sync wrapper, pending config transaction helpers, and typed exceptions.

Install

pip install sonicwall-sdk
# or
uv add sonicwall-sdk

Quick start (async)

import asyncio
from sonicwall import SonicWallClient

async def main() -> None:
    async with SonicWallClient(
        host="192.168.1.1",
        username="admin",
        password="secret",
        verify_ssl=False,
    ) as client:
        objs = await client.address_objects.list()
        print(f"address objects: {len(objs)}")

asyncio.run(main())

Authentication

On SonicOS 7.x, the SDK performs Digest auth-int login handshake on POST /auth, then sends Authorization: Bearer <token> for authenticated API calls. This is automatic; no manual auth header or cookie handling is needed.

Transactions

SonicOS stages writes in pending config. Use pending() to auto-commit on success and auto-rollback on exceptions:

async with client.pending():
    await client.address_objects.create(obj)

More docs

  • Root guide: README.md
  • Python guide: docs/python.md
  • SonicOS quirks: docs/sonicwall-quirks.md

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

sonicwall_sdk-0.1.0.tar.gz (75.8 kB view details)

Uploaded Source

Built Distribution

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

sonicwall_sdk-0.1.0-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file sonicwall_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: sonicwall_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 75.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sonicwall_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b63195e68514a6f2899fb6632cf5baba9186c4d26540f349982954e200ba7634
MD5 39a06c930d3ee623d93bc09226ab24ca
BLAKE2b-256 19b8ad7f9855d2b9baa11e87051ed7b2f453ad464c19764028479bdc2bf85cf5

See more details on using hashes here.

File details

Details for the file sonicwall_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sonicwall_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sonicwall_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da66b7d3e38940cb18f8590024d87cc0d895e81ff119a9b3f023c064a7ee83ea
MD5 cf4296d3404d643ad1a319c68875bda3
BLAKE2b-256 6f2fa9df2933be46ae1be7577515580c113a8a2538f1d4abce59b9b7ec8f0c56

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