Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robmarkcole/fastapi-chatgpt-experiment
Use chatGPT to create a simple fastAPI app
https://github.com/robmarkcole/fastapi-chatgpt-experiment
fastapi
Last synced: about 14 hours ago
JSON representation
Use chatGPT to create a simple fastAPI app
- Host: GitHub
- URL: https://github.com/robmarkcole/fastapi-chatgpt-experiment
- Owner: robmarkcole
- License: apache-2.0
- Created: 2023-02-15T13:50:01.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T14:20:04.000Z (almost 2 years ago)
- Last Synced: 2025-01-29T12:39:35.553Z (8 days ago)
- Topics: fastapi
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fastAPI-chatGPT-experiment
This app was created using the ChatGPT prompt: `show me the code for a fastAPI app which presents a single page web app to take an email and save it to a sqlite database` and also `Write a README markdown file for this code`. The only correction required was the additon of `python-multipart` and `jinja2` in the requirements. Pretty impressive! I also did the initial test using a Github Codespace without issue.## FastAPI Email Saver
This is a simple FastAPI app that presents a single page web app to take an email address and save it to a SQLite database.Installation
To install the necessary dependencies, run the following command:```
pip install fastapi uvicorn sqlalchemy
```To start the app, run the following command:
```
uvicorn main:app --reload
```
This will start the app on http://localhost:8000. If you open this URL in a web browser, you should see a page with a form for entering an email address. When you submit the form, the email will be saved to the SQLite database.## Local Development
- python3 -m venv venv
- source venv/bin/activate
- pip install -r requirements.txt
- uvicorn main:app --reload