Skip to main content

Python class for Aruba's Clearpass Policy Manager

https://www.emerickcc.com

Aruba Networks

Examples

from clearpasspy import Clearpass
# Client_ID: clearpassapi
# Grant Type: client_credentials OR password
# client Secret: <CLIENT SECRET FROM UI>
# Tackle first: client credentials
server = '<SERVER NAME>'
grant_type = 'client_credentials'
client_secret = 'SUPER SECRET'
client_id = 'clearpassapi'

data = {
    'server' : server,
    'grant_type' : grant_type,
    'secret' : client_secret,
    'client' : client_id
}

# When you create the object, it automatically authenticates you, and stores the access token for subsequent calls.
CPPM = ClearPass(data)
print(CPPM.access_token)
3ea61fd137df506515ae45f0887df1163c4080f9

# Takes MAC address with or without colons
print(CPPM.online_status('0000af23e980'))
True

# Takes 1 arg for limiting output. . max is 1000
print(CPPM.get_endpoints(10))
[{'id': 4814, 'mac_address': '0000e349473f', 'status': 'Unknown', 'attributes': {}, '_links': {'self': {'href': 'https://clearpass.server.com/api/endpoint/4814'}}}

# Print Endpoint by ID
print('Endpoint: {}'.format(CPPM.get_endpoint(4814)))
Endpoint {'id': 4814, 'mac_address': '0000e349473f', 'status': 'Unknown', 'attributes': {}, '_links': {'self': {'href': 'https://clearpass.server.com/api/endpoint/4814'}}}

# Calls API endpoint. Only supports GET method
print('API Call: {}'.format(CPPM.api('/auth-method')))

Metadata

Release files for clearpasspy 1.1.3

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

Source distribution (sdist)

Source distribution for clearpasspy 1.1.3
File Size Uploaded Provenance
clearpasspy-1.1.3.tar.gz 3.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for clearpasspy 1.1.3
File Interpreter ABI Platform
clearpasspy-1.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.1 kB

Release files / clearpasspy-1.1.3.tar.gz

Download URL clearpasspy-1.1.3.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1c08bdcfb0d3e60d0f92bfab01250ad7cfed12ca2b59749c08e0c4f7943e659d
BLAKE2b-256 checksum
How to use checksums
a69edfd4e2fbefe8c362e08e001d10b1e3d933c128e191d878d9cea8ec0b4fe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / clearpasspy-1.1.3-py3-none-any.whl

Download URL clearpasspy-1.1.3-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37259523ff85d53638573dded22a32a1a26b34dc71c0fac39e1444c1c31d5145
BLAKE2b-256 checksum
How to use checksums
8fde1a18a3eadf4993be06e60cb4b893789ea6f5959353153753044f4c222267
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Security for clearpasspy 1.1.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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