Skip to content

Linked-Data-Governance/linked_data_governance_api

Repository files navigation

Linked data governance REST API

Author : Kerfalla CISSE

Mandate carried out jointly with the University of Geneva


Framework used : Fast API

Documentation of the API : http://127.0.0.1:8000/docs

To Install the dependencies :

  • Create a virtual environment : python -m venv .venv
  • Activate the virtual environment : source .venv/Scripts/activate
  • Install the dependencies : pip install -r requirements.txt

To launch the project (be sur that you are in the virtual environment) : fastapi dev main.py

Launch the docker-compose.yaml file which will run the mongodb database : docker compose up -d

Execute the bash script (to create the database, the collection and the user):

  1. chmod +x init_mongo.sh make the file executable
  2. Execute the file : ./init_mongo.sh

Some Helpful Commands

To connect to the mongodb service with docker : docker exec -it <service_name> mongosh -u <username> -p "<password>" --authenticationDatabase <database_name>

To create a database : use <database_name>

To create a collection use <collection_name>

To insert data in a collection : db.projects.insertOne({ project_name: "Test Project", user_id: ObjectId("0123456789ab0123456789ab") })

To create a user :

db.createUser({ user: "myuser", pwd: "mypassword", roles: [{ role: "readWrite", db: "linked_data_governance" }] })

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published