pycookiecheat
Borrow cookies from your browser's authenticated session for use in Python scripts.
What it is and what it does
Pycookiecheat reads and decrypts cookies stored by your browser, allowing Python scripts to reuse an authenticated session without manual login. It works with Chrome, Firefox, Brave, and Slack on macOS and Linux, and can be used as either a command-line tool or imported as a library. The package handles browser-specific cookie storage formats and encryption, using cryptography and keyring to access stored credentials.
The main use case is automating requests that require browser authentication—for example, downloading files from a site where you're already logged in, or scraping pages that require a session. You pass a URL to get_cookies(), which returns decrypted cookies for that domain. The CLI can also output cookies in Netscape format for use with other tools.
Use it for:
- Automate downloads from authenticated websites by reusing your browser's session cookies
- Scrape web pages that require login by borrowing cookies from your already-authenticated browser session
- Export browser cookies to Netscape format for use with command-line tools
- Build scripts that interact with web services you're logged into without hardcoding credentials
- Test web applications by programmatically using cookies from a real browser session
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extracts and decrypts cookies from Chrome, Firefox, Brave, and Slack browsers on macOS and Linux for use in Python scripts.
Yes, if you need to automate requests with browser authentication on macOS or Linux. Install friction is low, maintenance is active, and there are no known vulnerabilities. The MIT license poses no restrictions. Caveat: Linux users may need to install system packages for keyring support, and Windows is not supported.
Install
pycookiecheat on PyPI
pip
pip install pycookiecheatuv
uv add pycookiecheatpoetry
poetry add pycookiecheatInstalling pycookiecheat
Before you install
Low install friction with a pure-Python wheel. Maintenance is active with recent commits. Runtime dependencies are cryptography and keyring, both stable libraries. Linux users may need system packages for alternative keyring support.
License in practice
MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pycookiecheat
from pycookiecheat import get_cookies, BrowserType
cookies = get_cookies('https://example.com')
# Or specify a different browser:
cookies = get_cookies('https://example.com', browser=BrowserType.FIREFOX)
On Linux, you may need to install libsecret-1-dev and python3-gi system packages, and use --system-site-packages when creating a virtualenv. Windows is not supported.
Verify before relying
- Whether all Chromium-based browsers beyond Chrome, Brave, and Slack are supported via manual cookie_file paths
- Whether Windows support has been added since the FAQ stated it was not planned
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — cryptography, keyring |
| Maintenance | actively maintained — 649 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 109,657/month — #12,505 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pycookiecheat-0.8.0-py3-none-any.whl
Keywords: pycookiecheat, chrome, chromium cookies, cookies, firefox
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
browser-cookie3Extracts cookies from your browser's local…
copyleft · top 5,000 on PyPI
flask-unsignCommand-line tool to decode, brute-force, and…
permissive · top 15,000 on PyPI
cookiesParses and renders HTTP Cookie and Set-Cookie…
permissive · top 15,000 on PyPI
macaroonbakeryMacaroonbakery provides HTTP authentication and…
copyleft · top 5,000 on PyPI
primpHTTP client library that mimics real web…
permissive · top 5,000 on PyPI
streamlit-cookies-controllerProvides read, write, and delete operations on…
permissive · top 15,000 on PyPI
fetch-useRoutes HTTP requests through Browser-Use's…
permissive · top 5,000 on PyPI
seleniumSelenium provides Python bindings to automate…
permissive · top 1,000 on PyPI
pymacaroonsPyMacaroons implements macaroons—bearer…
permissive · top 5,000 on PyPI
django-cookie-consentA Django application that manages cookie…
permissive · top 15,000 on PyPI