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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 2Python 3

File details

Details for the file msz_svr_conn-0.0.1.tar.gz.

File metadata

  • Download URL: msz_svr_conn-0.0.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for msz_svr_conn-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0d2a77d2e1fb64283f2c59fa943c2c3d749c699a95f9059e855256ebbe8f6c46
MD5 f53bd6cd4b91b832b6859ae37021d412
BLAKE2b-256 f60ee8c57f9a9e58c8b14db5d7a02ecdcd1280e31884d4e26acf22ae0ae1fb58

See more details on using hashes here.

File details

Details for the file msz_svr_conn-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: msz_svr_conn-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for msz_svr_conn-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0f3fee0bc61702d8fd67282712d1e4fab777a7835d455168556554279057e72e
MD5 575c7cf325be829f57aa20a10e7e7e4b
BLAKE2b-256 d9174e535456a8d186500fce8fce152ca16e0c24102824e167166fce493c250e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page