Skip to main content

Python library for consuming the Pureport Fabric API

Project description

Pureport Python SDK

test Documentation Status

The Pureport Python Client provides a Python programmatic interface to the Pureport REST API. The Pureport Python Client is predominately a session and transport library designed to making interfacing with the API simple. For more information about Pureport or to sign up for an account please visit the website.

Installing

You can install the Pureport Python Client using pip.

   $ pip install pureport-python

This project can be run directly from source as well using pipenv. To get started with running this from source, be sure you have pipenv installed on your local system. For information about pipenv please see their website here

   $ git clone https://github.com/pureport/pureport-python
   $ cd pureport-python
   $ pipenv shell
   $ pipenv install -d
   $ python setup.py develop

Supported Python Versions

The Pureport Python Client supports Python 3.5+

Getting Started

In order to use this SDK, you must first have a valid Pureport acccount and have created and downloaded API keys. Once you have obtained your Pureport API keys, simply create environment variables for the API key and API secret.

To get started, either sign up or login to your existing Pureport account at https://console.pureport.com and generate your API keys.

Once the keys are generated, set the required environment variables.

   export PUREPORT_API_KEY="<your api key here>"
   export PUREPORT_API_SECRET="<your api secret here>"

This implementation provides a class for interfacing with the Pureport API. The session class handles authenticating to the API and provides convenience methods for sending requests to the server.

   from pureport.session import Session
   from pureport.credentials import default

   session = Session(*default())
   response = session.get("/accounts")
   print(response.json)

The library also provides a set of functional bindings to the Pureport API using the OpenAPI spec file. Bindings are not enabled by default when you create a new instance of Sesssion. To add bindings to a Session object, call make_bindings().

   from pureport.session import Session
   from pureport.credentials import default

   session = Session(*default())
   session.make_bindings()

   session.find_all_accounts()

Alternatively you can also enable bindings to be created at session initialization.

   from pureport.session import Session
   from pureport.credentials import default

   session = Session(*default(), automake_bindings=True)
   session.find_all_accounts()

For details and documentation of the Pureport Fabric API, please check the API section of the Pureport Console

Contributing

This project provides an easy to use implementation for consuming the Pureport Fabric API for building and managing multicloud networks. We gladly accept contributions to this project from open source community contributors.

There are many ways to contribute to this project from opening issues, providing documentation updates and, of course, providing code. If you are considering contributing to this project, please review the guidlines for contributing to this project found here.

Also please be sure to review our open source community Code of Conduct found here.

License

This project is licenses under the MIT open source license.

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

pureport-python-0.5.0.tar.gz (64.8 kB view details)

Uploaded Source

Built Distribution

pureport_python-0.5.0-py3-none-any.whl (67.0 kB view details)

Uploaded Python 3

File details

Details for the file pureport-python-0.5.0.tar.gz.

File metadata

  • Download URL: pureport-python-0.5.0.tar.gz
  • Upload date:
  • Size: 64.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for pureport-python-0.5.0.tar.gz
Algorithm Hash digest
SHA256 06f13b8a47963975570a6cc8d3076b44b8317050cd4882b6c1a23869ea8db4a7
MD5 41043f74a05cc802ad0dc33fd4dc2e8a
BLAKE2b-256 28342cf4e2191661dc03466c4a7e9d08f872d4f60815e1a7133a7f25593175b5

See more details on using hashes here.

File details

Details for the file pureport_python-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: pureport_python-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 67.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for pureport_python-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0531070da6e2e096aa076c6e0cc736a75f4213c74c1168c599221791de2f686f
MD5 17611f942f318dc0052155ed139f3891
BLAKE2b-256 56b07e4e2aee3baecfcb4a6ee10408bfcef5751ab1b63ca4741d0c1d7e2998b6

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