A Python library port for bakery, higher level operation to work with macaroons
Project description
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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file macaroonbakery-1.3.4.tar.gz
.
File metadata
- Download URL: macaroonbakery-1.3.4.tar.gz
- Upload date:
- Size: 82.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41ca993a23e4f8ef2fe7723b5cd4a30c759735f1d5021e990770c8a0e0f33970 |
|
MD5 | e529bdb6a8aeec80aa6c701e98c6bcdc |
|
BLAKE2b-256 | 4bae59f5ab870640bd43673b708e5f24aed592dc2673cc72caa49b0053b4af37 |
File details
Details for the file macaroonbakery-1.3.4-py2.py3-none-any.whl
.
File metadata
- Download URL: macaroonbakery-1.3.4-py2.py3-none-any.whl
- Upload date:
- Size: 103.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e952a189f5c1e96ef82b081b2852c770d7daa20987e2088e762dd5689fb253b |
|
MD5 | 55a9351cb5ee6e49357e45293ad5a549 |
|
BLAKE2b-256 | 6042227f748dc222b7a1c5cb40c7c74ab4162c7fc146b88980776b490ab673a1 |