Python client library for Cradlepoint NCM APIv3
Project description
Cradlepoint NCMv3 Python Module
This is a Python client library for Cradlepoint NCM APIv3
INSTALL AND RUN INSTRUCTIONS
-
Install the ncmv3 pip package, or copy the ncmv3.py file into your working directory:
pip3 install ncmv3
-
Set your NCM APIv3 Key (without the "Bearer" prefix).
api_key = "babwY0bNYqMwa0Kt0VTRknk6pqmOzNuz"
-
Import the module and create an instance of the NcmClient object:
If using pip:
from ncmv3 import ncmv3 n3 = ncmv3.NcmClient(api_key=api_key)
If not using pip:
import ncmv3 n3 = ncm.NcmClient(api_key=api_key)
-
Call functions from the module as needed. For example:
print(n3.get_users())
USAGE AND TIPS:
This python class includes a few optimizations to make it easier to work with the API. Cradlepoint's max page size is 50. This module allows specifying a higher limit than 50, which will handle page parsing automatically.
This can be modified by specifying a "limit parameter":
n3.get_accounts(limit=10)
You can also return the full list of records in a single array without the need for paging by passing limit=0:
n3.get_accounts(limit=0)
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 ncmv3-0.0.2.tar.gz
.
File metadata
- Download URL: ncmv3-0.0.2.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccd0a0d7c037a10104665a5b860926d73ab6d38473da385642ecb716d88b2924 |
|
MD5 | 360d736613fb6cc15cc33121c5f6b908 |
|
BLAKE2b-256 | 0331a24bedc64de99af772c7108536765593e2a86d8667eb6c506958127de87a |
File details
Details for the file ncmv3-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: ncmv3-0.0.2-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46a08f66714a12280b78f14c9c9b17231f6d856bfcb417b2702738e9e6970cad |
|
MD5 | 477e3128d087cdc107a55ac4a3b84fb7 |
|
BLAKE2b-256 | 9c96d36bbdb56c9c331162af7ad2ad047d76cc7676943936583904c6d4b24c62 |