{ "info": { "author": "huangshaoyan", "author_email": "huangshaoyan1982@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Typing :: Typed" ], "description": "[![Build Status](https://travis-ci.org/HuangShaoyan/baidu-bce-auth.svg?branch=master)](https://travis-ci.org/HuangShaoyan/baidu-bce-auth)\n[![Coverage Status](https://coveralls.io/repos/github/HuangShaoyan/baidu-bce-auth/badge.svg?branch=master)](https://coveralls.io/github/HuangShaoyan/baidu-bce-auth?branch=master)\n[![image](https://img.shields.io/pypi/v/baidu-bce-auth.svg)](https://pypi.org/project/baidu-bce-auth/)\n[![image](https://img.shields.io/pypi/l/baidu-bce-auth.svg)](https://pypi.org/project/baidu-bce-auth/)\n[![image](https://img.shields.io/pypi/pyversions/baidu-bce-auth.svg)](https://pypi.org/project/baidu-bce-auth/)\n\n\n# baidu-bce-auth\n\n\u5e2e\u52a9\u4f60\u751f\u6210\u767e\u5ea6\u4e91 API \u7684\u9274\u6743\u8ba4\u8bc1\u5b57\u7b26\u4e32(Authorization header)\n\n\u767e\u5ea6\u4e91 API \u9274\u6743\u8ba4\u8bc1\u7684\u6587\u6863\uff1ahttps://cloud.baidu.com/doc/Reference/s/njwvz1yfu\n\n\u4f7f\u7528\u65b9\u6cd5\uff0c\u4ee5 requests \u4e3a\u4f8b\n\n```\nfrom bceauth.auth import make_auth\n\nak = 'xxx'\nsk = 'yyy'\npath = 'zzz'\nurl = 'http://example.com'\nparams = {}\n\nrequests.get(\n url,\n params=params,\n headers={\n 'Authorization': make_auth( # <== \u8c03\u7528 make_auth\uff0c\u5f97\u5230 Authorization \u7684\u5185\u5bb9\n ak=ak,\n sk=sk,\n method='GET',\n path=path,\n params=params,\n headers={\n 'Host': 'example.com',\n },\n ),\n 'Host': 'example.com',\n }\n)\n```\n\n\u5b8c\u6574\u7684\u4f8b\u5b50\uff0c\u53ef\u4ee5\u53c2\u8003\uff1a[tests/test_auth.py](tests/test_auth.py)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/HuangShaoyan/baidu-bce-auth", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "baidu-bce-auth", "package_url": "https://pypi.org/project/baidu-bce-auth/", "platform": "", "project_url": "https://pypi.org/project/baidu-bce-auth/", "project_urls": { "Homepage": "https://github.com/HuangShaoyan/baidu-bce-auth" }, "release_url": "https://pypi.org/project/baidu-bce-auth/0.0.4/", "requires_dist": null, "requires_python": ">=3.6", "summary": "\u5e2e\u52a9\u4f60\u751f\u6210\u767e\u5ea6\u4e91 API \u7684\u9274\u6743\u8ba4\u8bc1\u5b57\u7b26\u4e32(Authorization header)", "version": "0.0.4" }, "last_serial": 5696902, "releases": { "0.0.1": [], "0.0.2": [ { "comment_text": "", "digests": { "md5": "6d314f813f4de9fb2de6bef48aa28d0b", "sha256": "806b4c6a6d712dd68503ea5807df428fb96c646c0e5d84eb27ebaca126204452" }, "downloads": -1, "filename": "baidu_bce_auth-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "6d314f813f4de9fb2de6bef48aa28d0b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 8887, "upload_time": "2019-08-14T12:14:00", "url": "https://files.pythonhosted.org/packages/be/01/7f3321a6b97d96523ebe05e7d7a1585dce298addbd02bed0c70a3088200e/baidu_bce_auth-0.0.2-py3-none-any.whl" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "6deee77d0c70fb2d6fb44d5aec1353eb", "sha256": "ffbb119d1d3b86fbb3d58a4967179db81ec25071bce53c9794c1cc7f1813df54" }, "downloads": -1, "filename": "baidu_bce_auth-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "6deee77d0c70fb2d6fb44d5aec1353eb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 8973, "upload_time": "2019-08-14T12:51:51", "url": "https://files.pythonhosted.org/packages/ab/92/777bfb07f0d39900df09d28620e8a3c4b77f6a9023f112b2e714942b7e60/baidu_bce_auth-0.0.3-py3-none-any.whl" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "7bf20e43274d4e7d71f6cdaa0a568de4", "sha256": "adae493540118465e0fd45c17875ed8a0c2137e303ad1fbc0a87f61fee19af30" }, "downloads": -1, "filename": "baidu_bce_auth-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "7bf20e43274d4e7d71f6cdaa0a568de4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 8954, "upload_time": "2019-08-19T06:36:44", "url": "https://files.pythonhosted.org/packages/2a/b3/001d7e44bdf502bb2b61eec577b8b35b4f0bded9b0a479637e134cd84d95/baidu_bce_auth-0.0.4-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7bf20e43274d4e7d71f6cdaa0a568de4", "sha256": "adae493540118465e0fd45c17875ed8a0c2137e303ad1fbc0a87f61fee19af30" }, "downloads": -1, "filename": "baidu_bce_auth-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "7bf20e43274d4e7d71f6cdaa0a568de4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 8954, "upload_time": "2019-08-19T06:36:44", "url": "https://files.pythonhosted.org/packages/2a/b3/001d7e44bdf502bb2b61eec577b8b35b4f0bded9b0a479637e134cd84d95/baidu_bce_auth-0.0.4-py3-none-any.whl" } ] }