# pulse-eco
![GitHub Workflow Test](https://github.com/martinkozle/pulse-eco/actions/workflows/test.yml/badge.svg)
[![codecov](https://codecov.io/gh/martinkozle/pulse-eco/branch/main/graph/badge.svg)](https://codecov.io/gh/martinkozle/pulse-eco)
![GitHub Workflow Build](https://github.com/martinkozle/pulse-eco/actions/workflows/build.yml/badge.svg)
[![PyPI](https://img.shields.io/pypi/v/pulse-eco?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/pulse-eco)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pulse-eco)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/ambv/black)
[![GitHub license](https://img.shields.io/github/license/martinkozle/pulse-eco)](https://github.com/martinkozle/pulse-eco/blob/main/LICENSE)
[![pulse.eco logo](https://pulse.eco/img/pulse-logo-horizontal.svg)](https://pulse.eco)
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:
```console
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](https://requests.readthedocs.io/en/latest/) HTTP client with sync support.
- `aiohttp` - includes [aiohttp](https://docs.aiohttp.org/en/stable/) HTTP client with async support.
- `httpx` - includes [HTTPX](https://www.python-httpx.org/) HTTP client with both sync and async support.
## Documentation
API Reference and User Guide for this package is available on [GitHub Pages](https://martinkozle.github.io/pulse-eco/).
Official pulse.eco REST API documentation can be found on [pulse.eco/restapi](https://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:
```console
hatch env create dev
```
To delete the environment, run:
```console
hatch env remove dev
```
### Install pre-commit hooks
```console
hatch run dev:setup
```
### Create .env file
Set auth credentials in `.env` file:
```console
cp .env.example .env
```
### Before committing
This command must pass without errors before committing:
```console
hatch run dev:check
```
### Docs
To preview the docs locally, run:
```console
hatch run dev:docs-serve
```
Raw data
{
"_id": null,
"home_page": null,
"name": "pulse-eco",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "air, air pollution, air quality index, api, aqi, eco, pollution, pulse, pulse.eco, python, quality, wrapper",
"author": null,
"author_email": "martinkozle <martinkozle@yahoo.com>",
"download_url": "https://files.pythonhosted.org/packages/3e/0b/34f76dac44a336751a778dc615a1cff150b305ac8be8bdf66c8efc61cb5d/pulse_eco-2.3.2.tar.gz",
"platform": null,
"description": "# pulse-eco\n\n![GitHub Workflow Test](https://github.com/martinkozle/pulse-eco/actions/workflows/test.yml/badge.svg)\n[![codecov](https://codecov.io/gh/martinkozle/pulse-eco/branch/main/graph/badge.svg)](https://codecov.io/gh/martinkozle/pulse-eco)\n![GitHub Workflow Build](https://github.com/martinkozle/pulse-eco/actions/workflows/build.yml/badge.svg)\n\n[![PyPI](https://img.shields.io/pypi/v/pulse-eco?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/pulse-eco)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pulse-eco)\n\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/ambv/black)\n[![GitHub license](https://img.shields.io/github/license/martinkozle/pulse-eco)](https://github.com/martinkozle/pulse-eco/blob/main/LICENSE)\n\n[![pulse.eco logo](https://pulse.eco/img/pulse-logo-horizontal.svg)](https://pulse.eco)\n\npulse.eco client for Python.\n\n## Installation\n\nRequires Python version 3.8+.\n\nThe `pulse-eco` package comes with no base dependencies, everything is an extra. A sensible default is:\n\n```console\npython -m pip install pulse-eco[client,httpx]\n```\n\n### List of extras\n\n- `client` - includes Pydantic, used for the higher level validated client (`pulseeco.client`).\n- `requests` - includes [requests](https://requests.readthedocs.io/en/latest/) HTTP client with sync support.\n- `aiohttp` - includes [aiohttp](https://docs.aiohttp.org/en/stable/) HTTP client with async support.\n- `httpx` - includes [HTTPX](https://www.python-httpx.org/) HTTP client with both sync and async support.\n\n## Documentation\n\nAPI Reference and User Guide for this package is available on [GitHub Pages](https://martinkozle.github.io/pulse-eco/).\n\nOfficial pulse.eco REST API documentation can be found on [pulse.eco/restapi](https://pulse.eco/restapi).\n\n## Requesting data with a larger time range\n\nThe pulse.eco API limits the maximum time span of data you can get from one request.\nFor `/dataRaw` it is one week, while for `/avgData` it is one year.\n\nIf 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.\n\n## Development\n\n### Install Hatch\n\n<https://hatch.pypa.io/latest/install/>\n\n### Create dev environment\n\nActivate a Python 3.8 environment and run:\n\n```console\nhatch env create dev\n```\n\nTo delete the environment, run:\n\n```console\nhatch env remove dev\n```\n\n### Install pre-commit hooks\n\n```console\nhatch run dev:setup\n```\n\n### Create .env file\n\nSet auth credentials in `.env` file:\n\n```console\ncp .env.example .env\n```\n\n### Before committing\n\nThis command must pass without errors before committing:\n\n```console\nhatch run dev:check\n```\n\n### Docs\n\nTo preview the docs locally, run:\n\n```console\nhatch run dev:docs-serve\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "pulse.eco API wrapper",
"version": "2.3.2",
"project_urls": {
"Bug Tracker": "https://github.com/martinkozle/pulse-eco/issues",
"Homepage": "https://github.com/martinkozle/pulse-eco"
},
"split_keywords": [
"air",
" air pollution",
" air quality index",
" api",
" aqi",
" eco",
" pollution",
" pulse",
" pulse.eco",
" python",
" quality",
" wrapper"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9113407dc3d7b01d0352f45f2e67e6072bd60c2e5a67414df86b592f2185295b",
"md5": "23f266894cae184e36cb3cb58caaa251",
"sha256": "308d53de437969e9fad603e9df0d64693dccda41fbff41e2371acab05657cf4d"
},
"downloads": -1,
"filename": "pulse_eco-2.3.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "23f266894cae184e36cb3cb58caaa251",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 15246,
"upload_time": "2024-06-29T17:44:28",
"upload_time_iso_8601": "2024-06-29T17:44:28.782338Z",
"url": "https://files.pythonhosted.org/packages/91/13/407dc3d7b01d0352f45f2e67e6072bd60c2e5a67414df86b592f2185295b/pulse_eco-2.3.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3e0b34f76dac44a336751a778dc615a1cff150b305ac8be8bdf66c8efc61cb5d",
"md5": "6b027eb7a3862e843793ab5a9c209d9b",
"sha256": "2e0e7ec3e5070a55588aa5335b42636f834a003c172a446e759156e3206c0cfa"
},
"downloads": -1,
"filename": "pulse_eco-2.3.2.tar.gz",
"has_sig": false,
"md5_digest": "6b027eb7a3862e843793ab5a9c209d9b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 11875,
"upload_time": "2024-06-29T17:44:30",
"upload_time_iso_8601": "2024-06-29T17:44:30.669135Z",
"url": "https://files.pythonhosted.org/packages/3e/0b/34f76dac44a336751a778dc615a1cff150b305ac8be8bdf66c8efc61cb5d/pulse_eco-2.3.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-29 17:44:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "martinkozle",
"github_project": "pulse-eco",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pulse-eco"
}