Decisions
Data models for published judicial decisions.
- class justopinion.decisions.ReporterVolume(*, id, url, full_name)
A group of decisions corresponding to a bound print volume.
- Parameters:
- class justopinion.decisions.Court(*, id, name, url, slug, name_abbreviation='')
A court that issues legal decisions.
- Parameters:
- class justopinion.decisions.Jurisdiction(*, id, name, url, slug, whitelisted, name_abbreviation='')
A government or other entity that is responsible for a legal system.
- Parameters:
id (
int) – The unique identifier for this jurisdiction.name (
str) – The name of this jurisdiction.url (
HttpUrl) – The URL of this jurisdiction in the Case Access Project API.slug (
str) – The URL-safe name of this jurisdiction.whitelisted (
bool) – Whether the jurisdiction’s cases are accessible without restriction in the Case Access Project API.name_abbreviation (
str) – The abbreviation of this jurisdiction.
- class justopinion.decisions.Opinion(*, type='majority', author='', text='')
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:
- classmethod remove_author_name_punctuation(v)
Normalize Opinion author names by removing punctuation.
- Return type:
- locate_text(selection)
Get set of position selectors for text in Opinion.
- Return type:
- select_text(selector)
Get text using a
TextQuoteSelector.- Parameters:
selector (
bool|str|TextPositionSelector|TextQuoteSelector|Sequence[str|TextQuoteSelector|TextPositionSelector]) – a selector referencing a text passage in theOpinion.- Return type:
- Returns:
the text referenced by the selector, or
Noneif the text can’t be found.
- class justopinion.decisions.OpinionCL(*, type='majority', author_str='', plain_text='', resource_uri, id, absolute_url, cluster_id, author_id, per_curiam=False, joined_by=[], joined_by_str='', date_created, date_modified, judges='', sha1='', page_count=None, download_url=None, local_path=None, html='', html_lawbox='', html_columbia='', html_anon_2020='', xml_harvard='', html_with_citations='', extracted_by_ocr=False, opinions_cited=[])
A judicial opinion from the CourtListener API.
- class justopinion.decisions.PrecedentialStatus(*values)
- class justopinion.decisions.OpinionCluster(*, resource_uri, id, absolute_url, docket_id, docket, citations, sub_opinions, date_created, date_modified, judges, date_filed, date_filed_is_approximate, slug, case_name_short='', case_name, case_name_full='', attorneys='', precedential_status=PrecedentialStatus.PUBLISHED, blocked=False, headmatter='')
A group of opinions that are related to each other, from the CourtListener API.
- class justopinion.decisions.CaseData(*, head_matter=None, corrections=None, parties=[], attorneys=[], opinions=[], judges=[])
The content of a Decision, including Opinions.
- class justopinion.decisions.PageRank(*, percentile, raw)
The rank of the Decision in the collection of documents.
- class justopinion.decisions.CaseBody(*, data, status='')
Data about an Opinion in the form used by the Caselaw Access Project API.
- class justopinion.decisions.DecisionAnalysis(*, word_count, sha256, orc_confidence=None, char_count, pagerank=None, cardinality, simhash)
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.CitationResponse(*, citation, normalized_citations, start_index, end_index, status, error_message, clusters=[])
A response from the CourtListener API for a citation query.
- Parameters:
results – The list of citations found in the query.
next – The URL of the next page of results, if any.
- class justopinion.decisions.DecisionCL(*, opinion_clusters=[], resource_uri, id, court, court_id, clusters, absolute_url, date_created, date_modified, source=None, appeal_from_str='', assigned_to_str='', referred_to_str='', panel_str='', case_name='', case_name_full='', slug, docket_number, blocked=False)
- class justopinion.decisions.Decision(*, decision_date, name=None, name_abbreviation=None, docket_num=None, citations=None, parties=[], attorneys=[], first_page=None, last_page=None, court=None, casebody=None, jurisdiction=None, cites_to=None, id=None, last_updated=None, frontend_url=None, analysis=None)
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 theOpinions 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 majorityOpinionor 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) – date when the opinion was first published by the court (not the publication date of the reporter volume)name (
str|None) – full name of the opinion, e.g. “ORACLE AMERICA, INC., Plaintiff-Appellant, v. GOOGLE INC., Defendant-Cross-Appellant”name_abbreviation (
str|None) – shorter name of the opinion, e.g. “Oracle America, Inc. v. Google Inc.”citations (
Sequence[CAPCitation] |None) – ways to cite this Decisionfirst_page (
int|None) – the page where the opinion begins in its official reporterlast_page (
int|None) – the page where the opinion ends in its official reportercourt (
Court|None) – name of the court that published the opinioncasebody (
CaseBody|None) – the Decision content including Opinionsjuridiction – the jurisdiction of the case
cites_to (
Sequence[CAPCitation] |None) –CAPCitations to other Decisionslast_updated (
datetime|None) – date when the record was last updated in CAP APIfrontend_url (
HttpUrl|None) – URL to the decision in CAP’s frontendanalysis (
DecisionAnalysis|None) – 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.
- find_matching_opinion(opinion_type='', opinion_author='')
Get Opinion matching the given attributes.
- add_opinion(opinion)
Add an Opinion to self’s CaseBody if the Opinion doesn’t already exist.
- Return type: