component-id | type | name | description | work-package | project | resource | release-date | release-number | licence | contributors | related-components | bibliography | links | funder | credits | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pattern-explorations-backend |
WebApplication |
Pattern Exploration Backend |
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). |
|
polifonia-project |
23/02/2024 |
v1.0.0 |
|
|
|
|
|
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement N. 101004746. |
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.
Ensure you have Python and pip installed on your machine. I'd recommend using a environment manager like miniconda to keep everything sane.
Clone the repository, navigate to the project folder and install the dependencies from requirements.txt
.
git clone [email protected]:polifonia-project/pattern-explorations-backend.git
cd pattern-explorations-backend
pip install -r requirements.txt
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.
Start the Flask server with:
python app.py
The server runs on localhost
port 5000
by default.
The required libraries are listed in requirements.txt
:
Flask==2.3.2
Flask_Cors==3.0.10
Requests==2.31.0
fuzzywuzzy~=0.18.0
singleton-decorator
python-Levenshtein