mirror of
https://github.com/fastapi/full-stack-fastapi-template.git
synced 2026-11-03 12:29:42 +00:00
♻️ Simplify uv workspace setup (#2423)
## AI Disclaimer Using Codex with gpt-5.6-sol. Reviewed manually.
This commit is contained in:
committed by
GitHub
parent
85cd14d474
commit
4256e83fec
+1
-15
@@ -27,21 +27,7 @@ The API is available at `http://localhost:8000`, with automatic interactive docs
|
|||||||
|
|
||||||
## General Workflow
|
## General Workflow
|
||||||
|
|
||||||
By default, the dependencies are managed with [uv](https://docs.astral.sh/uv/), go there and install it.
|
Run backend commands from `./backend/` with `uv run`. Make sure your editor uses the Python interpreter at `.venv/bin/python` in the project root.
|
||||||
|
|
||||||
From `./backend/` you can install all the dependencies with:
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ uv sync
|
|
||||||
```
|
|
||||||
|
|
||||||
Then you can activate the virtual environment with:
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ source .venv/bin/activate
|
|
||||||
```
|
|
||||||
|
|
||||||
Make sure your editor is using the correct Python virtual environment, with the interpreter at `backend/.venv/bin/python`.
|
|
||||||
|
|
||||||
Modify or add SQLModel models for data and SQL tables in `./backend/app/models.py`, API endpoints in `./backend/app/api/`, CRUD (Create, Read, Update, Delete) utils in `./backend/app/crud.py`.
|
Modify or add SQLModel models for data and SQL tables in `./backend/app/models.py`, API endpoints in `./backend/app/api/`, CRUD (Create, Read, Update, Delete) utils in `./backend/app/crud.py`.
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ services:
|
|||||||
action: sync
|
action: sync
|
||||||
target: /app/backend
|
target: /app/backend
|
||||||
ignore:
|
ignore:
|
||||||
- ./backend/.venv
|
|
||||||
- .venv
|
- .venv
|
||||||
- path: ./backend/pyproject.toml
|
- path: ./backend/pyproject.toml
|
||||||
action: rebuild
|
action: rebuild
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ Done, you have a frontend-less (api-only) app. 🤓
|
|||||||
|
|
||||||
### Automatically
|
### Automatically
|
||||||
|
|
||||||
* Activate the backend virtual environment.
|
|
||||||
* From the top level project directory, run the script:
|
* From the top level project directory, run the script:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user