Skip to main content

OLDP: Open Legal Data Platform

[!NOTE] We're back! This project is getting a fresh update - join us on Discord to help revive it.

Documentation PyPI version

OLDP is a Web application, written in Python 3.12 and based on the Django web framework, It is used for processing legal text and providing a REST-API and Elasticsearch-based search engine. OLDP is being develop by the non-profit initiative Open Legal Data with the goal of building an Open Data platform for legal documents (mainly court decisions and laws). The platform makes legal information freely accessible for the general public and especially third-party apps.

Our documentation is available here.

Demo

Live demo

A live demo is available here (in German).

Features

  • Cases: Court decisions with meta data and content in HTML.
  • Laws: Full-text laws and regulations and their corresponding case-law.
  • Courts: Browse courts organized by states, jurisdiction and level of appeal from your country.
  • Search: A document search engine based on Elasticsearch/Haystack supporting most common search syntax and faceting.
  • API: Adding, updating, retrieving and deleting data through CRUD REST API based on DRF including auto-generated API clients from Swagger.
  • Themes: Easily adjust the look and feel depending on your countries needs (see German theme).

Installation guide

Before you can use OLDP, you’ll need to get it installed. For a more detailed guide on how to get started with OLDP have a look at: Getting started

Docker

To skip the whole installation procedure you can simply run OLDP as Docker (or Podman) container. Steps:

  1. Clone the repository git clone https://github.com/openlegaldata/oldp
  2. Rename the local env file (local.env) to .env
  3. Run make up, which will either call the docker or podman container engine depending on your setup
  4. Navigate to localhost:8000 to view the site

A small tutorial on how to use OLDP with Docker can be found here.

Dependencies

Before anything else you will need to install the application dependencies.

  • Python 3.12 with pip (uv recommended)
  • Database (MySQL, SQLite, ...): All database engines that support Django's DB API should work. MySQL is recommended.
  • Elasticsearch 7.17.x: Our search engine backend. Other systems supported by haystack should also work.
  • gcc Required to compile some Python libs
  • python-mysqldb, libmysqlclient-dev if you choose MySQL as database
  • gettext for Django locales with msguniq
  • pandoc convert docbook to HTML (import GG)
  • GDAL: Geospatial libraries used by the haystack search module (see here).
# Create virtualenv with uv
uv venv --python 3.12
source .venv/bin/activate

# Clone repository to current directory
git clone https://github.com/openlegaldata/oldp.git .

# Install dependencies
apt-get install -y $(cat apt_requirements.txt)
uv pip install -e ".[dev]"

The first time you run OLDP, you will need to initialize the database with its default blank values. If you want to run OLDP in production mode, you also need to prepare static files and localization.

# Prepare assets (JS, CSS, images, fonts, ...)
./manage.py compress

# Prepare database
./manage.py migrate

# Localization (German and English, needed for production)
./manage.py compilemessages --l de --l en

# Prepare static files (needed for production)
./manage.py collectstatic --no-input

Run

Run the following command to start the web app at http://localhost:8000/.

./manage.py runserver 8000

Settings

To manage the app settings we rely on django-configurations. Pre-configured settings can be used by setting the DJANGO_CONFIGURATION environment variable to either ProdConfiguration, DevConfiguration or TestConfiguration. You can also override specific settings from src/oldp/settings.py with environment variables (all prefixed with DJANGO_).

See the Configuration reference for the full list of environment variables (database, Elasticsearch, caching, email, MCP, logging, …).

Issues

Please use our GitHub issues to report bugs, request feature or simply leave some feedback.

Contact

To contact Open Legal Data Platform, see here:

https://de.openlegaldata.io/contact/

Citation

Please cite the following research paper, if you use our code or data:

@inproceedings{10.1145/3383583.3398616,
author = {Ostendorff, Malte and Blume, Till and Ostendorff, Saskia},
title = {Towards an Open Platform for Legal Information},
year = {2020},
isbn = {9781450375856},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3383583.3398616},
doi = {10.1145/3383583.3398616},
booktitle = {Proceedings of the ACM/IEEE Joint Conference on Digital Libraries in 2020},
pages = {385–388},
numpages = {4},
keywords = {open data, open source, legal information system, legal data},
location = {Virtual Event, China},
series = {JCDL '20}
}

License

OLDP is licensed under the MIT License.

Download files

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

Source Distribution

oldp-0.11.3.tar.gz (452.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oldp-0.11.3-py3-none-any.whl (618.2 kB view details)

Uploaded Python 3

File details

Details for the file oldp-0.11.3.tar.gz.

File metadata

  • Download URL: oldp-0.11.3.tar.gz
  • Upload date:
  • Size: 452.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oldp-0.11.3.tar.gz
Algorithm Hash digest
SHA256 8ab88d032f2c71454a94f005ad3e8b9f2d2c0548446fe843017238c065c73d64
MD5 c468382a6f9086cb8b7489780bd4ae90
BLAKE2b-256 6e5668adcbaba42f2d1d1d3a7769c21631cb4f6620664d87fbbdb498146491e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for oldp-0.11.3.tar.gz:

Publisher: publish.yaml on openlegaldata/oldp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oldp-0.11.3-py3-none-any.whl.

File metadata

  • Download URL: oldp-0.11.3-py3-none-any.whl
  • Upload date:
  • Size: 618.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oldp-0.11.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c70a188e6fb8a55dfdf1ca0761a5ac9a976b88d0a976ce6c31ed67ef9d26eda8
MD5 ce166ae579e73437a7eed31c16ba94fd
BLAKE2b-256 51c83c2275ee7b533d437e3fd8857f5782d5d08a78cd92cd05fca08fa7b3956f

See more details on using hashes here.

Provenance

The following attestation bundles were made for oldp-0.11.3-py3-none-any.whl:

Publisher: publish.yaml on openlegaldata/oldp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page