Skip to content

Commit 0f7ebce

Browse files
author
Logan Gingerich
authored
Update README.md
1 parent f8177d6 commit 0f7ebce

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

python-flask-directory-sync-example/README.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ If you get stuck, please reach out to us at [email protected] so we can help.
1313

1414
### Clone Directory
1515

16-
1. In your CLI, navigate to the directory into which you want to clone this git repo.
17-
```bash
18-
$ cd ~/Desktop/
19-
```
20-
21-
2. Clone the main git repo for these Python example apps using your preferred secure method (HTTPS or SSH).
16+
1. Clone the main git repo for these Python example apps using your preferred secure method (HTTPS or SSH).
2217
```bash
2318
# HTTPS
2419
$ git clone https://github.com/workos-inc/python-flask-example-applications.git
@@ -31,12 +26,12 @@ If you get stuck, please reach out to us at [email protected] so we can help.
3126
$ git clone [email protected]:workos-inc/python-flask-example-applications.git
3227
```
3328

34-
3. Navigate to the Directory Sync example app within the cloned repo.
29+
2. Navigate to the Directory Sync example app within the cloned repo.
3530
```bash
3631
$ cd python-flask-example-applications/python-flask-directory-sync-example
3732
```
3833

39-
4. Create and source a Python virtual environment. You should then see `(env)` at the beginning of your command-line prompt.
34+
3. Create and source a Python virtual environment. You should then see `(env)` at the beginning of your command-line prompt.
4035
```bash
4136
$ python3 -m venv env
4237
$ source env/bin/activate
@@ -45,33 +40,33 @@ If you get stuck, please reach out to us at [email protected] so we can help.
4540

4641
### Install Dependencies
4742

48-
5. Install the cloned app's dependencies.
43+
4. Install the cloned app's dependencies.
4944
```bash
5045
(env) $ pip install -r requirements.txt
5146
```
5247

5348
### Set Environment Variables
5449

55-
6. Obtain and make note of the following values. In the next step, these will be set as environment variables.
50+
5. Obtain and make note of the following values. In the next step, these will be set as environment variables.
5651
- Your [WorkOS API key](https://dashboard.workos.com/api-keys)
5752
- Your `WEBHOOKS_SECRET`, retrievable from the URL in the WEBHOOKS area of the WorkOS dashboard. This is only required if you are utilizing the webhooks route of this application to receive and validate webhook events.
5853

5954

60-
7. Ensure you're in the root directory for the example app, `python-flask-directory-sync-example/`. Create a `.env` file to securely store the environment variables. Open this file with the Nano text editor. (This file is listed in this repo's `.gitignore` file, so your sensitive information will not be checked into version control.)
55+
6. Ensure you're in the root directory for the example app, `python-flask-directory-sync-example/`. Create a `.env` file to securely store the environment variables. Open this file with the Nano text editor. (This file is listed in this repo's `.gitignore` file, so your sensitive information will not be checked into version control.)
6156
```bash
6257
(env) $ touch .env
6358
(env) $ nano .env
6459
```
6560

66-
8. Once the Nano text editor opens, you can directly edit the `.env` file by listing the environment variables:
61+
7. Once the Nano text editor opens, you can directly edit the `.env` file by listing the environment variables:
6762
```bash
6863
export WORKOS_API_KEY=<value found in step 6>
6964
export WEBHOOKS_SECRET=<value found in step 6>
7065
```
7166

7267
To exit the Nano text editor, type `CTRL + x`. When prompted to "Save modified buffer", type `Y`, then press the `Enter` or `Return` key.
7368

74-
9. Source the environment variables so they are accessible to the operating system.
69+
8. Source the environment variables so they are accessible to the operating system.
7570
```bash
7671
(env) $ source .env
7772
```
@@ -84,7 +79,7 @@ If you get stuck, please reach out to us at [email protected] so we can help.
8479

8580
## Start the server
8681

87-
10. Use this command to run the app:
82+
9. Use this command to run the app:
8883
```bash
8984
flask run
9085
```
@@ -94,7 +89,7 @@ If you get stuck, please reach out to us at [email protected] so we can help.
9489
(env) $ flask run -p 5001
9590
```
9691
97-
11. Once the server is running, navigate to `http://localhost:5000`, or `http://localhost:5001` depending on which port you launched the server, to view the home page of the app where you can then select the view for users or groups.
92+
10. Once the server is running, navigate to `http://localhost:5000`, or `http://localhost:5001` depending on which port you launched the server, to view the home page of the app where you can then select the view for users or groups.
9893
9994
- The `/users` URL corresponds to the WorkOS API's [List Directory Users endpoint](https://workos.com/docs/reference/directory-sync/user/list)
10095
- The `/groups` URL corresponds to the WorkOS API's [List Directory Groups endpoint](https://workos.com/docs/reference/directory-sync/group/list)
@@ -103,7 +98,7 @@ If you get stuck, please reach out to us at [email protected] so we can help.
10398
10499
## Test Webhooks
105100
106-
12. WorkOS sends Webhooks as a way of managing updates to Directory Sync connections. The Webhooks section of the WorkOS Dashboard allows you to send test webhooks to your application. The Test Webhooks section of this application allows you to visualize the validated webhooks directly in this application in real-time. [Please review the tutorial here](https://workos.com/blog/test-workos-webhooks-locally-ngrok) for details on how this can be done locally.
101+
11. WorkOS sends Webhooks as a way of managing updates to Directory Sync connections. The Webhooks section of the WorkOS Dashboard allows you to send test webhooks to your application. The Test Webhooks section of this application allows you to visualize the validated webhooks directly in this application in real-time. [Please review the tutorial here](https://workos.com/blog/test-workos-webhooks-locally-ngrok) for details on how this can be done locally.
107102
108103
109104
## Need help?

0 commit comments

Comments
 (0)