{"id":37882915,"url":"https://github.com/cisco-en-programmability/catalystcentersdk","last_synced_at":"2026-02-27T22:28:31.942Z","repository":{"id":260696620,"uuid":"870158239","full_name":"cisco-en-programmability/catalystcentersdk","owner":"cisco-en-programmability","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-11T16:52:30.000Z","size":8194,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-02-13T01:40:15.620Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cisco-en-programmability.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":"docs/contributing.rst","funding":null,"license":"LICENSE","code_of_conduct":"docs/code_of_conduct.rst","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-09T14:42:02.000Z","updated_at":"2026-02-11T16:52:45.000Z","dependencies_parsed_at":"2024-12-12T20:30:39.717Z","dependency_job_id":"117b38ff-9dab-4f0b-9a98-dddbbcd4c1e0","html_url":"https://github.com/cisco-en-programmability/catalystcentersdk","commit_stats":null,"previous_names":["cisco-en-programmability/catalystcentersdk"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/cisco-en-programmability/catalystcentersdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fcatalystcentersdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fcatalystcentersdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fcatalystcentersdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fcatalystcentersdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cisco-en-programmability","download_url":"https://codeload.github.com/cisco-en-programmability/catalystcentersdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fcatalystcentersdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29917587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"ssl_error","status_checked_at":"2026-02-27T19:37:41.463Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T16:49:48.927Z","updated_at":"2026-02-27T22:28:31.930Z","avatar_url":"https://github.com/cisco-en-programmability.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==================\ncatalystcentersdk\n==================\n\n*Work with the CatalystCenter APIs in native Python!*\n\n-------------------------------------------------------------------------------\n\n**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!\n\n.. code-block:: python\n\n    from catalystcentersdk import api\n\n    # Create a CatalystCenterAPI connection object;\n    # it uses CatalystCenter sandbox URL, username and password, with CatalystCenter API version 3.1.6.0.\n    # and requests to verify the server's TLS certificate with verify=True.\n    catalyst = api.CatalystCenterAPI(username=\"devnetuser\",\n                            password=\"Cisco123!\",\n                            base_url=\"https://sandboxdnac.cisco.com:443\",\n                            version='3.1.6.0',\n                            verify=True)\n\n    # Find all devices that have 'Switches and Hubs' in their family\n    devices = catalyst.devices.get_device_list(family='Switches and Hubs')\n\n    # Print all of demo devices\n    for device in devices.response:\n        print('{:20s}{}'.format(device.hostname, device.upTime))\n\n    # Find all tags\n    all_tags = catalyst.tag.get_tag(sort_by='name', order='desc')\n    demo_tags = [tag for tag in all_tags.response if 'Demo' in tag.name ]\n\n    #  Delete all of the demo tags\n    for tag in demo_tags:\n        catalyst.tag.delete_tag(tag.id)\n\n    # Create a new demo tag\n    demo_tag = catalyst.tag.create_tag(name='catalyst Demo')\n    task_demo_tag = catalyst.task.get_task_by_id(task_id=demo_tag.response.taskId)\n\n    if not task_demo_tag.response.isError:\n        # Retrieve created tag\n        created_tag = catalyst.tag.get_tag(name='catalyst Demo')\n\n        # Update tag\n        update_tag = catalyst.tag.update_tag(id=created_tag.response[0].id,\n                                         name='Updated ' + created_tag.response[0].name,\n                                         description='Catalyst demo tag')\n\n        print(catalyst.task.get_task_by_id(task_id=update_tag.response.taskId).response.progress)\n\n        # Retrieved updated\n        updated_tag = catalyst.tag.get_tag(name='Updated catalyst Demo')\n        print(updated_tag)\n    else:\n        # Get task error details\n        print('Unfortunately ', task_demo_tag.response.progress)\n        print('Reason: ', task_demo_tag.response.failureReason)\n\n    # Advance usage example using Custom Caller functions\n    # Define the get_global_credentials and create_netconf_credentials functions\n    # under the custom_caller wrapper.\n    # Call them with:\n    #     catalyst.custom_caller.get_global_credentials('NETCONF')\n    #     catalyst.custom_caller.create_netconf_credentials('65533')\n    def setup_custom():\n        catalyst.custom_caller.add_api('get_global_credentials',\n                                lambda credential_type:\n                                    catalyst.custom_caller.call_api(\n                                        'GET',\n                                        '/dna/intent/api/v1/global-credential',\n                                        params={\n                                            'credentialSubType': credential_type\n                                        }).response\n                                )\n        catalyst.custom_caller.add_api('create_netconf_credentials',\n                                lambda port:\n                                    catalyst.custom_caller.call_api(\n                                        'POST',\n                                        '/dna/intent/api/v1/global-credential/netconf',\n                                        json=[{\n                                            \"netconfPort\": port\n                                        }])\n                                )\n\n    # Add the custom API calls to the connection object under the custom_caller wrapper\n    setup_custom()\n    # Call the newly added functions\n    catalyst.custom_caller.create_netconf_credentials('65533')\n    print(catalyst.custom_caller.get_global_credentials('NETCONF'))\n\n\nIntroduction\n------------\nCheck out the complete Introduction_\n\n**catalystcentersdk handles all of this for you:**\n\n+ Reads your CatalystCenter credentials from environment variables.\n\n+ Reads your CatalystCenter API version from environment variable CATALYST_CENTER_VERSION.\n\n+ Controls whether to verify the server's TLS certificate or not according to the verify parameter.\n\n+ Reads your CatalystCenter debug from environment variable CATALYST_CENTER_DEBUG. Boolean.\n\n+ Wraps and represents all CatalystCenter API calls as a simple hierarchical tree of\n  native-Python methods\n\n+ If your Python IDE supports **auto-completion** (like `PyCharm_`), you can\n  navigate the available methods and object attributes right within your IDE\n\n+ Represents all returned JSON objects as native Python objects - you can\n  access all of the object's attributes using native *dot.syntax*\n\n+ **Automatic Rate-Limit Handling**  Sending a lot of requests to CatalystCenter?\n  Don't worry; we have you covered.  CatalystCenter will respond with a rate-limit\n  response, which will automatically be caught and \"handled\" for you.\n\n+ **Refresh token** Each time the token becomes invalid, the SDK will generate a new valid token for you.\n\nInstallation\n------------\n\nInstalling and upgrading catalystcentersdk is easy:\n\n**Install via PIP**\n\n.. code-block:: bash\n\n    $ pip install catalystcentersdk\n\n**Upgrading to the latest Version**\n\n.. code-block:: bash\n\n    $ pip install catalystcentersdk --upgrade\n\n\nCompatibility matrix\n--------------------\nThe following table shows the supported versions.\n\n.. list-table::\n   :widths: 50 50\n   :header-rows: 1\n\n   * - Cisco CatalystCenter version\n     - Python \"catalystcentersdk\" version\n   * - 2.3.7.6\n     - 2.3.7.6.x\n   * - 2.3.7.9\n     - 2.3.7.9.x\n   * - 3.1.3.0\n     - 3.1.3.0.x\n   * - 3.1.6.0\n     - 3.1.6.0.x\n\n\n\nIf your SDK is older please consider updating it first.\n\nDocumentation\n-------------\n\n**Excellent documentation is now available at:**\nhttps://catalystcentersdk.readthedocs.io\n\nCheck out the Quickstart_ to dive in and begin using catalystcentersdk.\n\n\nRelease Notes\n-------------\n\nPlease see the releases_ page for release notes on the incremental functionality and bug fixes incorporated into the published releases.\n\n\nQuestions, Support \u0026 Discussion\n-------------------------------\n\ncatalystcentersdk is a *community developed* and *community supported* project.  If you experience any issues using this package, please report them using the issues_ page.\n\n\nContribution\n------------\n\ncatalystcentersdk_ is a community development projects.  Feedback, thoughts, ideas, and code contributions are welcome!  Please see the `Contributing`_ guide for more information.\n\n\nInspiration\n------------\n\nThis library is inspired by the webexteamssdk_  library\n\n\nChangelog\n---------\n\nAll notable changes to this project will be documented in the CHANGELOG_ file.\n\nThe development team may make additional name changes as the library evolves with the Cisco CatalystCenter APIs.\n\n\n*Copyright (c) 2024 Cisco Systems.*\n\n.. _Introduction: https://catalystcentersdk.readthedocs.io/en/latest/api/intro.html\n.. _catalystcentersdk.readthedocs.io: https://catalystcentersdk.readthedocs.io\n.. _Quickstart: https://catalystcentersdk.readthedocs.io/en/latest/api/quickstart.html\n.. _catalystcentersdk: https://github.com/cisco-en-programmability/catalystcentersdk\n.. _issues: https://github.com/cisco-en-programmability/catalystcentersdk/issues\n.. _pull requests: https://github.com/cisco-en-programmability/catalystcentersdk/pulls\n.. _releases: https://github.com/cisco-en-programmability/catalystcentersdk/releases\n.. _the repository: catalystcentersdk_\n.. _pull request: `pull requests`_\n.. _Contributing: https://github.com/cisco-en-programmability/catalystcentersdk/blob/master/docs/contributing.rst\n.. _webexteamssdk: https://github.com/CiscoDevNet/webexteamssdk\n.. _CHANGELOG: https://github.com/cisco-en-programmability/catalystcentersdk/blob/main/CHANGELOG.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcisco-en-programmability%2Fcatalystcentersdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcisco-en-programmability%2Fcatalystcentersdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcisco-en-programmability%2Fcatalystcentersdk/lists"}