https://github.com/saifkhan192/fastapi-blog
Fast Api with Blog and JWT Authentication
https://github.com/saifkhan192/fastapi-blog
api fastapi jwt-authentication orm python
Last synced: about 2 months ago
JSON representation
Fast Api with Blog and JWT Authentication
- Host: GitHub
- URL: https://github.com/saifkhan192/fastapi-blog
- Owner: saifkhan192
- Created: 2023-02-17T09:27:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-17T13:24:34.000Z (over 3 years ago)
- Last Synced: 2025-03-24T08:49:42.523Z (over 1 year ago)
- Topics: api, fastapi, jwt-authentication, orm, python
- Language: Python
- Homepage:
- Size: 49.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Fast Api Blog
Source: https://blog.yezz.me/blog/Build-and-Secure-an-API-in-Python-with-FastAPI
## Quickstart
python3 -m venv venv
source venv/bin/activate
python -m pip install -r requirements.txt
cp .env.example .env
To run the web application::
make run_local
## Run tests
$ pytest
================================================= test session starts ==================================================
$
If you want to run a specific test, you can do this with `this
$ pytest tests/test_api/test_routes/test_users.py::test_user_can_not_take_already_used_credentials
## Web routes
## Project structure
```sh
├── Makefile
├── README.md
├── __init__.py
├── app
│ ├── __init__.py
│ ├── api
│ │ ├── blog.py
│ │ └── user.py
│ ├── core
│ │ ├── __init__.py
│ │ ├── auth.py
│ │ ├── blog.py
│ │ ├── configs.py
│ │ ├── settings
│ │ │ ├── __init__.py
│ │ │ ├── app.py
│ │ │ ├── development.py
│ │ │ ├── production.py
│ │ │ └── test.py
│ │ └── user.py
│ ├── database
│ │ └── configuration.py
│ ├── main.py
│ ├── models
│ │ └── models.py
│ ├── schema
│ │ ├── hash.py
│ │ ├── oauth2.py
│ │ ├── schemas.py
│ │ └── token.py
│ └── test_main.py
├── blog.db
├── curl.txt
├── pyproject.toml
├── pytest.ini
├── requirements.txt
└── static
└── bird-thumbnail.jpeg
```