Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyCentral (Python SDK for HPE Aruba Networking Central)

⚠️ Pre-release Notice
This is a pre-release version of PyCentral-v2, and the features are constantly being updated as the APIs evolve. This version of the SDK allows you to make API calls to New Central, GLP, and Classic Central.
If you are looking for the stable version of PyCentral (v1), it is still available and fully supported. PyCentral-v1, which only supports Classic Central, can be found here.

A Python SDK for interacting with Central via REST APIs.
Automate onboarding, configuration, monitoring, and management for:

  • New Central
  • HPE GreenLake Platform (GLP)
  • Classic Central (via the classic module for backward compatibility)

Upgrading to this pre-release version will not break PyCentral-v1 code. All the PyCentral-v1 code has been moved to the classic folder within the PyCentral directory, ensuring backward compatibility. You can find Classic Central PyCentral Documentation here.


Install

To install the latest pre-release version of PyCentral, use the following command:

pip3 install --pre pycentral

If you already have PyCentral-v1 and would like to upgrade to the pre-release version, use the following command:

pip3 install --upgrade --pre pycentral

Authentication

Unified Credentials (New Central & GLP)

PyCentral supports a unified credential model that lets you use a single set of GLP client credentials to access both GLP and New Central APIs. Instead of providing separate glp and new_central credential blocks, you provide one unified block with your GLP client_id, client_secret, and workspace_id. The SDK generates one token through GLP auth and reuses it for both platforms.

To also make New Central API calls, include base_url or cluster_name in the unified block. If omitted, only GLP calls are enabled.

token_info = {
    "unified": {
        "client_id": "<glp-client-id>",
        "client_secret": "<glp-client-secret>",
        "workspace_id": "<workspace-id>",
        "cluster_name": "uswest4"  # or "base_url"; omit for GLP-only
    }
}

New Central

You will need:

  • Base URL or Cluster Name: Identifies your Central Account's API gateway. Both options function identically. Use whichever is convenient:
    • Base URL — URL for requests to your Central API Gateway. For instructions on how to locate your Base URL, see Finding Your Base URL in Central.
    • Cluster Name — Name of the cluster where your account is provisioned. A table detailing all cluster names can be found here.
  • Client ID and Client Secret: These credentials are required to generate an access token to authenticate API requests. You can obtain them by creating a Personal API Client for your New Central Account. Follow the detailed steps in the Create Client Credentials documentation.
new_central:
  base_url: <api-base-url>
  client_id: <client-id>
  client_secret: <client-secret>

HPE GreenLake Platform (GLP)

If you are working with HPE GreenLake APIs, authentication is slightly different:

  • GLP does not require a Base URL.
  • You only need the Client ID & Client Secret for the HPE GreenLake Platform.
glp:
  client_id: <client-id>
  client_secret: <client-secret>

Example

Before running the script, create a token.yaml file in the same directory and populate it with the required credentials as follows:

new_central:
  base_url: <api-base-url>
  client_id: <client-id>
  client_secret: <client-secret>
glp:
  client_id: <client-id>
  client_secret: <client-secret>

Once you have the token.yaml file ready, you can run the following Python script:

import os
from pycentral import NewCentralBase

# Validate token file exists
token_file = "token.yaml"
if not os.path.exists(token_file):
    raise FileNotFoundError(
        f"Token file '{token_file}' not found. Please provide a valid token file."
    )

# Initialize NewCentralBase class with the token credentials for New Central/GLP
with NewCentralBase(token_info=token_file) as conn:
   
    # Make the API call to retrieve device inventory
    resp = conn.command(
        api_method="GET",
        api_path="network-monitoring/v1/device-inventory"
    )
    
    # If the response code is 200, print the device inventory response; otherwise, print the error code and message
    if resp["code"] == 200:
        print(resp["msg"])
    else:
        print(f"Error {resp['code']}: {resp['msg']}")

Run the script using the following command:

python3 demo.py

Compatibility

  • v2 supports New Central and GLP.
  • Classic Central (v1) remains in the classic module for backward compatibility.
  • Existing v1 code will continue to work without changes.

Documentation


Classic Central

The Classic Central functionality is still fully supported by the SDK and has been moved to a dedicated documentation page. For information on using the SDK with Classic Central, including authentication methods, API calls, and workflow examples, please see the Classic Central Documentation.

Documentation

Use-Cases and Workflows

Metadata

Release files for pycentral 2.0a27

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycentral 2.0a27
File Size Uploaded Provenance Actions
pycentral-2.0a27.tar.gz 167.5 kB With provenance Details for pycentral-2.0a27.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pycentral 2.0a27
File Interpreter ABI Platform Actions
pycentral-2.0a27-py3-none-any.whl Python 3 none any Details for pycentral-2.0a27-py3-none-any.whl

Total release size: 377.9 kB

Release files / pycentral-2.0a27.tar.gz

Download URL pycentral-2.0a27.tar.gz
Size 167.5 kB
Tags Source
SHA-256 checksum
How to use checksums
92d83c8958a4cffe481a13cf259c1bc793bf544db88e0a6c7919017632ece986
BLAKE2b-256 checksum
How to use checksums
57a628bff8b8e02726d2b77aec88004c896a3d1c2362a8567905df649e260b39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / pycentral-2.0a27-py3-none-any.whl

Download URL pycentral-2.0a27-py3-none-any.whl
Size 210.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf9db435c9c1ad83c85d90516d674167a78c7d88d061f293fa6bb0618f4e6bf4
BLAKE2b-256 checksum
How to use checksums
32c1524d5a9e1b316cfae1c65b17f095d542957f55477d1c563522afb52f3ea6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for pycentral 2.0a27

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pycentral-2.0a27.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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