Skip to main content

IMS Envista

==========================

Pypi Downloads CI CodeQuality DownloadFormats

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

Installing

pip3 install --upgrade ims-envista

Working with the API

Initialize the client with an IMS API token and use the async API methods to fetch station/region data.

Getting an IMS Token

You can read about the API and about how to get a token here - signing terms of use, etc.

import os
from ims_envista import IMSEnvista

# Create IMS client with token from environment
ims = IMSEnvista(os.environ["IMS_TOKEN"])

# 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,
(optional) channel_id: int
StationMeteorologicalReadings
get_earliest_station_data Get Earliest Station Readings station_id: int,
(optional) channel_id: int
StationMeteorologicalReadings
get_station_data_from_date Get Station Reading from a specific date station_id: int,
date: datetime,
(optional) channel_id: int
StationMeteorologicalReadings
get_station_data_by_date_range Get Station Readings from a date range station_id: int,
from_date: datetime,
to_date: datetime,
(optional) channel_id: int
StationMeteorologicalReadings
get_daily_station_data Get Daily Station Readings station_id: int,
(optional) channel_id: int
StationMeteorologicalReadings
get_monthly_station_data Get Monthly Station Readings station_id: int,
(optional) channel_id: int,
(optional) month: str, [e.g. 03]
(optional) year: str [e.g. 2020]
StationMeteorologicalReadings
get_all_stations_info Get station info for all stations list[Station]
get_station_info Get station info by station_id station_id: int Station
get_all_regions_info Get region info for all regions list[Region]
get_region_info Get Region Info by region_id station_id: int Region
get_metrics_descriptions Get station measurements description listIMSVariable

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 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.

Metadata

Release files for ims-envista 0.1.14

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

Source distribution (sdist)

Source distribution for ims-envista 0.1.14
File Size Uploaded
ims_envista-0.1.14.tar.gz 15.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ims-envista 0.1.14
File Interpreter ABI Platform
ims_envista-0.1.14-py3-none-any.whl Python 3 none any Details

Total release size: 32.7 kB

Release files / ims_envista-0.1.14.tar.gz

Download URL ims_envista-0.1.14.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e1102f11974d3d28b3bd1c716adf898bf607eb28d4fb517dd522bf52b148f941
BLAKE2b-256 checksum
How to use checksums
9794e80b689fdb003845b7459d614e674c160d2d718d33476ab02c56059ad1fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / ims_envista-0.1.14-py3-none-any.whl

Download URL ims_envista-0.1.14-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
200dd52baa07de6acdca383bd6f8d34bf14df66f4fc3b8ac27f5b33b2b9bd82a
BLAKE2b-256 checksum
How to use checksums
523b9b6574f138562be2c690990ef35d1d5d593c7aafccfeebefb14fdc33a55b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.14 This release

2 release files

0.1.13

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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