--- id: macaroonbakery version: "1.3.4" license: LGPL3 license_treatment: copyleft maintenance: dormant --- # macaroonbakery — A Python library port for bakery, higher level operation to work with macaroons License: copyleft · Maintenance: dormant · Downloads: 830.0K/mo ## What it is and what it does Macaroonbakery is a Python library that implements higher-level operations for working with macaroons—cryptographic authorization tokens—in HTTP contexts. It provides a BakeryAuth handler that integrates with the requests library to transparently manage macaroon cookies across multiple HTTP requests to protected endpoints. The library handles the complexity of macaroon validation and cookie storage, allowing developers to authenticate to macaroon-protected services without manually managing the cryptographic handshake. The package depends on a substantial cryptographic stack (PyNaCl, cryptography, pyOpenSSL, pymacaroons) and is designed primarily for systems that use macaroon-based authorization schemes. It was developed as a port of Go's macaroon-bakery library and is most useful in environments where macaroon authentication is already the standard—such as Juju, Canonical's orchestration platform, or other systems built around macaroon-based access control. Use it for: - Authenticate to Juju or other macaroon-bakery-protected services using Python HTTP clients. - Manage macaroon cookies across multiple requests to the same protected API without re-authenticating. - Integrate macaroon-based authorization into Python applications that need to call protected endpoints. - Handle cryptographic cookie validation and refresh transparently in HTTP workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Macaroonbakery provides HTTP authentication and cookie handling for macaroon-based access control, integrating with the requests library to manage macaroon cookies across protected API calls. Yes, but with caution. Install if you need to authenticate to a macaroon-bakery-protected service and have no alternative. The low install friction and absence of known vulnerabilities are positives, but the dormant maintenance status (975 days since last release, no commits since May 2024) and outdated Python version support (classifiers only list up to 3.5) mean you should verify compatibility with your target Python version and dependencies before committing to production use. ## Install pip install macaroonbakery uv add macaroonbakery poetry add macaroonbakery ## Installing macaroonbakery Before you install: Low install friction with a pure-Python wheel, but maintenance is dormant—last release was 975 days ago and the repository shows no recent commits since 2024-05-23. The 11 runtime dependencies include cryptographic libraries (PyNaCl, cryptography, pyOpenSSL) that may require system libraries like libsodium on some platforms. License in practice: Licensed under LGPLv3 (copyleft). Any derivative work or modification must be released under the same license; static linking or bundling may trigger copyleft obligations depending on how you distribute the software. Quickstart: pip install macaroonbakery from macaroonbakery import httpbakery import requests jar = requests.cookies.RequestsCookieJar() resp = requests.get('https://example.com/protected', cookies=jar, auth=httpbakery.BakeryAuth(cookies=jar)) libsodium system library may be required on some platforms; see installation notes for Ubuntu/Debian setup. Verify before relying: - Whether the package works reliably with modern Python versions (classifiers list only up to 3.5, released 2015). - Current compatibility with recent versions of protobuf, PyNaCl, and cryptography dependencies. - Whether dormant status indicates the package is still maintained or has been superseded. ## Package facts - License: LGPL3 (copyleft) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 830.0K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags macaroon authentication, HTTP cookie bakery, macaroon-based access control, requests library auth handler, cryptographic cookie management, macaroon session handling, protected API authentication, macaroon-auth, http-cookies, cryptographic-tokens [View on SkillFed](https://skillfed.io/packages/macaroonbakery) · [View on PyPI](https://pypi.org/project/macaroonbakery/)