Skip to main content

Build Status Coverage Status image image image

baidu-bce-auth

帮助你生成百度云 API 的鉴权认证字符串(Authorization header)

百度云 API 鉴权认证的文档:https://cloud.baidu.com/doc/Reference/s/njwvz1yfu

使用方法,以 requests 为例

from bceauth.auth import make_auth

ak = 'xxx'
sk = 'yyy'
path = 'zzz'
url = 'http://example.com'
params = {}

requests.get(
    url,
    params=params,
    headers={
        'Authorization': make_auth(   # <== 调用 make_auth,得到 Authorization 的内容
            ak=ak,
            sk=sk,
            method='GET',
            path=path,
            params=params,
            headers={
                'Host': 'example.com',
            },
        ),
        'Host': 'example.com',
    }
)

完整的例子,可以参考:tests/test_auth.py

Metadata

Release files for baidu-bce-auth 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for baidu-bce-auth 0.0.5
File Interpreter ABI Platform
baidu_bce_auth-0.0.5-py3-none-any.whl Python 3 none any Details

Release files / baidu_bce_auth-0.0.5-py3-none-any.whl

Download URL baidu_bce_auth-0.0.5-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37dc6039bbae12718c76e0851e1faecc51436e98bb4be582c5ecd2b5c9819090
BLAKE2b-256 checksum
How to use checksums
c39050559c0265bfc40abc32d8675bfb80fbe76446e8d080b710eb04c53f1908
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.8

Security for baidu-bce-auth 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file No provenance

0.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page