A server that requests and processes data from the [Patterns Knowledge Graph](https://github.com/polifonia-project/patterns-knowledge-graph) on behalf of the [Pattern Exploration GUI](https://github.com/polifonia-project/pattern-exploration-gui).
Python Flask Server for Patterns UI using the Blazegraph KG
A Python Flask server providing APIs used by the Pattens UI frontend. It is connected to the FONN SPARQL endpoint for the Patterns and Tunes knowledge graphs.
This software forms part of Polifonia Deliverable D5.6.
Prerequisites
Ensure you have Python and pip installed on your machine. I’d recommend using a environment manager like miniconda to keep everything sane.
Installing Dependencies
Clone the repository, navigate to the project folder and install the dependencies from requirements.txt.
git clone git@github.com:polifonia-project/pattern-explorations-backend.git
cd pattern-explorations-backend
pip install -r requirements.txt
Application Code
The main application code is in app.py, and the SPARQL queries are generated using a query factory in query_factory.py.
The file fuzzy_search.py contains properties and methods related to the fuzzy tune title search feature.
Running the Server
Start the Flask server with:
python app.py
The server runs on localhost port 5000 by default.
requirements.txt
The required libraries are listed in requirements.txt: