Fetch a case law decision
The JuriAPI class lets you fetch
decisions by identifier or by keywords.
Instantiate JuriAPI
Section titled “Instantiate JuriAPI”from pylegifrance.fonds.juri import JuriAPI
juri = JuriAPI(client)Fetch a decision
Section titled “Fetch a decision”# By identifierdecision = juri.fetch("JURITEXT000037999394")
# By legacy identifierdecision = juri.fetch_with_ancien_id("07-87362")Access the content
Section titled “Access the content”decision.text # full textdecision.text_html # formatted HTMLdecision.titledecision.long_titledecision.formationdecision.numerodecision.jurisdictiondecision.solutiondecision.dateSearch without an identifier
Section titled “Search without an identifier”from pylegifrance.fonds.juri import SearchRequestfrom pylegifrance.models.juri.constants import JuridictionJudiciaire
# Simpleresults = juri.search("responsabilité civile")
# Advancedrequest = SearchRequest( search="contrat", juridiction_judiciaire=[JuridictionJudiciaire.cour_de_cassation.value], page_size=5,)results = juri.search(request)
if results: first = results[0] content = first.textVersions of a decision
Section titled “Versions of a decision”dated = decision.at("2022-01-01")latest = decision.latest()all_versions = decision.versions()Each returns a JuriDecision (or a list).