Outdoor air quality data
Fetch outdoor air quality data from multiple resources, the system is made of the following components:
The data flow from online resource to reliable data point is broken down as follow:
The default local configuration file is okqconfig.py, this can be changed using the environment variable OKQ_CONFMODULE. The okqconfig.py file should define a dict called settings, this dict can be used to overwrite any configuration option defined in the global_settings of openkongqi.conf.
Each station needs to be attached to a unique identier, a station identifier is of the following formats:
CC/STATION CC/CITY/STATION CC/STATE/CITY/STATION
The following fragments compose the UUID:
All names have to be expressed in Uppercase or lowercase or numeric latin letters.
Make sure the lxml package is installed, on debian:
$ apt-get install python-lxml
Install the code:
$ pip install -U pip $ pip install pip-tools $ pip-sync requirements.txt
Install development environment:
$ pip install -r requirements-dev.txt
Create necessary database & tables:
(openkongqi)$ python -c "import openkongqi.bin; openkongqi.bin.okq_init()"
(openkongqi)$ python openkongqi/bin.py worker --loglevel=debug --concurrency=1 --autoreload -B
Test the package:
$ python -m unittest discover
Automatic testing in various environments:
To update the version of the package, use the following command:
$ bumpr -b -m
$ python setup.py sdist bdist_wheel
Kōngqì (空气) is the Chinese word for air/atmosphere.
This software is licensed under the Apache License 2.0. See the LICENSE file in the top distribution directory for the full license text.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|openkongqi-0.1.3-py2.py3-none-any.whl (29.6 kB) Copy SHA256 Checksum SHA256||py2.py3||Wheel||Apr 20, 2017|
|openkongqi-0.1.3.tar.gz (20.5 kB) Copy SHA256 Checksum SHA256||–||Source||Apr 20, 2017|