Skip to main content

cdpcurl

curl-like tool with CDP request signing. Inspired by and built from awscurl. See that repository's README for installation and usage instructions beyond what is provided here.

Building

Create a virtualenv if desired.

# For typical virtualenv
virtualenv cdpcurlenv
cdpcurlenv/bin/activate
# For pyenv
pyenv virtualenv cdpcurlenv
pyenv activate cdpcurlenv

Then, in this directory:

pip install .

Usage

Run cdpcurl --help for a complete list of options.

Before using cdpcurl, generate an access key / private key pair for your CDP user account using the CDP management console. You have two options for passing those keys to cdpcurl:

  • Pass the keys to cdpcurl using the --access-key and --private-key options
  • (Recommended) Create a profile in $HOME/.cdp/credentials containing the keys and then use the --profile option in cdpcurl calls

For example:

[myuserprofile]
cdp_access_key_id = 6744f22e-c46a-406d-ad28-987584f45351
cdp_private_key = abcdefgh...................................=

Most CDP API calls are POST requests, so be sure to specify -X POST, and provide the request content using the -d option. If the -d option value begins with "@", the remainder of the value is the path to a file containing the content; otherwise, the value is the content itself.

To form the URI, start by determining the hostname based on the service being called:

  • iam: iamapi.us-west-1.altus.cloudera.com
  • all other services: api.us-west-1.cdp.cloudera.com

The correct URI is an HTTPS URL at the chosen host, with a path indicated for your desired endpoint in the API documentation.

Examples

Get your own account information, using a profile named demo:

$ cdpcurl --profile demo -X POST -d '{}' https://iamapi.us-west-1.altus.cloudera.com/iam/getAccount

List all environments with the sandbox profile:

$ cdpcurl --profile sandbox -X POST -d '{}' https://api.us-west-1.cdp.cloudera.com/api/v1/environments2/listEnvironments

Request Signing

A CDP API call requires a request signature to be passed in the x-altus-auth header, along with a corresponding timestamp in the x-altus-date" header. cdpcurl constructs the headers automatically. However, if you would rather use a different HTTP client, such as ordinary curl, then you may directly use the cdpsign script within cdpcurl to generate these required headers. You may then parse the header values from the script output and feed them to your preferred client.

$ cdpsign -X POST https://api.us-west-1.cdp.cloudera.com/api/v1/environments2/listEnvironments
Content-Type: application/json
x-altus-date: Fri, 28 Aug 2020 20:38:38 GMT
x-altus-auth: (very long string value)

The signature algorithm specification is available from the API documentation.

Using the requests library

The requests library can also be used like so:

import requests
from cdpcurl.requests_auth import auth_v1

r = requests.post('https://api.us-west-1.cdp.cloudera.com/api/v1/environments2/listEnvironments',
                  json={},
                  auth=auth_v1(profile='demo'))

auth_v1 will automatically sign the request.

License

Copyright 2026 Cloudera, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Metadata

Release files for cdpcurl 1.1.0

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

Source distribution (sdist)

Source distribution for cdpcurl 1.1.0
File Size Uploaded Provenance
cdpcurl-1.1.0.tar.gz 13.7 kB With provenance Details

Built distribution (wheel)

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

Total release size: 33.8 kB

Release files / cdpcurl-1.1.0.tar.gz

Download URL cdpcurl-1.1.0.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f00b8cdaadd951ad1693309ded776b2945d64b8a94f0df84dc4738358e2360fa
BLAKE2b-256 checksum
How to use checksums
d8137a3670059250119f8e8134a839018af8dcd9763ec8a7305c60a6dbb3f998
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jun 9, 2026.

Transparency log

Release files / cdpcurl-1.1.0-py3-none-any.whl

Download URL cdpcurl-1.1.0-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07246165b132e1ae6db08d750424edfc2c7a332d4d0fd77035211c41d4277499
BLAKE2b-256 checksum
How to use checksums
23677f48ffd5be99fb6b14358b4d1af58422a79f4e052f003dfa0bce88ffd1e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jun 9, 2026.

Transparency log

Security for cdpcurl 1.1.0

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cdpcurl-1.1.0.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 Jun 9, 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.

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