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
Updated config.py with Pydantic base settings class. Created startup.sh and startup.ps1 to provide easy way to start Uvicorn. Added engine and client constructor in hugs.py router.
Copy file name to clipboardExpand all lines: README.md
+16-6Lines changed: 16 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Thanks to [Sebastián Ramírez @tiangolo](https://github.com/tiangolo) we have t
14
14
15
15
While learning and using FastAPI I have often needed/wanted lightweight project scaffolding. The project generators and scaffolding projects in the FastAPI ecosystem have been either too deterministic and too big or not deterministic enough for me.
16
16
17
-
This uis how I set up a new FastAPI project. I hope this is helpful.
17
+
This is how I set up a new FastAPI project. I hope this is helpful.
18
18
19
19
## Dependencies:
20
20
@@ -27,6 +27,7 @@ This uis how I set up a new FastAPI project. I hope this is helpful.
27
27
|[Docker](https://www.docker.com/products/docker-desktop) | (Optional) I use it to startup DBs instead of installing directly. Will make your life easier. There are also images for bundled FastAPI environmets on Docker Hub.
28
28
|[ODMantic](https://art049.github.io/odmantic/)| (Optional) ORM for MongoDB with great model and document support. |
29
29
|[TortoiseORM](https://tortoise-orm.readthedocs.io/en/latest/) | (Optional) ASYNC ORM that works well with FastAPI and Postgres/MySQL
30
+
|[dnsPython](https://www.dnspython.org/) | (Optional) Used for querrying remote DBs etc.
30
31
31
32
32
33
## Get Started
@@ -58,21 +59,30 @@ This uis how I set up a new FastAPI project. I hope this is helpful.
58
59
```bash
59
60
pip install -r requirements.txt
60
61
```
61
-
8. (Optional) Pull latest Mongo image and create mongo container for dev purposes
62
+
8. (Optional) If you want to use Mongo then edit fastapi-scaffold-base\app\config\config.py to add Mongo URI.
63
+
64
+
9. (Optional) Pull latest Mongo image and create mongo container for dev purposes
62
65
```docker
63
66
docker pull mongo:latest
64
67
docker run --rm --net=host mongo
65
68
```
66
-
9. Set execute permissions on either win-start-FastApi.ps1 or nix-start-FastAPI
69
+
10. Set execute permissions on either startup.ps1 or startup.sh
70
+
71
+
11. Run the start-FastAPI for your system
67
72
68
-
10. Run the start-FastAPI for your system
73
+
12. Go to https://localhost:8000 to see a basic HTML page with sections for content. You can edit the Jinja placeholders to add content as you see fit in fastapi-scaffold-base\templates\indeix.html. This is a responsive template based on CSS Grid without using Javacript. Add any static assets to static.
69
74
70
-
11. Go to https://localhost:8000/docs to see your FastAPI documentation and explore the sample docs.
75
+
12. Go to https://localhost:8000/docs to see your FastAPI documentation and explore the sample docs.
71
76
72
77
73
-
12. Close your FastAPI terminal and your Mongo Terminal.
78
+
13. Close your FastAPI terminal and your Mongo Terminal.
0 commit comments