cascade-cms
A typed, async REST client for Hannon Hill Cascade CMS.
Usage
from cascade_cms.cmstypes import Asset, IdentifierType
from cascade_cms.wrapper import CascadeWrapperBase
environment_variables = {
"API_KEY": "...",
"CASCADE_URL": "...",
"SERVER": "prod", # label used for logfile naming
}
configuration_variables = {
"cache_name": "./cache/cache.sqlite",
"allowed_codes": (200,),
"allowed_methods": ("GET",),
}
with CascadeWrapperBase(environment_variables, configuration_variables) as cascade:
identifier = IdentifierType(identifier="e868f539ac1001062cfa029c4c5df4d0", asset_type="folder")
cascade.operations.read(identifier)
results = cascade.submit_requests(Asset)
Operations that take an identifier (read, delete, copy, move, publish, checkIn, checkOut,
listSubscribers, readAccessRights, readWorkflowSettings, readWorkflowInformation,
performWorkflowTransition) accept either an IdentifierType (asset type + UUID) or a Path
(asset type + site name + site-relative path) — see cascade_cms.cmstypes.resolve_identifier.
See examples/read_and_update_asset.py for a fuller walkthrough.
Logging
CascadeWrapperBase accepts an optional third debug argument. Leaving it as None
(the default) runs in normal mode: a minimal console ([INIT]/[RUNNING]/Processed: n/N/
[DONE]/[EXIT]) plus a simple logfile at ./logs/{SERVER}_{timestamp}.log. Passing a dict
switches to debug mode: a quiet console and a verbose, nested logfile at
./logs/{SERVER}_debug_{timestamp}.log describing every request, response, callback, and error.
debug_config = {
"log_dir": "./logs",
"log_operations": True,
"log_callbacks": True,
"log_responses": True,
"show_payload_data": True,
"show_network_headers": False,
"show_error_variables": True,
"response_line_limit": 8, # -1 = dump full response body
}
with CascadeWrapperBase(environment_variables, configuration_variables, debug=debug_config) as cascade:
...
All keys are required in debug mode — there are no inferred defaults, so you always know what you opted into.
Development
pip install -e ".[dev]"
pytest
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cascade_cms_rest-2.0.3.tar.gz.
File metadata
- Download URL: cascade_cms_rest-2.0.3.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
271804fa8d41da49bf6d21863f42cc6c4f0d4f3673181edae55aac9a520ed61e
|
|
| MD5 |
831da8541549c903a45de316fccb26b6
|
|
| BLAKE2b-256 |
3c45d1585f05d53bd2292baf78df2242c44f25b4d7a027f233f0608930385b24
|
Provenance
The following attestation bundles were made for cascade_cms_rest-2.0.3.tar.gz:
Publisher:
release.yml on Sharkdroid/py-cascade-cms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cascade_cms_rest-2.0.3.tar.gz -
Subject digest:
271804fa8d41da49bf6d21863f42cc6c4f0d4f3673181edae55aac9a520ed61e - Sigstore transparency entry: 2341711126
- Sigstore integration time:
-
Permalink:
Sharkdroid/py-cascade-cms@b6a2071a32b523143854190e0589711a404e03ad -
Branch / Tag:
refs/tags/v2.0.3 - Owner: https://github.com/Sharkdroid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b6a2071a32b523143854190e0589711a404e03ad -
Trigger Event:
push
-
Statement type:
File details
Details for the file cascade_cms_rest-2.0.3-py3-none-any.whl.
File metadata
- Download URL: cascade_cms_rest-2.0.3-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dae10cebc6d6ac690074fb29c9bd1ac2d1e47521aeafb13748677a00e50fdc1e
|
|
| MD5 |
ed42b967b8057d15857aa0268bebe9e2
|
|
| BLAKE2b-256 |
09c5239b4b9621391b2cbbe8e1c39500362f79e318931b0e59eae201070cb6f1
|
Provenance
The following attestation bundles were made for cascade_cms_rest-2.0.3-py3-none-any.whl:
Publisher:
release.yml on Sharkdroid/py-cascade-cms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cascade_cms_rest-2.0.3-py3-none-any.whl -
Subject digest:
dae10cebc6d6ac690074fb29c9bd1ac2d1e47521aeafb13748677a00e50fdc1e - Sigstore transparency entry: 2341711131
- Sigstore integration time:
-
Permalink:
Sharkdroid/py-cascade-cms@b6a2071a32b523143854190e0589711a404e03ad -
Branch / Tag:
refs/tags/v2.0.3 - Owner: https://github.com/Sharkdroid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b6a2071a32b523143854190e0589711a404e03ad -
Trigger Event:
push
-
Statement type: