Skip to main content

Simplify interaction with Hannon Hill's Cascade CMS 8 REST API

Project description

Cascade CMS 8 REST API Python Driver

This is a module for simplifying interaction with Hannon Hill's Cascade CMS 8 REST API. This was built to handle some day-to-day task automation with Cascade CMS 8, e.g., access control management, workflow management, file naming rule enforcement, and more.

How it Works

The driver class CascadeCMSRestDriver constructor accepts either a username and password combination or a user-specific API key (i.e., for a service account in Cascade CMS) in addition to an organization name, e.g. "cofc". From there, it uses these values to create some headers that are used in combination with the requests library to wrap requests against the Cascade CMS REST API in simple methods, like list_sites. The methods are based on the API's WSDL description. (Replace my-org in the previous link with your own organization).

Installation

To install the package, simply run:

pip install py-cascade-cms-api

Usage

# import
from cascadecmsdriver.driver import CascadeCMSRestDriver

# you can provide a username and password or alternatively an api key
# verbose boolean indicates whether to use verbose logging
driver = CascadeCMSRestDriver(
    organization_name="my-org", api_key='my-api-key', verbose=True)
## driver = CascadeCMSRestDriver(
##    organization_name="my-org", username='my-username', password='my-password',
##    verbose=True)
##
sites = driver.list_sites()['sites']
for s in sites:
    asset = driver.read_asset(asset_type='site', asset_identifier=s['id'])
    driver.debug(asset)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-cascade-cms-api-1.1.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

py_cascade_cms_api-1.1.1-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file py-cascade-cms-api-1.1.1.tar.gz.

File metadata

  • Download URL: py-cascade-cms-api-1.1.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.1

File hashes

Hashes for py-cascade-cms-api-1.1.1.tar.gz
Algorithm Hash digest
SHA256 f3f84f304fd8fe01c9bbdeb4f402aff198244cc10e573df7b598c2015070fd8e
MD5 dd3722d2100634e4250d4d4ad661d7ec
BLAKE2b-256 ac15612bbc343ed60edce6b0ec39bce4ab0081810296042779c9f9258a5228e6

See more details on using hashes here.

File details

Details for the file py_cascade_cms_api-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for py_cascade_cms_api-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9fc03d5bacfe26ab6acbf58914886d64c8026a3c37b1063c6058dab0a3bbeb62
MD5 2eb698990fe365b70937f2d715345e5d
BLAKE2b-256 9a629cf46c1f462b3e5509bcc9dfb0a24fac096f1c2d42e65d22a5c1e6e74e89

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page