This page lists the steps required to start developing Gramps Web API. It will be assumed that you are using Ubuntu Linux.
The Web API requires Python 3.7 or newer.
The Web API requires the Gramps Python library to be importable. Starting from Gramps 5.2.0, it will be installable via
pip. Right now, development is still based on Gramps 5.1.x, so the most convenient option is to install the Gramps
apt package on Ubuntu
sudo apt install gramps
Note that using the
gramps Python package from Gramps installed with
apt requires using the system Python interpreter, so you cannot work in a virtual environment.
Clone the Web API repository
Clone the Web API to your PC with
git clone firstname.lastname@example.org:gramps-project/gramps-webapi.git cd gramps-webapi
To start development, please install the dependencies by running
pip3 install -r requirements-dev.txt
Set up pre-commit hooks
To set up the pre-commit hooks for the repository, run
To run the unit tests, run
Install the library in editable mode
pip3 install -e . --user
Generate a configuration file
TREE="My Family Tree" DISABLE_AUTH=True
Do not use this configuration in production.
See Configuration for a full list of config options.
Do not use your production database for development, but use a copy of it or the Gramps example database.
Run the app in development mode
python3 -m gramps_webapi --config path/to/config run
http://127.0.0.1:5000by default. To choose a different port, add the
Do not expose this as-is to a public network or the internet, as anyone will be able to view and modify your family tree!