{"id":13787183,"url":"https://github.com/cisco-en-programmability/dnacentersdk","last_synced_at":"2026-01-14T20:55:15.819Z","repository":{"id":35077426,"uuid":"203425810","full_name":"cisco-en-programmability/dnacentersdk","owner":"cisco-en-programmability","description":"Cisco DNA Center Python SDK","archived":false,"fork":false,"pushed_at":"2025-12-09T09:19:59.000Z","size":18564,"stargazers_count":79,"open_issues_count":19,"forks_count":35,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-12-12T15:55:49.861Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dnacentersdk.readthedocs.io/en/latest/","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}},"created_at":"2019-08-20T17:46:21.000Z","updated_at":"2025-12-09T09:20:03.000Z","dependencies_parsed_at":"2024-01-10T18:42:42.909Z","dependency_job_id":"c6e8364d-52c8-4aa8-ae91-6296e7448a5f","html_url":"https://github.com/cisco-en-programmability/dnacentersdk","commit_stats":{"total_commits":159,"total_committers":7,"mean_commits":"22.714285714285715","dds":0.6163522012578616,"last_synced_commit":"7eda9b1653825e3e322582d3b57f09ab809bc48a"},"previous_names":[],"tags_count":73,"template":false,"template_full_name":null,"purl":"pkg:github/cisco-en-programmability/dnacentersdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacentersdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacentersdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacentersdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacentersdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cisco-en-programmability","download_url":"https://codeload.github.com/cisco-en-programmability/dnacentersdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacentersdk/sbom","scorecard":{"id":283339,"data":{"date":"2025-08-11","repo":{"name":"github.com/cisco-en-programmability/dnacentersdk","commit":"f7d2f35cf82483850826f08a104f97c33b9f7118"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: pipCommand not pinned by hash: script/ci:18","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-48p4-8xcf-vxj5","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T16:32:10.614Z","repository_id":35077426,"created_at":"2025-08-17T16:32:10.614Z","updated_at":"2025-08-17T16:32:10.614Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":"2024-08-03T20:00:31.003Z","updated_at":"2026-01-14T20:55:15.814Z","avatar_url":"https://github.com/cisco-en-programmability.png","language":"Python","funding_links":[],"categories":["Platform / SDK","Vendor Abstraction Library"],"sub_categories":["NETCONF"],"readme":"dnacentersdk\n============\n\n*Work with the DNA Center APIs in native Python!*\n\n-------------------------------------------------------------------------------\n\n**dnacentersdk** is a *community-developed* Python library for working with the Cisco DNA Center APIs. Our goal is to make interacting with DNA Center in Python a *native* and *natural* experience!\n\n.. code-block:: python\n\n    from dnacentersdk import DNACenterAPI\n\n    # Create a DNACenterAPI connection object\n    dnac = DNACenterAPI(\n        username=\"devnetuser\",\n        password=\"Cisco123!\",\n        base_url=\"https://sandboxdnac.cisco.com:443\",\n        version=\"3.1.3.0\",\n        verify=True\n    )\n\n    # Find all devices that belong to the \"Switches and Hubs\" family\n    devices = dnac.devices.get_device_list(family=\"Switches and Hubs\")\n\n    for device in devices.response:\n        print(\"{:20s}{}\".format(device.hostname, device.upTime))\n\n    # Find all tags\n    all_tags = dnac.tag.get_tag(sort_by=\"name\", order=\"des\")\n    demo_tags = [tag for tag in all_tags.response if \"Demo\" in tag.name]\n\n    # Delete demo tags\n    for tag in demo_tags:\n        dnac.tag.delete_tag(tag.id)\n\n    # Create a new demo tag\n    demo_tag = dnac.tag.create_tag(name=\"dna Demo\")\n    task = dnac.task.get_task_by_id(task_id=demo_tag.response.taskId)\n\n    if not task.response.isError:\n        created_tag = dnac.tag.get_tag(name=\"dna Demo\")\n        updated_tag = dnac.tag.update_tag(\n            id=created_tag.response[0].id,\n            name=\"Updated \" + created_tag.response[0].name,\n            description=\"DNA demo tag\"\n        )\n        print(dnac.task.get_task_by_id(task_id=updated_tag.response.taskId).response.progress)\n\n        # Retrieve updated tag\n        result = dnac.tag.get_tag(name=\"Updated dna Demo\")\n        print(result)\n    else:\n        print(\"Unfortunately\", task.response.progress)\n        print(\"Reason:\", task.response.failureReason)\n\n    # Custom API examples\n    def setup_custom():\n        dnac.custom_caller.add_api(\n            \"get_global_credentials\",\n            lambda credential_type: dnac.custom_caller.call_api(\n                \"GET\",\n                \"/dna/intent/api/v1/global-credential\",\n                params={\"credentialSubType\": credential_type}\n            ).response\n        )\n        dnac.custom_caller.add_api(\n            \"create_netconf_credentials\",\n            lambda port: dnac.custom_caller.call_api(\n                \"POST\",\n                \"/dna/intent/api/v1/global-credential/netconf\",\n                json=[{\"netconfPort\": port}]\n            )\n        )\n\n    setup_custom()\n    dnac.custom_caller.create_netconf_credentials(\"65533\")\n    print(dnac.custom_caller.get_global_credentials(\"NETCONF\"))\n\nIntroduction\n------------\n\nCheck out the complete Introduction_\n\n**dnacentersdk handles all of this for you:**\n\n- Reads your DNA Center credentials from environment variables.\n- Reads your DNA Center API version from the `DNA_CENTER_VERSION` environment variable.\n- Handles TLS certificate verification with the `verify` parameter.\n- Enables debug mode via the `DNA_CENTER_DEBUG` environment variable.\n- Exposes all DNA Center API calls as native Python methods organized in a hierarchical tree.\n- Offers IDE auto-completion support (e.g., in `PyCharm_`).\n- Converts all JSON responses to native Python objects with dot notation access.\n- Handles rate-limiting automatically.\n- Refreshes authentication tokens when they expire.\n- Provides resource management via context managers and explicit connection cleanup.\n\nResource Management\n-------------------\n\nYou can manage the HTTP connection lifecycle in several ways:\n\n**Context Manager**\n\n.. code-block:: python\n\n    from dnacentersdk import DNACenterAPI\n\n    with DNACenterAPI() as dnac:\n        devices = dnac.devices.get_device_list()\n\n**Explicit Close**\n\n.. code-block:: python\n\n    from dnacentersdk import DNACenterAPI\n\n    dnac = DNACenterAPI()\n    try:\n        devices = dnac.devices.get_device_list()\n    finally:\n        dnac.close()\n\n**Automatic Cleanup via GC**\n\n.. code-block:: python\n\n    from dnacentersdk import DNACenterAPI\n\n    def get_devices():\n        dnac = DNACenterAPI()\n        return dnac.devices.get_device_list()\n\n    devices = get_devices()\n\n**Legacy Usage**\n\n.. code-block:: python\n\n    from dnacentersdk import DNACenterAPI\n\n    dnac = DNACenterAPI()\n    devices = dnac.devices.get_device_list()\n\nInstallation\n------------\n\n**Install via pip**\n\n.. code-block:: bash\n\n    pip install dnacentersdk\n\n**Upgrade to the latest version**\n\n.. code-block:: bash\n\n    pip install --upgrade dnacentersdk\n\nCompatibility Matrix\n--------------------\n\n.. list-table::\n   :widths: 50 50\n   :header-rows: 1\n\n   * - Cisco DNA Center version\n     - dnacentersdk version\n   * - 2.3.5.3\n     - 2.6.11\n   * - 2.3.7.6\n     - 2.7.7\n   * - 2.3.7.7\n     - 2.8.6\n   * - 2.3.7.9\n     - 2.8.14\n   * - 3.1.3.0\n     - 2.10.5\n\nDocumentation\n-------------\n\nVisit: https://dnacentersdk.readthedocs.io\n\nStart with the Quickstart_ to get up and running quickly.\n\nRelease Notes\n-------------\n\nSee the releases_ page for details on features and fixes.\n\nQuestions, Support \u0026 Discussion\n-------------------------------\n\nThis is a *community-supported* project. For questions or issues, use the issues_ page.\n\nContributing\n------------\n\ndnacentersdk_ is community-driven. Feedback, suggestions, and code contributions are welcome! See the Contributing_ guide.\n\nInspiration\n-----------\n\nThis library is inspired by the webexteamssdk_ project.\n\nChangelog\n---------\n\nAll notable changes are documented in the CHANGELOG_.\n\nThe library may continue to evolve as Cisco DNA Center APIs change.\n\n*Copyright (c) 2019–2025 Cisco Systems.*\n\n.. _Introduction: https://dnacentersdk.readthedocs.io/en/latest/api/intro.html\n.. _Quickstart: https://dnacentersdk.readthedocs.io/en/latest/api/quickstart.html\n.. _dnacentersdk: https://github.com/cisco-en-programmability/dnacentersdk\n.. _issues: https://github.com/cisco-en-programmability/dnacentersdk/issues\n.. _releases: https://github.com/cisco-en-programmability/dnacentersdk/releases\n.. _Contributing: https://github.com/cisco-en-programmability/dnacentersdk/blob/master/docs/contributing.rst\n.. _webexteamssdk: https://github.com/CiscoDevNet/webexteamssdk\n.. _CHANGELOG: https://github.com/cisco-en-programmability/dnacentersdk/blob/main/CHANGELOG.md\n.. _PyCharm: https://www.jetbrains.com/pycharm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcisco-en-programmability%2Fdnacentersdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcisco-en-programmability%2Fdnacentersdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcisco-en-programmability%2Fdnacentersdk/lists"}