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

Uploaded Source

Built Distribution

ncmv3-0.0.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

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

Hashes for ncmv3-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ccd0a0d7c037a10104665a5b860926d73ab6d38473da385642ecb716d88b2924
MD5 360d736613fb6cc15cc33121c5f6b908
BLAKE2b-256 0331a24bedc64de99af772c7108536765593e2a86d8667eb6c506958127de87a

See more details on using hashes here.

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

Hashes for ncmv3-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 46a08f66714a12280b78f14c9c9b17231f6d856bfcb417b2702738e9e6970cad
MD5 477e3128d087cdc107a55ac4a3b84fb7
BLAKE2b-256 9c96d36bbdb56c9c331162af7ad2ad047d76cc7676943936583904c6d4b24c62

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