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


Download files

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

Source Distribution

msz_svr_conn-0.0.1.tar.gz (10.0 kB view hashes)

Uploaded Source

Built Distribution

msz_svr_conn-0.0.1-py2.py3-none-any.whl (11.7 kB view hashes)

Uploaded Python 2 Python 3

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