Decisions

Data models for published judicial decisions.

class justopinion.decisions.ReporterVolume(**data)

A group of decisions corresponding to a bound print volume.

Parameters
  • id – The unique identifier for this volume.

  • url – The URL of this volume in the Case Access Project API.

  • full_name – The name of this volume.

class justopinion.decisions.Court(**data)

A court that issues legal decisions.

Parameters
  • id – The unique identifier for this court.

  • name – The name of this court.

  • url – The URL of this court in the Case Access Project API.

  • slug – The URL-safe name of this court.

  • name_abbreviation – The abbreviation of this court’s name.

class justopinion.decisions.Jurisdiction(**data)

A government or other entity that is responsible for a legal system.

Parameters
  • id – The unique identifier for this jurisdiction.

  • name – The name of this jurisdiction.

  • url – The URL of this jurisdiction in the Case Access Project API.

  • slug – The URL-safe name of this jurisdiction.

  • whitelisted – Whether the jurisdiction’s cases are accessible without restriction in the Case Access Project API.

  • name_abbreviation – The abbreviation of this jurisdiction.

class justopinion.decisions.Opinion(**data)

A document that resolves legal issues in a case and posits legal holdings.

Usually an opinion must have type="majority" to create holdings binding on any courts.

Parameters
  • type – the opinion’s attitude toward the court’s disposition of the case. e.g. majority, dissenting, concurring, concurring in the result

  • author – name of the judge who authored the opinion, if identified

  • text

classmethod remove_author_name_punctuation(v)

Normalize Opinion author names by removing punctuation.

Return type

str

locate_text(selection)

Get set of position selectors for text in Opinion.

Return type

TextPositionSet

select_text(selector)

Get text using a TextQuoteSelector.

Parameters

selector (TextQuoteSelector) – a selector referencing a text passage in the Opinion.

Return type

Optional[str]

Returns

the text referenced by the selector, or None if the text can’t be found.

class justopinion.decisions.CaseData(**data)

The content of a Decision, including Opinions.

class justopinion.decisions.PageRank(**data)

The rank of the Decision in the collection of documents.

class justopinion.decisions.CaseBody(**data)

Data about an Opinion in the form used by the Caselaw Access Project API.

class justopinion.decisions.DecisionAnalysis(**data)

Data generated by Case Access Project about a Decision.

exception justopinion.decisions.DecisionError

Error for failed attempts to assign Opinions to Decisions.

class justopinion.decisions.Decision(**data)

A court decision to resolve a step in litigation.

Uses the model of a judicial decision from the Caselaw Access Project API.

One of these records may contain multiple Opinions. Typically one record will contain all the Opinions from one appeal, but not necessarily from the whole lawsuit. One lawsuit may contain multiple appeals or other petitions, and if more then one of those generates published Opinions, the CAP API will divide those Opinions into a separate record for each appeal. The outcome of a decision may be determined by one majority Opinion or by the combined effect of multiple Opinions. The lead opinion is commonly, but not always, the only Opinion that creates binding legal authority. Usually every rule posited by the lead Opinion is binding, but some may not be, often because parts of the Opinion fail to command a majority of the panel of judges.

Parameters
  • decision_date – date when the opinion was first published by the court (not the publication date of the reporter volume)

  • name – full name of the opinion, e.g. “ORACLE AMERICA, INC., Plaintiff-Appellant, v. GOOGLE INC., Defendant-Cross-Appellant”

  • name_abbreviation – shorter name of the opinion, e.g. “Oracle America, Inc. v. Google Inc.”

  • docket_num

  • citations – ways to cite this Decision

  • parties

  • attorneys

  • first_page – the page where the opinion begins in its official reporter

  • last_page – the page where the opinion ends in its official reporter

  • court – name of the court that published the opinion

  • casebody – the Decision content including Opinions

  • juridiction – the jurisdiction of the case

  • cites_toCAPCitations to other Decisions

  • id – unique ID from CAP API

  • last_updated – date when the record was last updated in CAP API

  • frontend_url – URL to the decision in CAP’s frontend

  • analysis – data generated by Case Access Project about this Decision

classmethod decision_date_must_include_day(v)

Add a day of “01” if a string format is missing it.

Return type

Union[date, str]

property opinions: List[Opinion]

Get all Opinions published with this Decision.

Return type

List[Opinion]

property majority: Optional[Opinion]

Get a majority opinion, if any.

Return type

Optional[Opinion]

find_matching_opinion(opinion_type='', opinion_author='')

Get Opinion matching the given attributes.

Return type

Optional[Opinion]

add_opinion(opinion)

Add an Opinion to self’s CaseBody if the Opinion doesn’t already exist.

Return type

None