Skip to main content

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

  1. Install the ncmv3 pip package, or copy the ncmv3.py file into your working directory:

    pip3 install ncmv3
    
  2. Set your NCM APIv3 Key (without the "Bearer" prefix).

    api_key = "babwY0bNYqMwa0Kt0VTRknk6pqmOzNuz"
    
  3. 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)
    
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ncmv3-0.0.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

ncmv3-0.0.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file ncmv3-0.0.1.tar.gz.

File metadata

  • Download URL: ncmv3-0.0.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for ncmv3-0.0.1.tar.gz
Algorithm Hash digest
SHA256 58242129dc8d982f4b423267e75ebae6eae6399cb0a7fe47339b574531fde677
MD5 3218ee58285dc6cbd06a61d2dfb18476
BLAKE2b-256 56837918911946be57ea0aa4bc50ead36b9b47bbcf3d6baada4e8a2b53773e18

See more details on using hashes here.

File details

Details for the file ncmv3-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: ncmv3-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for ncmv3-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 679734abdb475f7d1fadfbac83fce289ed937785f2f330424d6f2913d748a91d
MD5 ea050dd41fbb79316ef7686b9f4858d8
BLAKE2b-256 f2c01b48ec1cecb8c2001495543837904cdbbf6cbc153745956f0fb167fbc152

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page