async def main():
    """Sample code to retrieve the data from an OpenSenseMap station."""
    async with aiohttp.ClientSession() as session:
        station = OpenSenseMap(SENSOR_ID, loop, session)

        # Print details about the given station
        await station.get_data()

        print("Name:", station.name)
        print("Description:", station.description)
        print("Coordinates:", station.coordinates)

        print("PM 2.5:", station.pm2_5)
        print("PM 10:", station.pm10)

        print("Temperature:", station.temperature)
async def main ( ) : async with aiohttp . ClientSession ( ) as session : station = OpenSenseMap ( SENSOR_ID , loop , session ) await station . get_data ( ) print ( "Name:" , station . name ) print ( "Description:" , station . description ) print ( "Coordinates:" , station . coordinates ) print ( "PM 2.5:" , station . pm2_5 ) print ( "PM 10:" , station . pm10 ) print ( "Temperature:" , station . temperature )
Sample code to retrieve the data from an OpenSenseMap station.