Skip to main content

pyJudilibre

pyJudilibre is a small Python wrapper to query the JUDILIBRE API from the French Supreme Court, la Cour de cassation. JUDILIBRE aims to give access to judiciary decisions.

Logo de pyjudilibre ?

Documentation

The documentation is here.

Requirements

This library relies on pydantic and httpx to perform queries to JUDILIBRE and to validate inputs and outputs. You also need credentials from PISTE.

Installation

You can install it from pyjudilibre.

pip install pyjudilibre

Simple usage

To instantiate the main class, JudilibreClient, you need to use your JUDILIBRE API key (see here).

import logging
from pyjudilibre import JudilibreClient

JUDILIBRE_API_KEY = "***"
client = JudilibreClient(
    judilibre_api_key=JUDILIBRE_API_KEY,
    logging_level=logging.DEBUG,
)

To get a decision, you need to provide its ID:

DECISION_ID = "667e51a56430c94f3afa7d0e"
decision = client.decision(decision_id=DECISION_ID)

Description of the source code

The code of the library is in lib/pyjudilibre:

  • the main class and its method are in pyjudilibre.py
  • the enums are in enums.py
  • the pydantic models are in models.py
  • spectific exceptions are defined in exceptions.py
  • decorators.py contains one decorator

Other folders are as follow:

  • tests contains unit tests.
  • docs contains documentation files.
  • scripts contains useful scripts to develop the library

Development setup

To set up a development environment, you should create a virtual environment named venv:

python3 -m venv venv
source venv/bin/activate

pip install '.[dev,build,doc,test]'

In scripts, you can use:

Release files for pyjudilibre 0.14.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyjudilibre 0.14.6
File Size Uploaded
pyjudilibre-0.14.6.tar.gz 19.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyjudilibre 0.14.6
File Interpreter ABI Platform
pyjudilibre-0.14.6-py3-none-any.whl Python 3 none any Details

Total release size: 41.9 kB

Release files / pyjudilibre-0.14.6.tar.gz

Download URL pyjudilibre-0.14.6.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4eeb92ba1b91344648eeabaa944c2006cda6cce4b8df4c8b2c7cbefa8c592c51
BLAKE2b-256 checksum
How to use checksums
29e67001702f4df6d3a6a1b995a9b75c957e59c601b1c3959860ea4f4dce695f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.13

Release files / pyjudilibre-0.14.6-py3-none-any.whl

Download URL pyjudilibre-0.14.6-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78e271eddebb47390c0ad36311039763c1445a31ffdf82520314559dd8ab4142
BLAKE2b-256 checksum
How to use checksums
83a2cd6ba1ecdb943f5160910e54d665017ab59356e7424ae3041cbf5dac40f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.14.6 This release

2 release files

0.14.5

2 release files

0.14.4

2 release files

0.14.3

2 release files

0.14.2

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.5.12

2 release files

0.5.11

2 release files

0.5.10

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page