python-api-example
Python project to implement and oscl adapter.
-
Create a Flask API.
localhost:5000/api
-
Create two namespaces (blueprint) for managing QM and RM domains
localhost:5000/api/qm localhost:5000/api/rm
-
Create two endpoints for each domains for getting and posting resouces.
responses should be rdf format (turtle, rdf+xml, or json-ld)
Run application
-
Clone the project.
-
Go into the folder
cd python-api-example
-
Create the virtual environment
python3 -m venv venv
-
Activate the new virtual environment
venv/bin/activate
-
Install the libraries.
pip install -r requirements.txt
-
Execute the project
export FLASK_APP=main.py flask run