The code was written during a hackathon between GLEIF and CorrelAid. 🚀 The goal of the project was to visualize relational data between legal entitles that are registered at GLEIF. More information about the open data available at GLEIF can be found here: https://www.gleif.org/en/lei-data/access-and-use-lei-data. Furthermore, an introductory blog post can be found here: https://correlaid.org/en/blog/gleif-hackathon/.
This is the server of the project. The client can be found here: https://github.com/CorrelAid/gleif-level2-client.
Due to the nature of hackathons the current version of the tool includes the following limitations:
- The documentation of the code might be partially incomplete. If you come across an issue, please file an issue within this repository.
- The backend reacts quite slowly due to the focus on functionality during the hackathon.
- There might be some edge-cases that are not yet handled.
The tool is licensed under CC0.
You need a data
directory with the following files:
gleif_lei.csv
(LEI-CDF)gleif_rr.csv
(RR-CDF)
If you're on Linux, you can use the data/download.sh
script, for Mac users there is the data/download_mac.sh
script. They are to be executed in the data
directory. Both scripts will download the current files from the GLEIF website and remove most of the columns from the lei
dataset in order to make it small enough for most local RAMs.
If you're on Windows operating system, you'll need to download the files manually and find a way to reduce the file size of the lei
dataset.
You can find the Swagger API docs under http://localhost:8000/docs after you have started the app either directly on your machine or with docker (see below).
e.g. in conda / venv: -> with reload enabled
uvicorn app:api --reload --root-path src
This makes the API available under http://localhost:8000/.
pytest
docker-compose build
run the tests within a docker container:
./test.sh
to run:
docker-compose up
or demonized:
docker-compose up -d
This makes the API available under http://localhost:8000/.
docker-compose logs -f
For development purposes, we had a server / virtual machine in the Azure cloud. Things should work similarly on your server.
git clone [email protected]:CorrelAid/gleif-level2-server.git
or
git clone https://github.com/CorrelAid/gleif-level2-server.git
depending on your GitHub authentication preferences.
docker-compose build
docker-compose up -d
This makes the API available under http://localhost:8000/ on your server. Configure a reverse proxy (e.g. Nginx) to make the API available to other machines.
docker-compose logs -f
docker-compose down