python-squarelet
Python library that handles token authentication for MuckRock and DocumentCloud
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively. Install it if you need to programmatically access MuckRock or DocumentCloud APIs—it eliminates boilerplate around authentication, token refresh, and rate limiting. The narrow scope (specific to Squarelet-based services) means it's only useful if you're targeting those particular APIs.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later (capped at 3.12).
- Credentials must be provided via environment variables or constructor parameters.
- Low friction installation as a pure Python wheel.
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), so you can use, modify, and distribute the package freely with minimal restrictions.
last release 2026-08-14 (0 days) · last repo commit 2026-08-14
0 known vulnerabilities (OSV.dev, 2026-08-14) · 240,127 downloads/mo, #8,911 on PyPI
Alternatives
Verify before relying
pip install python-squarelet
from squarelet import SquareletClient
import os
username = os.environ["SQ_USERNAME"]
password = os.environ["SQ_PASSWORD"]
client = SquareletClient(base_uri="https://api.www.documentcloud.org/api/", username=username, password=password)
response = client.request("get", "users/me/")
print(response.text)- Whether rate limiting configuration is customizable beyond the automatic application mentioned in the description.
- Whether the package handles token refresh transparently across concurrent requests or only sequentially.
- Performance characteristics and typical latency overhead from the rate limiting and retry logic.
What it is and what it does
python-squarelet is a Python client library that wraps the Squarelet authentication system used by MuckRock and DocumentCloud. It handles the complexity of token-based authentication, automatic token refresh, rate limiting, and request retry logic so you don't have to manage these concerns manually. The library provides a simple SquareletClient class that you initialize with credentials and a base API URI, then use to make HTTP requests (GET, POST, PUT, DELETE, etc.) to MuckRock or DocumentCloud APIs.
The package is designed for developers who need to programmatically interact with MuckRock Requests or DocumentCloud through their APIs. It abstracts away authentication token management, applies rate limiting automatically to respect API quotas, and includes built-in retry logic for transient failures. The library also provides custom exception classes for different error scenarios (API errors, credential issues, missing resources), making error handling more explicit in your code.
Use it for
- Automate document retrieval and metadata queries from DocumentCloud using Python scripts.
- Build applications that submit and track FOIA requests through MuckRock's API programmatically.
- Create batch processing pipelines that interact with MuckRock or DocumentCloud without managing authentication tokens manually.
- Integrate MuckRock or DocumentCloud data into data analysis workflows or reporting systems.
- Develop bots or scheduled tasks that monitor or update resources in MuckRock or DocumentCloud systems.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively. Install it if you need to programmatically access MuckRock or DocumentCloud APIs—it eliminates boilerplate around authentication, token refresh, and rate limiting. The narrow scope (specific to Squarelet-based services) means it's only useful if you're targeting those particular APIs.
Install
python-squarelet on PyPI
Before you install
Low friction installation as a pure Python wheel. Active maintenance with a release on 2026-08-14 and last commit the same day. Three lightweight runtime dependencies (ratelimit, requests, urllib3) are all widely-used and stable.
Requires Python 3.8 or later (capped at 3.12). Credentials must be provided via environment variables or constructor parameters.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute the package freely with minimal restrictions.
Quickstart
pip install python-squarelet
from squarelet import SquareletClient
import os
username = os.environ["SQ_USERNAME"]
password = os.environ["SQ_PASSWORD"]
client = SquareletClient(base_uri="https://api.www.documentcloud.org/api/", username=username, password=password)
response = client.request("get", "users/me/")
print(response.text)
Verify before relying
- Whether rate limiting configuration is customizable beyond the automatic application mentioned in the description.
- Whether the package handles token refresh transparently across concurrent requests or only sequentially.
- Performance characteristics and typical latency overhead from the rate limiting and retry logic.
Package facts
| License | permissive license permissive |
| Python support | Capped below the current Python release <=3.12,>=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesratelimitrequestsurllib3 |
| Maintenance | Actively maintained 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 240,127 / month, #8,911 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: python_squarelet-0.4.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “muckrock api client”
- python-squareletA Python client library for authenticating with and making API…
- codewords-clientA Python client library for the Codewords API with built-in FastAPI…
- twentyc.rpcA client library for consuming 20c's RESTful API, built on top of the…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also apiclient · python-documentcloud · requests-oauth2client · marketorestpython · oauth2-client · coze-workload-identity · veracode-api-py · jellyfin-apiclient-python · sharepy · PureCloudPlatformClientV2