niwaki

niwaki is a design-first, fully typed Python SDK for Cisco ACI, built for network engineers who automate the APIC in Python. The promise: you should not have to memorise the APIC object model — navigation, object names and attributes use operator vocabulary with full IDE autocompletion, and the SDK translates to ACI classes, relation props and wire names for you. Structure is literal, vocabulary is translated.

One mental model, everywhere: the design DSL describes the desired configuration — the whole uni subtree, from fabric policies to tenants — push() applies it (dry-run diff, atomic POST, or staged waves), and the facade observes (navigation, typed reads, queries, deletion).

from niwaki import Niwaki
from niwaki.design import tenant

config = tenant("prod", description="my first tenant")
config.vrf("main")
config.bd("web", unicast_routing=True).bind(vrf="main").subnet("10.0.1.1/24")

with Niwaki("https://apic.example.com", "admin", "secret") as aci:
    config.push(aci, mode="plan")   # dry run — see the diff first
    config.push(aci)                # one atomic POST

bind(vrf="main") is resolved and checked before anything touches the network — a typo fails in your editor, with a did-you-mean.

Start here

  1. Installationuv add niwaki, air-gapped installs included

  2. Quickstart — describe, apply, observe in ten minutes

  3. The design DSL — the full describe surface

  4. Cursors: the operations, and when to use each — the cursor operations, and when to use each

  5. Push modesstrict, staged, plan

  6. Observing the fabric — navigation, typed reads, queries

  7. Discovering classes — search and describe any of the ~15,300 readable classes

  8. Subscribing to live changes — live push notifications instead of polling

Find your way

  • Guide — learn the SDK, one concept per page.

  • Cookbook — get a real task done, copy-adapt a recipe.

  • Reference — look it up: every curated position, the API, limits.

  • Explanation — understand why the SDK has this shape.

Every Python block in this documentation runs as a test in the SDK’s own suite — the examples cannot go stale.

Coming from cobra? Three pages, three jobs: Why niwaki — a comparison with cobra (the argument), Side by side — cobra and niwaki (the same tasks side by side), Migrate from cobra (the migration guide).

Guide

Reference