Skip to main content

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

Project description

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 for 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

uv add SynopticPy
pip install SynopticPy
conda install -c conda-forge synopticpy

Configure Token

[!IMPORTANT]

🎟️ To use SynopticPy you need a Synoptic API token.

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synopticpy-2026.6.0.tar.gz (191.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synopticpy-2026.6.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file synopticpy-2026.6.0.tar.gz.

File metadata

  • Download URL: synopticpy-2026.6.0.tar.gz
  • Upload date:
  • Size: 191.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for synopticpy-2026.6.0.tar.gz
Algorithm Hash digest
SHA256 bf8fa557472075dfb970faf984763162235a72f9c202b751ecf919c210de0011
MD5 75e9fb04dcbc7a7513bf4fba47910b2f
BLAKE2b-256 0c247c87ec655a24af3724d02aeeaee1163ad75319936d2acea9e2cecaef387b

See more details on using hashes here.

Provenance

The following attestation bundles were made for synopticpy-2026.6.0.tar.gz:

Publisher: release_to_pypi.yml on blaylockbk/SynopticPy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file synopticpy-2026.6.0-py3-none-any.whl.

File metadata

  • Download URL: synopticpy-2026.6.0-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for synopticpy-2026.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d3db559a8b316e0f4082706b5d24e9b2b0291b25fbf3d3d06ee37eb0adbedd0
MD5 c8178e95dc02b6c2aaf96c7eb9bf4131
BLAKE2b-256 18fcf3c9908f88e78f01106b15bae5ae4b73458d970becf659be62e5216f2ba9

See more details on using hashes here.

Provenance

The following attestation bundles were made for synopticpy-2026.6.0-py3-none-any.whl:

Publisher: release_to_pypi.yml on blaylockbk/SynopticPy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page