https://github.com/skylothar/requests-bce
Baidu BCE using python-request
https://github.com/skylothar/requests-bce
Last synced: 2 months ago
JSON representation
Baidu BCE using python-request
- Host: GitHub
- URL: https://github.com/skylothar/requests-bce
- Owner: SkyLothar
- License: apache-2.0
- Created: 2015-07-21T07:05:50.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-25T17:35:36.000Z (over 9 years ago)
- Last Synced: 2024-09-26T19:49:55.173Z (8 months ago)
- Language: Python
- Size: 156 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
BCE using python-requests
============================Version
-------
v0.0.4.. image:: https://img.shields.io/travis/SkyLothar/requests-bce.svg?style=flat-square
:target: https://travis-ci.org/SkyLothar/requests-bce.. image:: https://img.shields.io/coveralls/SkyLothar/requests-bce/master.svg?style=flat-square
:target: https://coveralls.io/r/SkyLothar/requests-bce.. image:: https://requires.io/github/SkyLothar/requests-bce/requirements.svg?branch=master
:target: https://requires.io/github/SkyLothar/requests-bce/requirements/?branch=master.. image:: https://img.shields.io/pypi/pyversions/requests-bce.svg?style=flat-square
:target: https://pypi.python.org/pypi/requests-bce/
:alt: Supported Python versions.. image:: https://img.shields.io/github/license/skylothar/requests-bce.svg?style=flat-square
:target: https://pypi.python.org/pypi/requests-bce/
:alt: LicenseBCE authentication for the awesome requests!
--------------------------------------------
support auth version: v1- [x] BCM
How to Install
--------------
Just.. code-block:: bash
pip install requests-bce
How to Use
----------
Just pass the auth object to requests.. code-block:: python
>>> import requests
>>> from bceauth import AuthV1
>>> req = requests.post(
... "http://example.com/path/to/file",
... auth=AuthV1("access-key", "secret-key")
... )
Or set the auth attribute to the session object
.. code-block:: python
>>> import requests
>>> from bceauth import AuthV1
>>> session = requests.session()
>>> session.auth = AuthV1("access-key", "secret-key")
>>> req = session.get("http://example.com/path/to/file")