Skip to content

Files

Latest commit

 

History

History

api

OSRD's API

API

This service handle OSRD models and schema using Django. Multiple extension are used such as:

Getting Started

If you want to contribute to thise service you need:

  • A running postgres server with postgis extension.
    • The simpliest way to do it is using docker compose: docker-compose up -d --build postgres.
  • Poetry a python package manager.

To get a django configuration suitable for local development, set OSRD_DEV=1.

# Install dependencies
poetry install

# Apply migrations
OSRD_DEV=1 python manage.py migrate

# Run server
OSRD_DEV=1 python manage.py runserver

The API webserver should now be running you can try to access the admin panel: http://localhost:8000/admin/