HTTP Clients
The pulse-eco package is designed to be modular and compatible with different HTTP clients.
Supported clients
The following HTTP clients are currently supported:
Sync
requestshttpx
Async
aiohttphttpx
Context management
It is recommended to always use context managers when working with HTTP clients.
Examples:
import requests
from pulseeco.client import PulseEcoClient
with requests.Session() as client:
pulse_eco = PulseEcoClient(city_name="skopje", client=client)
pulse_eco.sensors()