Skip to main content

Server Connection

Project description

Server Connection

This package provides a python wrapper for connecting to a resource server

Sample usage

.. code-block:: python

from msz_svr_conn import ApiConnection

conn = ApiConnection(
    'localhost:8000',
    '<your oauth id>',
    '<your oauth secret'>,
    '<your user email>',  # or <your user phone number>
    '<your user password',
    token_url='<url to token resource on auth_server>'
)

# call a resource server with base url 'localhost:8000'
conn.call_stub('/api/resource/')

# call another resource server using the same credentials
conn.call('http://domain.com/api/resource/')

# after the access token expires, refresh the token
conn.refresh('<url to token resource on auth_server>')

Project details


Release history Release notifications

This version

0.0.1

Download files

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

Files for msz-svr-conn, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size msz_svr_conn-0.0.1-py2.py3-none-any.whl (11.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size msz_svr_conn-0.0.1.tar.gz (10.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page