Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9bad5c5

Browse filesBrowse files
authored
Update README.md
1 parent 5c41410 commit 9bad5c5
Copy full SHA for 9bad5c5

File tree

Expand file treeCollapse file tree

1 file changed

+46
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+46
-3
lines changed
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboard
+46-3Lines changed: 46 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,47 @@
1-
# Python API Example
1+
# Building and deploying a Python API
22

3-
If you are here for the lunch and learn, use this branch <br/>
4-
[github.com/KeithGalli/python-api-example/tree/lunch-and-learn](https://github.com/KeithGalli/python-api-example/tree/lunch-and-learn)
3+
## About
4+
5+
In this session we will build some API endpoints, documentation for those endpoints, and the ability to test on a live site deploying on render.com. This is a simple example to get started, but hopefully it will provide the foundation for you all to build more complex APIs in the future. If you have any questions, I recommend leaving them in the YouTube comments.
6+
7+
## Setup
8+
1. **Fork the repository**:
9+
Click on the 'Fork' button at the top right corner of the repository's GitHub page. This will create a copy of the repository in your own GitHub account.
10+
11+
2. **Clone your forked repository**:
12+
Make sure to replace YOUR_GITHUB_USERNAME with your username in this command
13+
```bash
14+
git clone https://github.com/YOUR_GITHUB_USERNAME/python-api-example.git
15+
16+
3. **Navigate to directory**
17+
```bash
18+
cd python-api-example
19+
```
20+
4. **Install Python libraries**
21+
```bash
22+
pip install -r requirements.txt
23+
24+
5. **Run Flask Endpoint**
25+
```bash
26+
python3 app.py
27+
```
28+
29+
6. **Navigate to server** <br/>
30+
Open up URL app is running on (should say when you run above command -- http://127.0.0.1:5000 for example). Navigate to http://127.0.0.1:5000/apidocs to see Swagger endpoint specs.
31+
32+
7. **Making changes and pushing to your fork** <br/>
33+
After making your changes, you can push them to your forked GitHub repository.
34+
```bash
35+
git add -u
36+
git commit -m "Your commit message"
37+
git push origin lunch-and-learn
38+
```
39+
40+
41+
## Render.com
42+
43+
We will be using [render.com](https://render.com) to deploy our app. Create an account there and connect your Github using the [following instructions](https://render.com/docs/github)
44+
45+
## Airtable
46+
47+
As a very simple and easy to set-up DB, we will be using airtable. I'll show in the live stream how to create an API token to use in Python API requests.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.