Skip to main content

Oklahoma State Courts Network case parsing utilities

Project description

OSCN utilities

A python library for scraping case information from the Oklahoma State Courts Network.


oscn > Python package source to provide an api for retrieving and parsing case records.

examples > Source HTML files for testing

scripts > Python scripts showing use of the oscn package

  • demostrates use of the request Case and Caselist
  • saves a list of all counts for a list of counties and years
  • saves a list of counts passing a test for a list of counties and years
  • a stub for testing parsing attempts using BeautifulSoup
  • a stub for developing using saved examples

OSCN package


  • counties: Returns a list of counties.


  • Case: Returns a single case.
  • CaseList: Returns an iterator for retrieving cases for a county and year.

CaseLists can be filtered using .find(). See scripts/ for details


Parsers accept the html of an OSCN case page and return python objects.

  • filed: returns a string of the filing date (e.g. 12/25/2017)
  • closed: returns a string of the date the case was closed. Return None if not closed.
  • counts: returns of list of counts found in a case
  • judge: returns a string of the judge's name
  • parties: returns a list of objects that look like this: {'name': 'Some Name', 'type': 'Description'}
  • docket: returns a list of rows in a docket
  • events: returns a list of rows in the event table
  • attorneys: returns a list of strings found in the attorney table


These functions use parse results to determine addition properties.

  • pleas: returns a list of docket minutes containing pleas

Development Install

  1. Create and activate a Python 3.6 virtual env
  2. git clone
  3. cd oscn
  4. pip install -e .


Install with pip install oscn

Script example:

import oscn

Request a single case:

oscn.request.Case(county='tulsa', year='2018', number=84)

or request a list of cases to iterate:

oscn.request.CaseList(county='adair', year='2016')

Run test scripts

  • python scripts/{}

Deployment steps

  1. python3 sdist bdist_wheel
  2. twine upload dist/*

Project details

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for oscn, version
Filename, size File type Python version Upload date Hashes
Filename, size oscn- (14.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size oscn- (9.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page