Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aiopegelonline

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aiopegelonline

Asynchronous library to retrieve data from PEGELONLINE.

  • 0.1.1
  • PyPI
  • Socket score

Maintainers
1

Test codecov Maintainability Library version Supported versions Downloads Formated with Black

aiopegelonline

Asynchronous library to retrieve data from PEGELONLINE.

:warning: this is in early development state :warning:

breaking changes may occure at every time

Requirements

  • Python >= 3.9
  • aiohttp

Installation

pip install aiopegelonline

Examples

Get all available measurement stations

import asyncio
import aiohttp
from aiopegelonline import PegelOnline


async def main():
    async with aiohttp.ClientSession() as session:
        pegelonline = PegelOnline(session)
        stations = await pegelonline.async_get_all_stations()
        for uuid, station in stations.items():
            print(f"uuid: {uuid} name: {station.name}")


if __name__ == "__main__":
    asyncio.run(main())

Get current measurement

import asyncio
import aiohttp
from aiopegelonline import PegelOnline


async def main():
    async with aiohttp.ClientSession() as session:
        pegelonline = PegelOnline(session)
        measurements = await pegelonline.async_get_station_measurements("70272185-b2b3-4178-96b8-43bea330dcae")

    for name, data in measurements.as_dict().items():
        if data is None:
            print(f"{name} not provided by measurement station")
        else:
            print(f"{name}: {data.value} {data.uom}")

if __name__ == "__main__":
    asyncio.run(main())

References


You like my work?

Buy Me A Coffee

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc