You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You must set up a development environment to run the code examples and exercises.
11
12
12
-
The repository, link:{repository-link}[github.com/neo4j-graphacademy/app-python^] contains all the starter code and workspace for this course.
You can open the repository by clicking the link below:
16
+
[%collapsible]
17
+
.Develop on your local machine
18
+
====
19
+
You will need link:https://python.org[Python] installed and the ability to install packages using `pip`.
20
+
21
+
You may want to set up a virtual environment using link:https://docs.python.org/3/library/venv.html[`venv`^] or link:https://virtualenv.pypa.io/en/latest/[`virtualenv`^] to keep your dependencies separate from other projects.
22
+
23
+
Clone the link:{repository-link}[github.com/neo4j-graphacademy/app-python] repository:
Here are some of the important directories in the project:
21
60
@@ -26,7 +65,17 @@ Here are some of the important directories in the project:
26
65
** `routes/` - Route handlers that are registered on the server. You shouldn't need to edit these files.
27
66
* `public/` - Minified build files for the SPA. *Do not edit these files*.
28
67
68
+
== Run the Application
69
+
70
+
You can run the application using the following commands:
29
71
72
+
[source,bash]
73
+
.Run the application
74
+
----
75
+
export FLASK_APP=api
76
+
export FLASK_ENV=development
77
+
flask run
78
+
----
30
79
31
80
// == Setting Environment Variables
32
81
@@ -58,35 +107,6 @@ Here are some of the important directories in the project:
58
107
// 7. The username for your Neo4j Sandbox instance
59
108
// 8. The password for your Neo4j Sandbox instance
60
109
61
-
[%collapsible]
62
-
.Develop on your local machine
63
-
====
64
-
You will need link:https://python.org[Python] installed and the ability to install packages using `pip`.
65
-
66
-
You may want to set up a virtual environment using link:https://docs.python.org/3/library/venv.html[`venv`^] or link:https://virtualenv.pypa.io/en/latest/[`virtualenv`^] to keep your dependencies separate from other projects.
67
-
68
-
Clone the link:{repository-link}[github.com/neo4j-graphacademy/app-python] repository:
This function should use the `uri`, `username` and `password` parameters supplied to create an instance of the Neo4j Python Driver.
26
26
The driver instance should then be assigned to the `current_app` variable to ensure that it is available throughout the application.
@@ -43,7 +43,7 @@ To do this, we will need to:
43
43
2. Import the `GraphDatabase` object from `neo4j` into `neo4j.py`.
44
44
3. Create the driver instance with the `uri`, `username` and `password` parameters passed to the function and use the `verify_connectivity()` method to assert that the credentials are correct.
0 commit comments