authentication for ucloud service
Project description
UCloud authentication for the awesome requests!
How to Install
Just
pip install requests-ucloud
How to Use
Just pass the auth object to requests
>>> import requests
>>> from ucloudauth import UCloudAuth
>>> req = requests.get(
... "https://api.ucloud.cn/",
... params=dict(SomeParams="SomeValue"),
... auth=UCLoudAuth("public-key", "private-key")
... )
<Response [200]>
Or set the auth attribute to the session object
>>> import requests
>>> from ucloudauth import UCloudAuth
>>> session = requests.session()
>>> session.auth = UCloudAuth("public-key", "private-key")
>>> req = session.get(
... "https://api.ucloud.cn/",
... params=dict(SomeParams="SomeValue")
... )
<Response [200]>
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
requests-ucloud-0.0.1.tar.gz
(6.8 kB
view hashes)