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.3.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

ncmv3-0.0.3-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ncmv3-0.0.3.tar.gz
  • Upload date:
  • Size: 11.0 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.3.tar.gz
Algorithm Hash digest
SHA256 b504015845306029e6e5f6156a30640940b2b92818e5def47c72fcfd032fdbae
MD5 8dd04b50869d408f9cd4ef63c8d16c13
BLAKE2b-256 a214a5736630b1af8c842f65ea7e3d6e33e1f785c18d7a491e4bd1ac687702b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ncmv3-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5642e47bd5bf3c86abeed0e9c094c356bde51a9e7790a1140001cc2d6399587b
MD5 675a730c61dabf9305e7eede27530419
BLAKE2b-256 687de0cac18b4231a34b5c42ea8e52dbda8308ef8d43b8e4886fefe96ad008a0

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