Coder Social home page Coder Social logo

ncmv3's Introduction

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.