Skip to main content

Work with the CatalystCenter APIs in native Python!


catalystcentersdk is a community developed Python library for working with the CatalystCenter APIs. Our goal is to make working with CatalystCenter in Python a native and natural experience!

from catalystcentersdk import api

# Create a CatalystCenterAPI connection object;
# it uses CatalystCenter sandbox URL, username and password, with CatalystCenter API version 3.2.3.0.
# and requests to verify the server's TLS certificate with verify=True.
catalyst = api.CatalystCenterAPI(username="devnetuser",
                        password="Cisco123!",
                        base_url="https://sandboxdnac.cisco.com:443",
                        version='3.2.3.0',
                        verify=True)

# Find all devices that have 'Switches and Hubs' in their family
devices = catalyst.devices.get_device_list(family='Switches and Hubs')

# Print all of demo devices
for device in devices.response:
    print('{:20s}{}'.format(device.hostname, device.upTime))

# Find all tags
all_tags = catalyst.tag.get_tag(sort_by='name', order='desc')
demo_tags = [tag for tag in all_tags.response if 'Demo' in tag.name ]

#  Delete all of the demo tags
for tag in demo_tags:
    catalyst.tag.delete_tag(tag.id)

# Create a new demo tag
demo_tag = catalyst.tag.create_tag(name='catalyst Demo')
task_demo_tag = catalyst.task.get_task_by_id(task_id=demo_tag.response.taskId)

if not task_demo_tag.response.isError:
    # Retrieve created tag
    created_tag = catalyst.tag.get_tag(name='catalyst Demo')

    # Update tag
    update_tag = catalyst.tag.update_tag(id=created_tag.response[0].id,
                                     name='Updated ' + created_tag.response[0].name,
                                     description='Catalyst demo tag')

    print(catalyst.task.get_task_by_id(task_id=update_tag.response.taskId).response.progress)

    # Retrieved updated
    updated_tag = catalyst.tag.get_tag(name='Updated catalyst Demo')
    print(updated_tag)
else:
    # Get task error details
    print('Unfortunately ', task_demo_tag.response.progress)
    print('Reason: ', task_demo_tag.response.failureReason)

# Advance usage example using Custom Caller functions
# Define the get_global_credentials and create_netconf_credentials functions
# under the custom_caller wrapper.
# Call them with:
#     catalyst.custom_caller.get_global_credentials('NETCONF')
#     catalyst.custom_caller.create_netconf_credentials('65533')
def setup_custom():
    catalyst.custom_caller.add_api('get_global_credentials',
                            lambda credential_type:
                                catalyst.custom_caller.call_api(
                                    'GET',
                                    '/dna/intent/api/v1/global-credential',
                                    params={
                                        'credentialSubType': credential_type
                                    }).response
                            )
    catalyst.custom_caller.add_api('create_netconf_credentials',
                            lambda port:
                                catalyst.custom_caller.call_api(
                                    'POST',
                                    '/dna/intent/api/v1/global-credential/netconf',
                                    json=[{
                                        "netconfPort": port
                                    }])
                            )

# Add the custom API calls to the connection object under the custom_caller wrapper
setup_custom()
# Call the newly added functions
catalyst.custom_caller.create_netconf_credentials('65533')
print(catalyst.custom_caller.get_global_credentials('NETCONF'))

Introduction

Check out the complete Introduction

catalystcentersdk handles all of this for you:

  • Reads your CatalystCenter credentials from environment variables.

  • Reads your CatalystCenter API version from environment variable CATALYST_CENTER_VERSION.

  • Controls whether to verify the server’s TLS certificate or not according to the verify parameter.

  • Reads your CatalystCenter debug from environment variable CATALYST_CENTER_DEBUG. Boolean.

  • Wraps and represents all CatalystCenter API calls as a simple hierarchical tree of native-Python methods

  • If your Python IDE supports auto-completion (like PyCharm_), you can navigate the available methods and object attributes right within your IDE

  • Represents all returned JSON objects as native Python objects - you can access all of the object’s attributes using native dot.syntax

  • Automatic Rate-Limit Handling Sending a lot of requests to CatalystCenter? Don’t worry; we have you covered. CatalystCenter will respond with a rate-limit response, which will automatically be caught and “handled” for you.

  • Refresh token Each time the token becomes invalid, the SDK will generate a new valid token for you.

Installation

Installing and upgrading catalystcentersdk is easy:

Install via PIP

$ pip install catalystcentersdk

Upgrading to the latest Version

$ pip install catalystcentersdk --upgrade

Compatibility matrix

The following table shows the supported versions.

Cisco CatalystCenter version

Python “catalystcentersdk” version

2.3.7.6

2.3.7.6.x

2.3.7.9

2.3.7.9.x

3.1.3.0

3.1.3.0.x

3.1.6.0

3.1.6.0.x

3.2.3.0

3.2.3.0.x

If your SDK is older please consider updating it first.

Method naming and v1/v2 aliases

Cisco’s Catalyst Center API sometimes exposes both a v1 and a v2 version of the same operation at different URLs (for example /dna/intent/api/v1/applications and /dna/intent/api/v2/applications). When both genuinely exist for the same operation, this SDK follows one consistent rule:

  • v2 is the main/default method - it gets the plain method name, with no version suffix. This is the name you should use going forward.

  • v2 also gets a _v2-suffixed alias pointing to that same method, so calling it out explicitly (some_method_v2(...)) always works too.

  • v1 keeps a _v1 suffix by default (some_method_v1(...)), since it’s the older variant of the same operation.

  • If v1’s own name is different from v2’s - Cisco doesn’t always name both sides of a v1/v2 pair the same way (for example the v1 side of “create an application set” is CreateApplicationSetV1, singular, while the v2 side is CreateApplicationSets, plural) - the v1 method additionally gets its own plain-name alias (its name with just the _v1 suffix dropped, e.g. create_application_set), so it’s reachable both by its _v1-suffixed name and by its own natural identity.

If an operation’s name ends in V1 or V2 but there’s no genuine sibling at the other version’s URL, that suffix isn’t a real version marker - it’s just how Cisco happened to name a standalone endpoint - so it’s dropped entirely and the method only exists under its plain name.

A few related naming conventions worth knowing:

  • Acronyms stay whole. Method and class names keep acronyms like QoS, DNS, DHCP, IMC, CSSM, and WLC as a single word (get_qos_..., not get_qo_s_...), matching how they’re normally written.

  • Branded class names match Cisco’s own capitalization - for example EoX, CiscoIMC, AIEndpointAnalytics, and UserAndRoles. Where an older, differently-capitalized spelling was already in use (Eox, CiscoImc, AiEndpointAnalytics, UserandRoles), it’s kept as an alias of the class, so existing code keeps working.

  • Nothing gets removed, only added alongside. Whenever a name changes for consistency, the previous name keeps working as an alias - upgrading the SDK version should never break an existing integration because of a rename.

Documentation

Excellent documentation is now available at: https://catalystcentersdk.readthedocs.io

Check out the Quickstart to dive in and begin using catalystcentersdk.

Release Notes

Please see the releases page for release notes on the incremental functionality and bug fixes incorporated into the published releases.

Questions, Support & Discussion

catalystcentersdk is a community developed and community supported project. If you experience any issues using this package, please report them using the issues page.

Contribution

catalystcentersdk is a community development projects. Feedback, thoughts, ideas, and code contributions are welcome! Please see the Contributing guide for more information.

Inspiration

This library is inspired by the webexteamssdk library

Changelog

All notable changes to this project will be documented in the CHANGELOG file.

The development team may make additional name changes as the library evolves with the Cisco CatalystCenter APIs.

Copyright (c) 2026 Cisco Systems.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

catalystcentersdk-3.2.3.0.0.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

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

catalystcentersdk-3.2.3.0.0-py3-none-any.whl (5.0 MB view details)

Uploaded Python 3

File details

Details for the file catalystcentersdk-3.2.3.0.0.tar.gz.

File metadata

  • Download URL: catalystcentersdk-3.2.3.0.0.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.11.11 Darwin/25.2.0

File hashes

Hashes for catalystcentersdk-3.2.3.0.0.tar.gz
Algorithm Hash digest
SHA256 24fad691f5ce5f044ee52b9520b1fc551e70caa7602e03fc2fb65123e9f9a330
MD5 fcbad1ff3623cc73af234aa0106eb4db
BLAKE2b-256 e256ea1d3925d8da11782aa8dfa3f4658988108630cbc5365bae4191a2e9c2d9

See more details on using hashes here.

File details

Details for the file catalystcentersdk-3.2.3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for catalystcentersdk-3.2.3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14d4bd2edcc57429610b089c2a256577909ce04e77567a43626d522b7f041509
MD5 8040483e9e3df2b5e5c587645477ab9b
BLAKE2b-256 8518e76fc5bc550beb0c819592fbaada1c4de6e149a6b01186d13625722bacf0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.2.3.0.0 This release

2 files

3.1.6.0.7

2 files

3.1.6.0.6

2 files

3.1.6.0.5

2 files

3.1.6.0.4

2 files

3.1.6.0.3

2 files

3.1.6.0.2

2 files

3.1.6.0.1

2 files

3.1.6.0.0

2 files

3.1.3.0.1

2 files

3.1.3.0.0

2 files

2.3.7.9.5

2 files

2.3.7.9.4

2 files

2.3.7.9.3

2 files

2.3.7.9.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page