A Python module to retrieve facts from a CSV data set.
This module responds with a sorted fact about dogs, with data learned from Purina, Drake Center Vet, Pet Assure and Petfinder.
$ python -m dogs_fact | python -m json.tool
$ python
>>>
import dogs_fact
dogs_fact.get_fact()
Python tests are available using unittest manually or via Makefile.
- Run
python3 -m unittest tests/test_*
. - Or use make as in
make test
to setup, run the tests and clean up.
If not installed, please Install Docker Compose.
There are Makefile rules to simplify this option. See the list of commands:
$ make
to build and run (up) the application.- or run
$ make compose && make run
(note: run calls compose).
- or run
$ make stop
andmake start
to restart the container.
We should be now able to browse: http://localhost:5000/
Note: the default 5000 http port can be changed in .env or running:
$ HTTP_PORT=8080 make
After running command line, using interpreter or running tests, execute:
$ make clean
To remove container and built image, run:
$ make rm
(note: make rm also calls make clean)
Please try from python console:
$ python3
>>> import proxy
>>> help(proxy)
Or try from command line:
$ python3 -c "import proxy; help(proxy.config)"
All documentation can be found in docs.
- Automatic rotation of log files.
- Improve docstring.