This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python client for parsing SCOTUS cases from the granted/noted and orders dockets.

Project Description

Getting started

pip install nyt-docket

Using nyt-docket

Command-line interface

docket grants 2015
docket orders 2015
docket opinions 2015

Demo app

Run the demo app.

python -m docket.demo

Modules

Use the docket loader manually from within your Python script.

Grants (new cases)

Grants are cases that have been granted certiorari and will be heard by the Court in this term. The most interesting thing about a grant, besides its existence, is the question the Court will be deciding. This is associated as a separate PDF file on the Court’s site but the parser attaches it to the case as a text blob.

from docket import grants

g = grants.Load()
g.scrape()

for case in g.cases:
    print case.__dict__

Slip opinions (decisions)

Slip opinions are decisions in cases the Court has either heard arguments on or has made a procedural decision on. These opinions are not final, but it’s the fastest way to know when the Court has acted on a case. The most important feature of a slip opinion is the opinion text, which is a separate PDF file. This is associated with the opinion as a hyperlink.

from docket import slipopinions

o = slipopinions.Load()
o.scrape()

for case in o.cases:
    print case.__dict__

Orders (all kinds of things)

Orders are the daily business of the Court. Denials of certiorari as well as various other procedural motions are resolved in the orders list. This plugin grabs the long orders list itself as a PDF link and then parses it out into individual cases. WARNING: The individual cases rely on regex and tomfoolery. The methods for parsing them are fragile, so YMMV.

from docket import orders

z = orders.Load()
z.scrape()
z.parse()

for order in z.orders:
    print order.__dict__

for case in z.cases:
    print "%s\t%s\t%s" % (case.docket, case.orders_type, case.casename)
Release History

Release History

This version
History Node

0.0.14

History Node

0.0.13

History Node

0.0.12

History Node

0.0.11

History Node

0.0.10

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
nyt-docket-0.0.14.tar.gz (8.0 kB) Copy SHA256 Checksum SHA256 Source Oct 3, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting