Add some docs
This commit is contained in:
parent
7c7ab8e902
commit
6b2c2e5a24
32
README.md
32
README.md
|
@ -15,3 +15,35 @@ creating better tracking interfaces.
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
This package just needs [requests](https://python-requests.org). That's it.
|
This package just needs [requests](https://python-requests.org). That's it.
|
||||||
|
|
||||||
|
## Scripts
|
||||||
|
|
||||||
|
This package provides a simple tracker script, `urbantz.tracker`, that can be
|
||||||
|
invoked like this:
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
python -m urbantz.tracker <ID> [-f|--freq <seconds>]
|
||||||
|
```
|
||||||
|
|
||||||
|
The script will perform a request every 10 seconds (by default) to the
|
||||||
|
UrbanTZ API, then print the current date, time, and distance between the
|
||||||
|
delivery truck and the destination.
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
|
Sample setup using
|
||||||
|
[`virtualenvwrapper`](https://virtualenvwrapper.readthedocs.io/):
|
||||||
|
|
||||||
|
```
|
||||||
|
mkvirtualenv pyurbantz -a .
|
||||||
|
pip install -r requirements-dev.txt
|
||||||
|
pip install -e .
|
||||||
|
```
|
||||||
|
|
||||||
|
### Linting
|
||||||
|
|
||||||
|
The source code follows the PEP 8 code style and performs CI checks using the
|
||||||
|
`flake8` tool. To perform the same checks locally, run `flake8` on the root
|
||||||
|
directory of this repository.
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
-r requirements.txt
|
||||||
flake8>=3.5
|
flake8>=3.5
|
||||||
|
|
Reference in New Issue