Skip to main content

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).

Metadata

Release files for macaroonbakery 1.3.4

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

Source distribution (sdist)

Source distribution for macaroonbakery 1.3.4
File Size Uploaded
macaroonbakery-1.3.4.tar.gz 82.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for macaroonbakery 1.3.4
File Interpreter ABI Platform
macaroonbakery-1.3.4-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 185.3 kB

Release files / macaroonbakery-1.3.4.tar.gz

Download URL macaroonbakery-1.3.4.tar.gz
Size 82.1 kB
Tags Source
SHA-256 checksum
How to use checksums
41ca993a23e4f8ef2fe7723b5cd4a30c759735f1d5021e990770c8a0e0f33970
BLAKE2b-256 checksum
How to use checksums
4bae59f5ab870640bd43673b708e5f24aed592dc2673cc72caa49b0053b4af37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / macaroonbakery-1.3.4-py2.py3-none-any.whl

Download URL macaroonbakery-1.3.4-py2.py3-none-any.whl
Size 103.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
1e952a189f5c1e96ef82b081b2852c770d7daa20987e2088e762dd5689fb253b
BLAKE2b-256 checksum
How to use checksums
6042227f748dc222b7a1c5cb40c7c74ab4162c7fc146b88980776b490ab673a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.3.4 This release

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

1 release file

1.3.0

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.0.6

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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