Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,20 @@ To use the application, follow the outlined steps:
1. Clone this repository and create a virtual environment in it:

```console
$ python3 -m venv venv
$ uv venv
```

2. Install the modules listed in the `requirements.txt` file:

```console
(venv)$ pip3 install -r requirements.txt
```
3. You also need to start your mongodb instance either locally or on Docker as well as create a `.env.dev` file. See the `.env.sample` for configurations.
2. You also need to start your mongodb instance either locally or on Docker as well as create a `.env.dev` file. See the `.env.sample` for configurations.

Example for running locally MongoDB at port 27017:
```console
cp .env.sample .env.dev
```

4. Start the application:
3. Start the application:

```console
python3 main.py
uv run main.py
```


Expand All @@ -50,7 +45,7 @@ The starter listens on port 8000 on address [0.0.0.0](0.0.0.0:8080).
To run the tests, run the following command:

```console
(venv)$ pytest
uv run pytest
```

You can also write your own tests in the `tests` directory.
Expand Down
48 changes: 48 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[project]
name = "fastapi-mongo"
version = "0.1.0"
description = "Template for building FastAPI applications with MongoDB."
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"annotated-types==0.6.0",
"anyio==4.3.0",
"bcrypt==4.1.2",
"beanie==1.25.0",
"certifi==2024.2.2",
"click==8.1.7",
"dnspython==2.6.1",
"email-validator==2.1.1",
"exceptiongroup==1.2.0",
"fastapi==0.110.1",
"h11==0.14.0",
"httpcore==1.0.5",
"httpx==0.27.0",
"idna==3.7",
"iniconfig==2.0.0",
"lazy-model==0.2.0",
"mongomock==4.1.2",
"mongomock-motor==0.0.29",
"motor==3.4.0",
"packaging==24.0",
"passlib==1.7.4",
"pluggy==1.4.0",
"pydantic==2.7.0",
"pydantic-core==2.18.1",
"pyjwt==2.8.0",
"pymongo==4.6.3",
"pytest==8.1.1",
"pytest-mock==3.14.0",
"sentinels==1.0.0",
"sniffio==1.3.1",
"starlette==0.37.2",
"toml==0.10.2",
"tomli==2.0.1",
"typing-extensions==4.11.0",
"uvicorn==0.29.0",
]

[dependency-groups]
dev = [
"pytest>=8.1.1",
Copy link

Copilot AI Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pytest dependency is duplicated between the main dependencies (line 34 with exact version 8.1.1) and dev dependencies (line 47 with minimum version >=8.1.1). This creates potential version conflicts and maintenance overhead. Consider removing pytest from the main dependencies and keeping only the dev dependency.

Copilot uses AI. Check for mistakes.
]
Loading
Loading