giahung24 / openweather-streamlit-connector

A demo app with basic use of custom API connector built using ExperimentalBaseConnection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenWeatherMap Connector for Streamlit

Simple OpenWeatherMap-Streamlit API wrapper. Built using ExperimentalBaseConnection.

Usage example

import streamlit as st
from connection import OpenWeatherConnection

conn = st.experimental_connection("openweathermap", type=OpenWeatherConnection)
city_geo = conn.query(api_name="geo", version="1.0", endpoint="direct", query=f"q=London&limit=1")
st.info(f""" The geographical coordinates (lat, lon) of London is ({city_geo.lat},{city_geo.lon}).

Open in Streamlit

About

A demo app with basic use of custom API connector built using ExperimentalBaseConnection


Languages

Language:Python 100.0%