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

SynopticPy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

SynopticPy

Retrieve mesonet weather data as Polars DataFrames from Synoptic's Weather API.

  • 2024.11.0
  • PyPI
  • Socket score

Maintainers
1
Shows a black logo in light color mode and a white one in dark color mode.

Synoptic API for Python

PyPI Conda Version DOI

License Ruff Tests (Python) Documentation Status Python Conda Recipe Conda Downloads

📘 Documentation | 💬 Discussions | 🚑 Issues

Synoptic's Weather API provides real-time and historical surface-based weather and environmental observations thousands of mesonet stations, and the open-access data is free. More data and enhanced services may be purchased (from Synoptic, not me).

I'm a Synoptic user. I wrote this package to conveniently request data from Synoptic in a Pythonic way and convert its returned JSON to a Polars DataFrame.

from datetime import timedelta
from synoptic import TimeSeries

df = TimeSeries(
    stid="wbb",
    recent=timedelta(minutes=30)
).df()

alt text

I'm sharing this package to improve my skills with Polars and gain more experience in building and maintaining open-source Python packages. If you came across this package, I hope you find it valuable.

Best of Luck 🍀
-Brian

🐍 Install

pip install SynopticPy
conda install -c conda-forge synopticpy

Configure Token

[!IMPORTANT]

🎟️ You need a Synoptic API token before using SynopticPy. Register for a FREE Synoptic account now.

There are three ways you can configure your Synoptic API token:

  1. Set an environment variable SYNOPTIC_TOKEN with your token. For example, in bash:
    export SYNOPTIC_TOKEN="yourTokenHere123456789"
    
  2. Create a file ~/.config/SynopticPy/config.toml with the following
    token = "yourTokenHere123456789"
    
  3. Pass your token whenever you use one of SynopticPy's classes.
    TimeSeries(
        stid="wbb",
        recent=30,
        token="yourTokenHere123456789"
    )
    

How to Cite and Acknowledge

If SynopticPy played an important role in your work, please tell me about it! Also, consider including a citation or acknowledgement in your article or product.

Suggested Citation

Blaylock, B. K. (YEAR). SynopticPy: Synoptic API for Python (Version 20??.?.?) [Computer software]. https://github.com/blaylockbk/SynopticPy

Suggested Acknowledgment

A portion of this work used code generously provided by Brian Blaylock's SynopticPy Python package (https://github.com/blaylockbk/SynopticPy)



[!TIP]

📈 See also my SynopticPy Web App which lets you plot station data in your browser powered by pyscript!

Keywords

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