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 | RSS feed
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)
Built Distribution
Close
Hashes for msz_svr_conn-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f3fee0bc61702d8fd67282712d1e4fab777a7835d455168556554279057e72e |
|
MD5 | 575c7cf325be829f57aa20a10e7e7e4b |
|
BLAKE2b-256 | d9174e535456a8d186500fce8fce152ca16e0c24102824e167166fce493c250e |