Skip to content

Commit

Permalink
UV dependency management
Browse files Browse the repository at this point in the history
  • Loading branch information
rednafi committed Nov 1, 2024
1 parent e183da9 commit a841086
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 66 deletions.
21 changes: 3 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,15 @@ If you want to run the app locally, without using Docker, then:

- Install [uv][uv] for dependency management.

- Create a virtual environment:

```sh
uv venv -p 3.13
```

- Activate the environment. Run:

```sh
source .venv/bin/activate
```

- Install the dependencies. Run:

```sh
uv sync --frozen
```

- Start the app. Run:

```sh
make run-local
```

This will set up a virtual environment `.venv` in the current directory with Python
3.13, install dependencies, and start the Uvicorn server.

### Explore the endpoints

- To play around with the APIs, go to the following link on your browser:
Expand Down
32 changes: 16 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ keywords = ["fastapi", "template", "minimal", "docker", "cookiecutter"]
license = {file = "LICENSE"}
authors = [{name = "Redowan Delowar", email = "[email protected]"}]
dependencies = [
"bcrypt",
"fastapi",
"passlib",
"python-multipart",
"uvicorn",
"gunicorn",
"python-jose[cryptography]"
"bcrypt>=4.2.0",
"fastapi>=0.115.4",
"gunicorn>=23.0.0",
"passlib>=1.7.4",
"python-jose[cryptography]>=3.3.0",
"python-multipart>=0.0.17",
"uvicorn>=0.32.0",
]
[tool.uv]
dev-dependencies = [
"httpx",
"mypy",
"pip-tools",
"pytest",
"pytest-cov",
"requests", # Required by fastapi-test.
"ruff"
[dependency-groups]
dev = [
"httpx>=0.27.2",
"mypy>=1.13.0",
"pip-tools>=7.4.1",
"pytest>=8.3.3",
"pytest-cov>=6.0.0",
"requests>=2.32.3",
"ruff>=0.7.1",
]

[project.urls]
Expand Down
64 changes: 32 additions & 32 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a841086

Please sign in to comment.