macaroonbakery-1.3.4
توضیحات
A Python library port for bakery, higher level operation to work with macaroons
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | macaroonbakery-1.3.4 |
| نام | macaroonbakery |
| نسخه کتابخانه | 1.3.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Juju UI Team |
| ایمیل نویسنده | juju-gui@lists.ubuntu.com |
| آدرس صفحه اصلی | https://github.com/go-macaroon-bakery/py-macaroon-bakery |
| آدرس اینترنتی | https://pypi.org/project/macaroonbakery/ |
| مجوز | LGPL3 |
===============
Macaroon Bakery
===============
A Python library for working with macaroons.
Installation
------------
The easiest way to install macaroonbakery is via pip::
$ pip install macaroonbakery
macaroonbakery was developed around pymacaroons. On ubuntu, you
can get libsodium from a ppa::
$ sudo add-apt-repository ppa:yellow/ppa -y
$ apt-get install libsodium13
Usage
-----
Interacting with a protected url, you can use the BakeryAuth provided to deal
with the macaroon bakery
>>> from macaroonbakery import httpbakery
>>> jar = requests.cookies.RequestsCookieJar()
>>> resp = requests.get('some protected url',
cookies=jar,
auth=httpbakery.BakeryAuth(cookies=jar))
>>> resp.raise_for_status()
You can use any cookie storage you'd like so next subsequent calls the macaroon
saved in the cookie jar will be directly used and will not require
any other authentication (for example, cookielib.FileCookieJar).
نیازمندی
| مقدار | نام |
|---|---|
| <2.0,>=1.1.2 | PyNaCl |
| >=3.20.0 | protobuf |
| <2.0,>=1.0 | pyRFC3339 |
| <1.0,>=0.12.0 | pymacaroons |
| <3.0,>=2.18.1 | requests |
| <2.0,>=1.11.0 | six |
| ==1.3.2 | cryptography |
| ==0.3.3 | ndg-httpsclient |
| ==16.0.0 | pyOpenSSL |
| ==0.1.9 | pyasn1 |
| - | ipaddress |
نحوه نصب
نصب پکیج whl macaroonbakery-1.3.4:
pip install macaroonbakery-1.3.4.whl
نصب پکیج tar.gz macaroonbakery-1.3.4:
pip install macaroonbakery-1.3.4.tar.gz