Registry / devops / squarelet

squarelet

JSON →
library0.3.1pypypiunverified

Python library for token-based authentication with MuckRock and DocumentCloud APIs. Current version 0.3.1, compatible with Python 3.8 to 3.12. Low release cadence.

pip install squarelet
INSTALL
IMPORT
SIG · SQUARELET
S
squarelet
devopspythonv0.3.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from squarelet import Client
Correct import for the main client class.
Client
from squarelet.client import Client
from squarelet import SquareletClient
Class name is Client, not SquareletClient.
Client
from squarelet.client import Client
import squarelet; client = squarelet.Client()
Direct import works via __init__.py.

Initialize client with API token from environment.

from squarelet import Client import os client = Client( api_token=os.environ.get('SQUARELET_API_TOKEN', ''), base_url=os.environ.get('SQUARELET_BASE_URL', 'https://api.muckrock.com') ) # Example: get current user user = client.me() print(user)
Debug
Known issues
gotchaThe base_url defaults to MuckRock's API; for DocumentCloud, set base_url='https://api.documentcloud.org'. You must specify the correct base_url for your service.
fix
client = Client(api_token=..., base_url='https://api.documentcloud.org')
affects: all
gotchaThe API token must have the 'publish:squarelet' scope. If you get 403 errors, check token permissions.
fix
Generate a token with proper scopes from your service's settings.
affects: all
deprecatedPython 3.12 is the maximum supported version; library may not work on 3.13+.
fix
Use Python 3.8–3.12, or pin version.
affects: 0.3.1
Upgrade
Version history
0.3.1latest on PyPI
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
squarelet — pip install squarelet · libregistry