An API Client to use Cradlepoint RESTful API.
Project description
CradlepointAPIClient
An API Client for Cradlepoint to be able to easily use the API in a more standard way.
How to install
$ pip install CradlepointAPIClient
Usage
the argument "method" must be specify every time.
Default arguments and attributes
import CradlepointAPIClient
client = CradlepointAPIClient.Client(api_version='v2', verify=True)
client.get(method='', data=None)
# client.headers
# client.url_base
The first query
import CradlepointAPIClient
import json
client = CradlepointAPIClient.Client(api_version='v2', verify=True)
client.connect(x_cp_api_id='', x_cp_api_key='', x_ecm_api_id='', x_ecm_api_key='')
response = client.get(method='/groups')
print(json.dumps(response.json(), indent=4))
client.disconnect()
Paging
import CradlepointAPIClient
import json
client = CradlepointAPIClient.Client(api_version='v2', verify=True)
client.connect(x_cp_api_id='', x_cp_api_key='', x_ecm_api_id='', x_ecm_api_key='')
response = client.get(method='/groups', offset=0, limit=1)
print(json.dumps(response.json(), indent=4))
client.disconnect()
Fields
import CradlepointAPIClient
import json
client = CradlepointAPIClient.Client(api_version='v2', verify=True)
client.connect(x_cp_api_id='', x_cp_api_key='', x_ecm_api_id='', x_ecm_api_key='')
response = client.get(method='/groups', offset=0, limit=1, fields='id,name')
print(json.dumps(response.json(), indent=4))
client.disconnect()
Filtering
import CradlepointAPIClient
import json
client = CradlepointAPIClient.Client(api_version='v2', verify=True)
client.connect(x_cp_api_id='', x_cp_api_key='', x_ecm_api_id='', x_ecm_api_key='')
response = client.get(method='/groups', offset=0, limit=1, fields='id,name', name='test_group')
print(json.dumps(response.json(), indent=4))
client.disconnect()
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 Distribution
Built Distribution
File details
Details for the file CradlepointAPIClient-0.0.1.tar.gz
.
File metadata
- Download URL: CradlepointAPIClient-0.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f573e12a496b8f1ea313033287394be23ac16c598e416e114ec27263f4324ab |
|
MD5 | 94caf9e8a5bdcc80c30ad8cac72f5d69 |
|
BLAKE2b-256 | f175e3c4daab9f4a6d112960fe99c828c66b5599df1c565c17f92f68ece924f1 |
File details
Details for the file CradlepointAPIClient-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: CradlepointAPIClient-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 865d39c2bc108f30661bfa37ffb8fdd7a68a6402f2be3d283f4482d9ffa40d34 |
|
MD5 | bbe415397e7236690a0a2621ee949832 |
|
BLAKE2b-256 | b15000da7672f7394a2c5722e742d37afff40121d5ad543e14a3ed6cf6d299d2 |