wotmshuaisi / PythonBceAPIAuth

shit api auth rule with baidu bce auth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PythonBceAPIAuth

forthebadge

More detail...

This program can generat a API Auth Token follow bce auth rule

Getting Started

Example

from PythonBceAPIAuth.bceauth import SignTokenGenerator
# build object
token_obj = SignTokenGenerator(
        'AK',  # access key id
        'SK',  # secret access key
        'POST',  # method
        '/v2/document',  # uri
        {'source':'bos'},  # get params
        'doc.bj.baidubce.com'  # endpoint
        )
# get token
print(token_obj.Token)

Depends

  • urllib
  • datetime
  • hashlib
  • hmac
  • time

About

shit api auth rule with baidu bce auth


Languages

Language:Python 100.0%