py-cascade-cms-api


Namepy-cascade-cms-api JSON
Version 1.1.3 PyPI version JSON
download
home_pagehttps://github.com/austinjhunt/CascadeCMS
SummarySimplify interaction with Hannon Hill's Cascade CMS 8 REST API
upload_time2023-03-22 18:55:28
maintainer
docs_urlNone
authorAustin Hunt
requires_python>=3.6
licenseMIT
keywords cascade cms rest api hannon hill driver
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Cascade CMS 8 REST API Python Driver

This is a module for simplifying interaction with [Hannon Hill's Cascade CMS 8 REST API](https://www.hannonhill.com/cascadecms/latest/developing-in-cascade/rest-api/index.html). 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](py-cascade-cms/driver.py) 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](https://pypi.org/project/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](https://my-org.cascadecms.com/ws/services/AssetOperationService?wsdl). (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)

```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/austinjhunt/CascadeCMS",
    "name": "py-cascade-cms-api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "cascade,cms,rest,api,hannon hill,driver",
    "author": "Austin Hunt",
    "author_email": "austin353@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1d/9a/eb5a122fc9818f1623db370c7e9a270695083a2e61ea55b167f88aa8ff11/py-cascade-cms-api-1.1.3.tar.gz",
    "platform": null,
    "description": "# Cascade CMS 8 REST API Python Driver\r\n\r\nThis is a module for simplifying interaction with [Hannon Hill's Cascade CMS 8 REST API](https://www.hannonhill.com/cascadecms/latest/developing-in-cascade/rest-api/index.html). 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.\r\n\r\n## How it Works\r\n\r\nThe driver class [CascadeCMSRestDriver](py-cascade-cms/driver.py) 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](https://pypi.org/project/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](https://my-org.cascadecms.com/ws/services/AssetOperationService?wsdl). (Replace my-org in the previous link with your own organization).\r\n\r\n## Installation\r\n\r\nTo install the package, simply run:\r\n\r\n```\r\npip install py-cascade-cms-api\r\n```\r\n\r\n## Usage\r\n\r\n```\r\n# import\r\nfrom cascadecmsdriver.driver import CascadeCMSRestDriver\r\n\r\n# you can provide a username and password or alternatively an api key\r\n# verbose boolean indicates whether to use verbose logging\r\ndriver = CascadeCMSRestDriver(\r\n    organization_name=\"my-org\", api_key='my-api-key', verbose=True)\r\n## driver = CascadeCMSRestDriver(\r\n##    organization_name=\"my-org\", username='my-username', password='my-password',\r\n##    verbose=True)\r\n##\r\nsites = driver.list_sites()['sites']\r\nfor s in sites:\r\n    asset = driver.read_asset(asset_type='site', asset_identifier=s['id'])\r\n    driver.debug(asset)\r\n\r\n```\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simplify interaction with Hannon Hill's Cascade CMS 8 REST API",
    "version": "1.1.3",
    "split_keywords": [
        "cascade",
        "cms",
        "rest",
        "api",
        "hannon hill",
        "driver"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "76e4786b446563a946d913845fec5fa43b3e6a1b830a58c7492fa3441f0eda2f",
                "md5": "867f0f3defd7b5bb557d44bb47496804",
                "sha256": "9c14808eb60e58a21ab11d9f01280310d8aedcdf69674b96d21b903504e81a17"
            },
            "downloads": -1,
            "filename": "py_cascade_cms_api-1.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "867f0f3defd7b5bb557d44bb47496804",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 14708,
            "upload_time": "2023-03-22T18:55:27",
            "upload_time_iso_8601": "2023-03-22T18:55:27.449627Z",
            "url": "https://files.pythonhosted.org/packages/76/e4/786b446563a946d913845fec5fa43b3e6a1b830a58c7492fa3441f0eda2f/py_cascade_cms_api-1.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1d9aeb5a122fc9818f1623db370c7e9a270695083a2e61ea55b167f88aa8ff11",
                "md5": "146ac455cb61c4e6a867a843ab6bc63b",
                "sha256": "bede01aa2ffb66b13fe618f1bcb3fe05db08d30316fcd1b159642724a7991663"
            },
            "downloads": -1,
            "filename": "py-cascade-cms-api-1.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "146ac455cb61c4e6a867a843ab6bc63b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 15069,
            "upload_time": "2023-03-22T18:55:28",
            "upload_time_iso_8601": "2023-03-22T18:55:28.874642Z",
            "url": "https://files.pythonhosted.org/packages/1d/9a/eb5a122fc9818f1623db370c7e9a270695083a2e61ea55b167f88aa8ff11/py-cascade-cms-api-1.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-22 18:55:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "austinjhunt",
    "github_project": "CascadeCMS",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "py-cascade-cms-api"
}
        
Elapsed time: 0.19654s