Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
API Wrapper for the Ambient Weather Station API with meteorological units and pandas functionality as well
There are a couple of great packages that do a great job but this package introduces units. It also serves as a side-project for me. ☺️
This is currently a work in progress to get it in a package and with the proper tests and CI.
python 3.8 or greater is required
pip install ambient_wx
Units are set for these fields using the pint python library:
from ambient_wx import AmbientApi
api_key = "123"
app_key = "456"
api = AmbientApi(api_key, app_key)
from ambient_wx import WxDeviceCollection
devices = WxDeviceCollection(api)
devices.get_devices()
device = devices.devices[0] # first device
print(device.mac_addr)
from ambient_wx import WxObservationCollection
# with a device object
obs = WxObservationCollection(api, device=device)
# or with a known device mac addr to skip an api call for a device
obs = WxObservationCollection(api, mac_addr="some_mac_addr")
# get the last 5 observations this populates obs.data as a
# list of WxObservation objects
obs.get_observations(limit=5)
# iterate through observations
for o in obs.data:
print(o.tempf, o.winddir, o.humidity)
obs = WxObservationCollection(api, device)
obs.get_observations(end_date=datetime(2024, 4, 25))
for o in obs.data:
print(o.tempf, o.winddir, o.humidity)
# convert deg F to deg C
degc = obs.data[0].tempf.to('degC')
print(degc)
df = obs.to_dataframe()
print(df)
obs.write_csv("/some_path/my_observations.csv")
FAQs
API Wrapper for the Ambient Weather Station API with meteorological units and pandas functionality as well
We found that ambient-wx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.