Python API client for Directory CMS.
Project description
# directory-cms-client
[![circle-ci-image]][circle-ci]
[![codecov-image]][codecov]
[![pypi-image]][pypi]
[![snyk-image]][snyk]
**Directory CMS client.**
Client for the Directory Content Management read-only API.
---
## Installation
```sh
$ pip install directory-cms-client
```
The api client expects the following settings:
| Setting | Notes |
| ---------------------------------------- | ----------------------------------------------------------- |
| DIRECTORY_CMS_API_CLIENT_BASE_URL | |
| DIRECTORY_CMS_API_CLIENT_API_KEY | Unique to client. Retrieved during the on-boarding process. |
| DIRECTORY_CMS_API_CLIENT_SENDER_ID | Unique to client. Retrieved during the on-boarding process. |
| DIRECTORY_CMS_API_CLIENT_DEFAULT_TIMEOUT | |
Once that is done the API client can be used:
```py
from directory_api_client.client import cms_api_client
```
## Development
```shell
$ git clone https://github.com/uktrade/directory-cms-client
$ cd directory-cms-client
$ [create virtual environment and activate]
$ pip install -r requirements_test.txt
```
## Publish to PyPI
The package should be published to PyPI on merge to master. If you need to do it locally then get the credentials from rattic and add the environment variables to your host machine:
| Setting |
| --------------------------- |
| DIRECTORY_PYPI_USERNAME |
| DIRECTORY_PYPI_PASSWORD |
Then run the following command:
```sh
make publish
```
[circle-ci-image]: https://circleci.com/gh/uktrade/directory-cms-client/tree/master.svg?style=svg
[circle-ci]: https://circleci.com/gh/uktrade/directory-cms-client/tree/master
[codecov-image]: https://codecov.io/gh/uktrade/directory-cms-client/branch/master/graph/badge.svg
[codecov]: https://codecov.io/gh/uktrade/directory-cms-client
[pypi-image]: https://badge.fury.io/py/directory-cms-client.svg
[pypi]: https://badge.fury.io/py/directory-cms-client
[snyk-image]: https://snyk.io/test/github/uktrade/directory-cms-client/badge.svg
[snyk]: https://snyk.io/test/github/uktrade/directory-cms-client
[![circle-ci-image]][circle-ci]
[![codecov-image]][codecov]
[![pypi-image]][pypi]
[![snyk-image]][snyk]
**Directory CMS client.**
Client for the Directory Content Management read-only API.
---
## Installation
```sh
$ pip install directory-cms-client
```
The api client expects the following settings:
| Setting | Notes |
| ---------------------------------------- | ----------------------------------------------------------- |
| DIRECTORY_CMS_API_CLIENT_BASE_URL | |
| DIRECTORY_CMS_API_CLIENT_API_KEY | Unique to client. Retrieved during the on-boarding process. |
| DIRECTORY_CMS_API_CLIENT_SENDER_ID | Unique to client. Retrieved during the on-boarding process. |
| DIRECTORY_CMS_API_CLIENT_DEFAULT_TIMEOUT | |
Once that is done the API client can be used:
```py
from directory_api_client.client import cms_api_client
```
## Development
```shell
$ git clone https://github.com/uktrade/directory-cms-client
$ cd directory-cms-client
$ [create virtual environment and activate]
$ pip install -r requirements_test.txt
```
## Publish to PyPI
The package should be published to PyPI on merge to master. If you need to do it locally then get the credentials from rattic and add the environment variables to your host machine:
| Setting |
| --------------------------- |
| DIRECTORY_PYPI_USERNAME |
| DIRECTORY_PYPI_PASSWORD |
Then run the following command:
```sh
make publish
```
[circle-ci-image]: https://circleci.com/gh/uktrade/directory-cms-client/tree/master.svg?style=svg
[circle-ci]: https://circleci.com/gh/uktrade/directory-cms-client/tree/master
[codecov-image]: https://codecov.io/gh/uktrade/directory-cms-client/branch/master/graph/badge.svg
[codecov]: https://codecov.io/gh/uktrade/directory-cms-client
[pypi-image]: https://badge.fury.io/py/directory-cms-client.svg
[pypi]: https://badge.fury.io/py/directory-cms-client
[snyk-image]: https://snyk.io/test/github/uktrade/directory-cms-client/badge.svg
[snyk]: https://snyk.io/test/github/uktrade/directory-cms-client
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for directory_cms_client-4.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76343b5aa61864d0f9155f14b9972bec3c87faf51abaf29342c1b1a6c1b4ebbe |
|
MD5 | 1fbfb2e2ff832449cfaf047dffe9c26e |
|
BLAKE2b-256 | 69b167c0eee7ee3fae0b6af0cdca1696cbf7c804f3e0ce2b263413f060c0c497 |