![]() Parser.add_argument("-port", default=5000, type=int, help="App port.") Parser = ArgumentParser(description=_doc_) ![]() Add the arguments, such as -host, -port and -debug flags and create the previously mentioned -populate flag. First, you need to set up everything for the Flask server. Let's build an API that will help frontend get all the necessary data from Memgraph. Due to the created volumes, the data will stay loaded into Memgraph. Later on, if you restart the app, remove the -populate flag. Include the flag -populate in the Dockerfile in order to load data into Memgraph. The import-data folder is copied to the Docker container where the twitch-app service is running since you'll load the data from the CSV files there and then save it into Memgraph. GQLAlchemy is a fully open-source Python library that aims to be the go-to Object Graph Mapper (OGM) - a link between Graph Database objects and Python objects. Next, gqlalchemy, a library developed to assist in writing and running queries on Memgraph, will be installed inside the container. It will enable application to communicate with Memgraph on request and send a response back. Flask wraps Werkzeug, a comprehensive Web Server Gateway Interface (WSGI) web application library. I will explain the most important parts of the implementation and you can check the whole repository if you are missing any other details.Įnter fullscreen mode Exit fullscreen modeįlask, a micro web framework, will be installed in the Docker container first.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |