ims-envista


Nameims-envista JSON
Version 0.1.13 PyPI version JSON
download
home_pagehttps://github.com/GuyKh/py-ims-envista
SummaryIsrael Meteorological Service Envista API wrapper package
upload_time2024-11-17 08:16:02
maintainerNone
docs_urlNone
authorGuy Khmelnitsky
requires_python>=3.10
licenseMIT License
keywords ims weatheril israel meteorological service meteorological service weather
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # IMS Envista
==========================

[![Pypi](https://img.shields.io/pypi/v/ims-envista.svg)](https://pypi.python.org/pypi/ims-envista)
[![Downloads](https://static.pepy.tech/badge/ims-envista)](https://pepy.tech/project/ims-envista) 
[![CI](https://github.com/GuyKh/py-ims-envista/actions/workflows/ci.yml/badge.svg)](https://github.com/GuyKh/pi-ims-envista/actions)
[![CodeQuality](https://scrutinizer-ci.com/g/GuyKh/py-ims-envista/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/GuyKh/py-ims-envista?b=main)
[![DownloadFormats](https://img.shields.io/pypi/format/ims-envista)](https://img.shields.io/pypi/format/ims-envista) 

*ims_envista*  is an unofficial IMS (Israel Meteorological Service) python API wrapper for Envista service.

## Features supported

* Get latest meteorological readings from IMS Envista
* Get measurement data by region, station and date range.
* Get Daily and Monthly readings by measurement station.

## Components and Frameworks used

* [aiohttp](https://pypi.org/project/aiohttp/)
* [Loguru](https://pypi.org/project/loguru/)
* [urllib3](https://pypi.org/project/urllib3/)

## Installing

```bash
pip3 install --upgrade ims-envista
```

## Working with the API

weatheril can be configured to retrive forecast information for specific location. when initiating the library you must set the location id and language (Currently only he and en are supported)

### Getting an IMS Token
You can read about the API and about how to get a token [here](https://ims.gov.il/en/ObservationDataAPI) - signing terms of use, etc.

```python
from ims_envista import IMSEnvista

# Create IMS object with Token
ims = IMSEnvista("2cc57fb1-cda5-4965-af12-b397e5b8eb32")

# Get JERUSALEM stations for getting an id
[station for station in await ims.get_all_stations_info() if station.name.startswith("JERUSALEM")]
> [JERUSALEM GIVAT RAM(22) - Location: [Lat - 31.771 / Long - 35.197], Active, Owner: ims, RegionId: 7, Monitors: [
    Rain(mm), WSmax(m / sec), WDmax(deg), WS(m / sec), WD(deg), STDwd(deg), TD(degC), RH( %), TDmax(degC), TDmin(
    degC), Grad(w / m2), DiffR(w / m2), WS1mm(m / sec), Ws10mm(m / sec), Time(hhmm), NIP(
    w / m2)], StationTarget:, JERUSALEM
CENTRE(23) - Location: [Lat - 31.781 / Long - 35.222], Active, Owner: ims, RegionId: 7, Monitors: [Rain(mm),
                                                                                                   WSmax(m / sec),
                                                                                                   WDmax(deg),
                                                                                                   WS(m / sec), WD(deg),
                                                                                                   STDwd(deg), TD(degC),
                                                                                                   TDmax(degC),
                                                                                                   TDmin(degC),
                                                                                                   WS1mm(m / sec),
                                                                                                   Ws10mm(m / sec),
                                                                                                   Time(hhmm), BP(mb),
                                                                                                   RH( %)], StationTarget:, JERUSALEM
CENTRE_1m(248) - Location: [Lat - 31.7806 / Long - 35.2217], Active, Owner: ims, RegionId: 7, Monitors: [Rain_1_min(mm),
                                                                                                         Rain_Corr(
                                                                                                             mm)], StationTarget:, JERUSALEM
GIVAT
RAM_1m(249) - Location: [Lat - 31.7704 / Long - 35.1973], Active, Owner: ims, RegionId: 7, Monitors: [Rain_1_min(mm),
                                                                                                      Rain_Corr(
                                                                                                          mm)], StationTarget:]

# Get latest data by a station id
await ims.get_latest_station_data(23)
> Station(23), Data: [Station: 23, Date: 2023 - 02 - 21
12: 00:00 + 02: 00, Readings: [(TD: 17.6°C), (TDmax: 17.8°C), (TDmin: 17.5°C), (RH: 58.0 %), (Rain: 0.0mm),
                               (WS: 2.8m / s), (WSmax: 3.7m / s), (WD: 285.0deg), (WDmax: 289.0deg), (STDwd: 10.5deg),
                               (WS1mm: 3.4m / s), (WS10mm: 2.9m / s)]]
```

## Methods

| Method  | Description  | Parameters  | Returns  |
|--- |--- |--- |--- |
| get_latest_station_data  | Get Latest Station Readings  | station_id: int, <br>(optional) channel_id: int  | [StationMeteorologicalReadings](./ims_envista/meteo_data.py)  |
| get_earliest_station_data  | Get Earliest Station Readings  | station_id: int, <br>(optional) channel_id: int  | [StationMeteorologicalReadings](./ims_envista/meteo_data.py)  |
| get_station_data_from_date  | Get Station Reading from a specific date  | station_id: int, <br>date: datetime, <br>(optional) channel_id: int  | [StationMeteorologicalReadings](./ims_envista/meteo_data.py)  |
| get_station_data_by_date_range  | Get Station Readings from a date range  | station_id: int, <br>from_date: datetime, <br>to_date: datetime, <br>(optional) channel_id: int  | [StationMeteorologicalReadings](./ims_envista/meteo_data.py)  |
| get_daily_station_data  | Get Daily Station Readings  | station_id: int, <br>(optional) channel_id: int  | [StationMeteorologicalReadings](./ims_envista/meteo_data.py)  |
| get_monthly_station_data  | Get Monthly Station Readings  | station_id: int, <br>(optional) channel_id: int, <br>(optional) month: str, [e.g. 03]<br>(optional) year: str [e.g. 2020]  | [StationMeteorologicalReadings](./ims_envista/meteo_data.py)  |
| get_all_stations_data  | Get Station Info of all stations  |   | list[[Station](./ims_envista/station_data.py)]  |
| get_station_data  | Get Station Info by station_id  | station_id: int  | [Station](./ims_envista/station_data.py)  |
| get_all_regions_data  | Get Region Info of all regions  |   | list[[Region](./ims_envista/station_data.py)]  |
| get_region_info  | Get Region Info by region_id  | station_id: int  | [Region](./ims_envista/station_data.py)  |
| get_metric_descriptions  | Get Station Measurements Description  |   | list[IMSVariable](./ims_envista/ims_variable.py)  |

## Local Development

### Clone from Github

Clone the repo from GitHub

```
git clone git@github.com:GuyKh/ims-envista.git
```

### Requirements

Package requirements are handled using pip. To install them do

```
pip install -r requirements.txt
```

### Local Installation

To install locally:

```
python setup.py install
```

## Tests

Testing is set up using [pytest](http://pytest.org) and coverage is handled
with the pytest-cov plugin.

Run your tests with ```py.test``` in the root directory.

Coverage is ran by default and is set in the ```pytest.ini``` file.
To see an html output of coverage open ```htmlcov/index.html``` after running the tests.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GuyKh/py-ims-envista",
    "name": "ims-envista",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "ims, weatheril, Israel Meteorological Service, Meteorological Service, weather",
    "author": "Guy Khmelnitsky",
    "author_email": "guykhmel@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/03/d1/032ea63143c8bace895fd56b0ea2c961ce067248f3c242c10208dedd9c6f/ims_envista-0.1.13.tar.gz",
    "platform": null,
    "description": "# IMS Envista\n==========================\n\n[![Pypi](https://img.shields.io/pypi/v/ims-envista.svg)](https://pypi.python.org/pypi/ims-envista)\n[![Downloads](https://static.pepy.tech/badge/ims-envista)](https://pepy.tech/project/ims-envista) \n[![CI](https://github.com/GuyKh/py-ims-envista/actions/workflows/ci.yml/badge.svg)](https://github.com/GuyKh/pi-ims-envista/actions)\n[![CodeQuality](https://scrutinizer-ci.com/g/GuyKh/py-ims-envista/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/GuyKh/py-ims-envista?b=main)\n[![DownloadFormats](https://img.shields.io/pypi/format/ims-envista)](https://img.shields.io/pypi/format/ims-envista) \n\n*ims_envista*  is an unofficial IMS (Israel Meteorological Service) python API wrapper for Envista service.\n\n## Features supported\n\n* Get latest meteorological readings from IMS Envista\n* Get measurement data by region, station and date range.\n* Get Daily and Monthly readings by measurement station.\n\n## Components and Frameworks used\n\n* [aiohttp](https://pypi.org/project/aiohttp/)\n* [Loguru](https://pypi.org/project/loguru/)\n* [urllib3](https://pypi.org/project/urllib3/)\n\n## Installing\n\n```bash\npip3 install --upgrade ims-envista\n```\n\n## Working with the API\n\nweatheril can be configured to retrive forecast information for specific location. when initiating the library you must set the location id and language (Currently only he and en are supported)\n\n### Getting an IMS Token\nYou can read about the API and about how to get a token [here](https://ims.gov.il/en/ObservationDataAPI) - signing terms of use, etc.\n\n```python\nfrom ims_envista import IMSEnvista\n\n# Create IMS object with Token\nims = IMSEnvista(\"2cc57fb1-cda5-4965-af12-b397e5b8eb32\")\n\n# Get JERUSALEM stations for getting an id\n[station for station in await ims.get_all_stations_info() if station.name.startswith(\"JERUSALEM\")]\n> [JERUSALEM GIVAT RAM(22) - Location: [Lat - 31.771 / Long - 35.197], Active, Owner: ims, RegionId: 7, Monitors: [\n    Rain(mm), WSmax(m / sec), WDmax(deg), WS(m / sec), WD(deg), STDwd(deg), TD(degC), RH( %), TDmax(degC), TDmin(\n    degC), Grad(w / m2), DiffR(w / m2), WS1mm(m / sec), Ws10mm(m / sec), Time(hhmm), NIP(\n    w / m2)], StationTarget:, JERUSALEM\nCENTRE(23) - Location: [Lat - 31.781 / Long - 35.222], Active, Owner: ims, RegionId: 7, Monitors: [Rain(mm),\n                                                                                                   WSmax(m / sec),\n                                                                                                   WDmax(deg),\n                                                                                                   WS(m / sec), WD(deg),\n                                                                                                   STDwd(deg), TD(degC),\n                                                                                                   TDmax(degC),\n                                                                                                   TDmin(degC),\n                                                                                                   WS1mm(m / sec),\n                                                                                                   Ws10mm(m / sec),\n                                                                                                   Time(hhmm), BP(mb),\n                                                                                                   RH( %)], StationTarget:, JERUSALEM\nCENTRE_1m(248) - Location: [Lat - 31.7806 / Long - 35.2217], Active, Owner: ims, RegionId: 7, Monitors: [Rain_1_min(mm),\n                                                                                                         Rain_Corr(\n                                                                                                             mm)], StationTarget:, JERUSALEM\nGIVAT\nRAM_1m(249) - Location: [Lat - 31.7704 / Long - 35.1973], Active, Owner: ims, RegionId: 7, Monitors: [Rain_1_min(mm),\n                                                                                                      Rain_Corr(\n                                                                                                          mm)], StationTarget:]\n\n# Get latest data by a station id\nawait ims.get_latest_station_data(23)\n> Station(23), Data: [Station: 23, Date: 2023 - 02 - 21\n12: 00:00 + 02: 00, Readings: [(TD: 17.6\u00b0C), (TDmax: 17.8\u00b0C), (TDmin: 17.5\u00b0C), (RH: 58.0 %), (Rain: 0.0mm),\n                               (WS: 2.8m / s), (WSmax: 3.7m / s), (WD: 285.0deg), (WDmax: 289.0deg), (STDwd: 10.5deg),\n                               (WS1mm: 3.4m / s), (WS10mm: 2.9m / s)]]\n```\n\n## Methods\n\n| Method  | Description  | Parameters  | Returns  |\n|--- |--- |--- |--- |\n| get_latest_station_data  | Get Latest Station Readings  | station_id: int, <br>(optional) channel_id: int  | [StationMeteorologicalReadings](./ims_envista/meteo_data.py)  |\n| get_earliest_station_data  | Get Earliest Station Readings  | station_id: int, <br>(optional) channel_id: int  | [StationMeteorologicalReadings](./ims_envista/meteo_data.py)  |\n| get_station_data_from_date  | Get Station Reading from a specific date  | station_id: int, <br>date: datetime, <br>(optional) channel_id: int  | [StationMeteorologicalReadings](./ims_envista/meteo_data.py)  |\n| get_station_data_by_date_range  | Get Station Readings from a date range  | station_id: int, <br>from_date: datetime, <br>to_date: datetime, <br>(optional) channel_id: int  | [StationMeteorologicalReadings](./ims_envista/meteo_data.py)  |\n| get_daily_station_data  | Get Daily Station Readings  | station_id: int, <br>(optional) channel_id: int  | [StationMeteorologicalReadings](./ims_envista/meteo_data.py)  |\n| get_monthly_station_data  | Get Monthly Station Readings  | station_id: int, <br>(optional) channel_id: int, <br>(optional) month: str, [e.g. 03]<br>(optional) year: str [e.g. 2020]  | [StationMeteorologicalReadings](./ims_envista/meteo_data.py)  |\n| get_all_stations_data  | Get Station Info of all stations  |   | list[[Station](./ims_envista/station_data.py)]  |\n| get_station_data  | Get Station Info by station_id  | station_id: int  | [Station](./ims_envista/station_data.py)  |\n| get_all_regions_data  | Get Region Info of all regions  |   | list[[Region](./ims_envista/station_data.py)]  |\n| get_region_info  | Get Region Info by region_id  | station_id: int  | [Region](./ims_envista/station_data.py)  |\n| get_metric_descriptions  | Get Station Measurements Description  |   | list[IMSVariable](./ims_envista/ims_variable.py)  |\n\n## Local Development\n\n### Clone from Github\n\nClone the repo from GitHub\n\n```\ngit clone git@github.com:GuyKh/ims-envista.git\n```\n\n### Requirements\n\nPackage requirements are handled using pip. To install them do\n\n```\npip install -r requirements.txt\n```\n\n### Local Installation\n\nTo install locally:\n\n```\npython setup.py install\n```\n\n## Tests\n\nTesting is set up using [pytest](http://pytest.org) and coverage is handled\nwith the pytest-cov plugin.\n\nRun your tests with ```py.test``` in the root directory.\n\nCoverage is ran by default and is set in the ```pytest.ini``` file.\nTo see an html output of coverage open ```htmlcov/index.html``` after running the tests.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Israel Meteorological Service Envista API wrapper package",
    "version": "0.1.13",
    "project_urls": {
        "Homepage": "https://github.com/GuyKh/py-ims-envista"
    },
    "split_keywords": [
        "ims",
        " weatheril",
        " israel meteorological service",
        " meteorological service",
        " weather"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "392e3aa6af471ee8bd61cd47b706afdade9b07193754151d7d955c802eada063",
                "md5": "8091669bc7b92beb0fc9756d64737296",
                "sha256": "eb51fbb72618a9394f5ba0ded60b0a3bae3254322d953eab5a00145a0ef6db26"
            },
            "downloads": -1,
            "filename": "ims_envista-0.1.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8091669bc7b92beb0fc9756d64737296",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 14954,
            "upload_time": "2024-11-17T08:16:00",
            "upload_time_iso_8601": "2024-11-17T08:16:00.355103Z",
            "url": "https://files.pythonhosted.org/packages/39/2e/3aa6af471ee8bd61cd47b706afdade9b07193754151d7d955c802eada063/ims_envista-0.1.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "03d1032ea63143c8bace895fd56b0ea2c961ce067248f3c242c10208dedd9c6f",
                "md5": "727b0e8cb24ce90a92728bd0d0229a56",
                "sha256": "7941657c7fb9472cbcc2b25410ca3fc36f51f18c5d36bf729a57e3d6b27b738d"
            },
            "downloads": -1,
            "filename": "ims_envista-0.1.13.tar.gz",
            "has_sig": false,
            "md5_digest": "727b0e8cb24ce90a92728bd0d0229a56",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 14599,
            "upload_time": "2024-11-17T08:16:02",
            "upload_time_iso_8601": "2024-11-17T08:16:02.896179Z",
            "url": "https://files.pythonhosted.org/packages/03/d1/032ea63143c8bace895fd56b0ea2c961ce067248f3c242c10208dedd9c6f/ims_envista-0.1.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-17 08:16:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GuyKh",
    "github_project": "py-ims-envista",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "ims-envista"
}
        
Elapsed time: 0.39736s