Skip to main content

Installation | Usage | License

pydavis

A package intended the logging of weather data parameters monitored by Davis weather stations. The parameters are obtained through the reports generated at Davis WeatherLink websites, and can be streamed to a MySQL database or a specified file.

Installation

The package can be installed with pip

pip install pydavis

Usage

Through the data_logging.py module, the weather parameters are streamed from WeatherLink websites:

>>> from data_logging import DataLogger

By instantiating the DataLogger with an URL, the logging sequence can then be initiated and data stored according to specified format. Any logging sequence is aborted with CTRL + C.

Storing data in a MySQL database

>>> logger = DataLogger(url)
>>> logger.initiate_logging(to_table=True,
                            user='user',
                            password='password',
                            database='pydavis',
                            table='weather_data')

The necessary arguments are MySQL login credentials, the name of the database and the table. The logger will create the database and the table if necessary.

Storing data in a file

>>> logger = DataLogger(url)
>>> logger.initiate_logging(to_file=True,
                            path_to_file='./weather_data.csv')

The location including the name of the file must be passed as argument. The logger will create a new file if necessary.

License

MIT, see MIT license.

Release files for pydavis 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydavis 0.1.1
File Size Uploaded
pydavis-0.1.1.tar.gz 12.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pydavis 0.1.1
File Interpreter ABI Platform
pydavis-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.1 kB

Release files / pydavis-0.1.1.tar.gz

Download URL pydavis-0.1.1.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c54611db7d88b7cfc1033b70731fda13173f39f110ac7767dee293e73e6d866e
BLAKE2b-256 checksum
How to use checksums
d64aff0c961427c438af0beb5874cea0c42a092943aede5bddf82b62a9b7c46e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pydavis-0.1.1-py3-none-any.whl

Download URL pydavis-0.1.1-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b4fe48610dec0b22c21eb29630f58f88b8b6863a785dce1e8088918eb566fef
BLAKE2b-256 checksum
How to use checksums
572b9ee7d2a22dedaca8fad1f5ae79e3ba8fea8f9862cfbab362d658f87196b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page