Skip to main content

PyCoCoraHS

PyCoCoraHS is a Python package providing a CLI utility and an API for uploading observations to CoCoRaHS.

Installing

Install this package using pip:

python3 -m pip install --user cocorahs

Using the CLI

You can invoke the CLI via cocorahs. Here is the help output:

Usage: cocorahs [OPTIONS] PERCIPITATION

  Report PERCIPITATION amount to CoCoRaHS. Enter T for trace amounts.

Options:
  --station TEXT   The CoCoRaHS station code
  --username TEXT  Your CoCoRaHS username
  --password TEXT  Your CoCoRaHS password
  --help           Show this message and exit.

Configuring the CLI via a config file.

Create a file at ~/.config/cocorahs/config.ini containing a config like the following but changing the details to your username, password, & station.

[CoCoRaHS]
username = DanielSchep
password = hunter2
station = VA-RCC-15

API Usage

Here is a simple example of making a new report via the API:

from cocorahs import CoCoRaHS

api = CoCoRaHS(username='DanielSchep', password='hunter2')
api.new_report(station='VA-RCC-15', percipitation=0.1, trace=False)

The new_report function also accepts an observation_time keyword argument. It should be a datetime.datetime object.

Metadata

Release files for cocorahs 0.1.3

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

Source distribution (sdist)

Source distribution for cocorahs 0.1.3
File Size Uploaded
cocorahs-0.1.3.tar.gz 14.1 kB Details

Built distribution (wheel)

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

Total release size: 28.7 kB

Release files / cocorahs-0.1.3.tar.gz

Download URL cocorahs-0.1.3.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f09083fe0381ed29c3478e005e05bf8da7aa9042df8a61a01f6133cb22dd6dac
BLAKE2b-256 checksum
How to use checksums
f15d73609490b98a10cc8ea51477bc835fad97bb0c968e7c343b8a213855c8b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.24.0

Release files / cocorahs-0.1.3-py3-none-any.whl

Download URL cocorahs-0.1.3-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94b395c797aaf857c2a6de4a89431995910cf2ffd99f5470f7c4a4f1e1b766ad
BLAKE2b-256 checksum
How to use checksums
9222e852ee61e377d098b74ebc53d7141c75c45baa489ecb45a1a5398bda8e34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.24.0

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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