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-apiGo to the project directory. Create virtual enviroment and activate it:
$ cd ramazon-api/
$ python -m venv env && source env/bin/activate
# env/Scripts/activate - windowsInstall all required packages using pip from requirements.txt file.
$ pip install -r requirements.txtOr, 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 --reloadhttp://{{ 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 pytestor
$ pytest🐍 Abduaziz Ziyodov
