Skip to content

codefortulsa/courtbot-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Court Scraping utilities

A python library for scraping case information from court systems.

Development Install

  1. Create and activate a Python 3.7.3 virtual env
  2. git clone [email protected]:codefortulsa/courtbot-library.git
  3. cd courtbot-library
  4. pip install -e .

Usage

Install with pip install courtbot

Adding a court

  • Add your state to courtbot/states/{two letter state abbreviation}
  • Add properties to an init.py file in the diretory

Require properties (so far):

  • courts: return a list of strings with the names of available courts e.g
  [ ..., 'tulsa', 'wagoner', 'washington', 'washita', 'woods', 'woodward']
  • get_case: a function that accepts a case identifier and returns an object

Case Object

The case object requires:
events:  a list of dictionaries which contain a 'date' and 'description'
     {'date': 'Wednesday, May 27, 2020 at 9:00 AM',
      'description': 'DISTRICT COURT ARRAIGNMENT'}

Run test scripts

  • pytest tests/

or with ipdb:

- `pytest -s tests/`

specify a test:

  • pytest -s tests/test_parse.py -k 'test_events'

Deployment steps

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

About

Generic Court Scraper for Courbot system use

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages