https://github.com/0dminnimda/insurance_calculator_service
https://github.com/0dminnimda/insurance_calculator_service
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/0dminnimda/insurance_calculator_service
- Owner: 0dminnimda
- License: mit
- Created: 2023-07-13T21:49:03.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-15T14:22:16.000Z (almost 2 years ago)
- Last Synced: 2023-07-15T15:23:42.988Z (almost 2 years ago)
- Language: Python
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Insurance calculator service
This repo implements this [task](/TASK.md)
## Installation and Launch
Clone the repo and go to it's root folder
```bash
git clone https://github.com/0dminnimda/insurance_calculator_service.git
cd insurance_calculator_service
```Then run python command in the root folder
```bash
python -m insurance_calculator_service
```You can even change some options
```bash
python -m insurance_calculator_service --help
```Now when you lanched the app just go to the host, by default http://localhost:80.
To see what things are possible and play around go to http://localhost:80/docs
## Debug
To debug you'll need to install this app as python package. (Personally I'll recommend to use virtualenv)
```bash
pip install -e .
```Then just run the `__main__.py` file in the debug mode. It uses absolute imports to allow for that kind of behaviour.
## Docker
If you would like to use docker, just run
```bash
docker-compose up -d
```## Tests
All tests are located at [`tests`](/tests) folder.
To run tests you need to first install the package prepared for testing
```bash
pip install -e .[test]
```And then run pytest
```bash
python -m pytest
```## Formatting
Code is formatter using [black](https://github.com/psf/black)
You can get it along with this project by running
```bash
pip install -e .[fmt]
```