Assalamu alaikum 👋
Ramadan Mubarak. Wishing you a blessed and Happy Ramadan 😀
Required: python +3.6
Clone this repository:
# git
$ git clone https://github.com/AbduazizZiyodov/ramazon-api.git
# github-cli:
$ gh repo clone AbduazizZiyodov/ramazon-api
Go to the project directory. Create virtual enviroment and activate it:
$ 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.
$ pip install -r requirements.txt
Or, you can use
poetry
(if you have).
$ poetry install
To run fastapi application you will have to use uvicorn
or gunicorn
.
--reload
- reloading for development server.
$ uvicorn main:api --reload
$ gunicorn main:api --worker-class uvicorn.workers.UvicornWorker --reload
http://{{ host }}/swagger
- Swagger UI
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 with poetry
:
$ poetry run pytest
or
$ pytest
🐍 Abduaziz Ziyodov