martinkozle / pulse-eco

pulse.eco API wrapper for Python

Home Page:https://martinkozle.github.io/pulse-eco/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pulse-eco

GitHub Workflow Test codecov GitHub Workflow Build

PyPI PyPI - Python Version

Ruff types - Mypy GitHub license

pulse.eco logo

pulse.eco client for Python.

Installation

Requires Python version 3.8+.

The pulse-eco package comes with no base dependencies, everything is an extra. A sensible default is:

python -m pip install pulse-eco[client,httpx]

List of extras

  • client - includes Pydantic, used for the higher level validated client (pulseeco.client).
  • requests - includes requests HTTP client with sync support.
  • aiohttp - includes aiohttp HTTP client with async support.
  • httpx - includes HTTPX HTTP client with both sync and async support.

Documentation

API Reference and User Guide for this package is available on GitHub Pages.

Official pulse.eco REST API documentation can be found on pulse.eco/restapi.

Requesting data with a larger time range

The pulse.eco API limits the maximum time span of data you can get from one request. For /dataRaw it is one week, while for /avgData it is one year.

If the time range is larger than the maximum, the pulse-eco Python client performs multiple requests to the API and then joins the data together. Be aware of this.

Development

Install Hatch

https://hatch.pypa.io/latest/install/

Create dev environment

Activate a Python 3.8 environment and run:

hatch env create dev

To delete the environment, run:

hatch env remove dev

Install pre-commit hooks

hatch run dev:setup

Create .env file

Set auth credentials in .env file:

cp .env.example .env

Before committing

This command must pass without errors before committing:

hatch run dev:check

Docs

To preview the docs locally, run:

hatch run dev:docs-serve

About

pulse.eco API wrapper for Python

https://martinkozle.github.io/pulse-eco/

License:MIT License


Languages

Language:Python 100.0%