https://github.com/abduazizziyodov/ramazon-api
π API for Ramadan! Written in FastAPI
https://github.com/abduazizziyodov/ramazon-api
backend fastapi python ramadan rest-api swagger
Last synced: about 2 months ago
JSON representation
π API for Ramadan! Written in FastAPI
- Host: GitHub
- URL: https://github.com/abduazizziyodov/ramazon-api
- Owner: AbduazizZiyodov
- License: mit
- Created: 2021-04-04T11:45:37.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-08T21:38:08.000Z (about 1 year ago)
- Last Synced: 2025-03-26T21:19:22.952Z (2 months ago)
- Topics: backend, fastapi, python, ramadan, rest-api, swagger
- Language: Python
- Homepage:
- Size: 1.49 MB
- Stars: 22
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **π Ramazon-API**

Assalamu alaikum π
Ramadan Mubarak. Wishing you a blessed and Happy Ramadan π## **π§° Setup**
> **Required:** python +3.6
Clone this repository:
```bash
# git
$ git clone https://github.com/AbduazizZiyodov/ramazon-api.git
``````bash
# github-cli:
$ gh repo clone AbduazizZiyodov/ramazon-api
```Go to the project directory. Create virtual enviroment and activate it:
```bash
$ cd ramazon-api/
$ python -m venv env && source env/bin/activate# env/Scripts/activate - windows
```Install all required packages using `pip` from `requirements.txt` file.
```bash
$ pip install -r requirements.txt
```> Or, you can use `poetry` (if you have).
```
$ poetry install
```# **πRunning Server**
To run fastapi application you will have to use `uvicorn` or `gunicorn`.
### **Uvicorn** π¦
> `--reload` - reloading for development server.
```bash
$ uvicorn main:api --reload
```### **Gunicorn** (π’)π¦
```bash
$ gunicorn main:api --worker-class uvicorn.workers.UvicornWorker --reload
```
- `http://{{ host }}/swagger` - _Swagger UI_
## **β¨Mocking Database**
After running server, you should send `GET` request to `/simulate` endpoint from anywhere(swagger UI, curl, postman ...). The results of mocking will be logged on your terminal.

## **π§ͺ Running Tests**
Running with `poetry`:
```bash
$ poetry run pytest
```or
```bash
$ pytest
```
π Abduaziz Ziyodov