Registry / database / courts-db

courts-db

JSON →
library0.10.27pypypi✓ verified 81d ago

A Python library providing a comprehensive database of US federal and state courts, including names, jurisdictions, and metadata. Current version 0.10.27, released with periodic updates.

pip install courts-db
INSTALL
IMPORT
SIG · COURTS-DB
C
courts-db
databasepythonv0.10.27
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.

find_court
from courts_db import find_court
from courts_db import Court
find_court_by_id
from courts_db import find_court_by_id
from courts_db import Court
load_courts_db
from courts_db import load_courts_db
from courts_db import Court

Instantiate a Court object and query all courts. The library provides an ORM-like interface.

from courts_db import Court # List all courts courts = Court.query.all() print(courts[:5])
Debug
Known issues
gotchaThe library uses SQLAlchemy and requires database initialization; calling Court.query without setting up the database will raise an error.
fix
Initialize the database by calling 'courts-db init' in the terminal or using the package's CLI before querying.
affects: all
deprecatedThe function 'courts_db.utils.load_courts' is deprecated and will be removed in a future version.
fix
Use 'courts_db.data.court_data' instead.
affects: >=0.9.0
breakingVersion 0.10.0 changed the import path for court data from 'courts_db.court_data' to 'courts_db.data.court_data'.
fix
Update imports: 'from courts_db.data import court_data'.
affects: 0.10.0+
Upgrade
Version history
0.10.27latest on PyPI · released Mar 25, 2026
Audit
Dependencies
requestsrequiredHTTP requests for data updates
lxmlrequiredXML/HTML parsing for court data
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
courts-db — pip install courts-db · libregistry