All Projects → mishailovic → VWapi

mishailovic / VWapi

Licence: MIT license
⛈ ☀️ Visual Weather api. Returns beautiful pictures with the current weather.

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to VWapi

weather-api
A RESTful API to check the weather
Stars: ✭ 209 (+533.33%)
Mutual labels:  weather, weather-api
meteofrance-api
Python client for Météo-France API. | Client python pour l'API Météo-France
Stars: ✭ 50 (+51.52%)
Mutual labels:  weather, weather-api
riem
✈️ ☀️ R package for accessing ASOS data via the Iowa Environment Mesonet ☁️ ✈️
Stars: ✭ 38 (+15.15%)
Mutual labels:  weather, weather-api
Wttr.in
⛅ The right way to check the weather
Stars: ✭ 16,345 (+49430.3%)
Mutual labels:  weather, weather-api
api
Community discussion and documentation for the NWS API
Stars: ✭ 168 (+409.09%)
Mutual labels:  weather, weather-api
react-weather-app
⛅️ PWA Weather App made with ReactJS
Stars: ✭ 147 (+345.45%)
Mutual labels:  weather, weather-api
rainviewer-api-example
How to use RainViewer API: simple HTML + JS code which render an animated weather radar overlay on the map
Stars: ✭ 56 (+69.7%)
Mutual labels:  weather, weather-api
Python Wechat Itchat
微信机器人,基于Python itchat接口功能实例展示:01-itchat获取微信好友或者微信群分享文章、02-itchat获取微信公众号文章、03-itchat监听微信公众号发送的文章、04 itchat监听微信群或好友撤回的消息、05 itchat获得微信好友信息以及表图对比、06 python打印出微信被删除好友、07 itchat自动回复好友、08 itchat微信好友个性签名词云图、09 itchat微信好友性别比例、10 微信群或微信好友撤回消息拦截、11 itchat微信群或好友之间转发消息
Stars: ✭ 216 (+554.55%)
Mutual labels:  pillow, matplotlib
cuba-weather-python
Application programming interface of the Cuba Weather project implemented in Python
Stars: ✭ 17 (-48.48%)
Mutual labels:  weather, weather-api
Weather
Weather Android App using apixu API https://www.apixu.com
Stars: ✭ 48 (+45.45%)
Mutual labels:  weather, weather-api
info-bot
🤖 A Versatile Telegram Bot
Stars: ✭ 37 (+12.12%)
Mutual labels:  weather, weather-api
wetterdienst
Open weather data for humans
Stars: ✭ 190 (+475.76%)
Mutual labels:  weather, weather-api
dwdweather2
Python client to access weather data from Deutscher Wetterdienst (DWD), the federal meteorological service in Germany.
Stars: ✭ 68 (+106.06%)
Mutual labels:  weather, weather-api
tapmap
Command line keyboard heatmap generator.
Stars: ✭ 19 (-42.42%)
Mutual labels:  pillow, matplotlib
esp32-e-paper-weatherdisplay
An ESP32 and 4.2" ePaper Display reads Dark Sky weather API and displays the weather using ESP-IDF
Stars: ✭ 110 (+233.33%)
Mutual labels:  weather
weather
A privacy friendly weather app for Android with built in rain radar
Stars: ✭ 209 (+533.33%)
Mutual labels:  weather
global-color-picker
start the script and click anywhere to get rgb value at the cursor location
Stars: ✭ 31 (-6.06%)
Mutual labels:  pillow
dufte
📈 Minimalistic Matplotlib style
Stars: ✭ 196 (+493.94%)
Mutual labels:  matplotlib
ChefAPI
API using FastAPI and PostgreSQL for sharing or keeping track of awesome food recipes Based on Oauth2 and JWT 💎
Stars: ✭ 16 (-51.52%)
Mutual labels:  fastapi
mplcolors
A command-line information tool written in Python 3.x to display matplotlib colors.
Stars: ✭ 34 (+3.03%)
Mutual labels:  matplotlib

VWapi

Quality Gate Status GitHub issues GitHub forks GitHub stars GitHub license

Visual Weather api. Returns beautiful pictures with the current weather.

image image image

Installation:

sudo apt update -y && sudo apt upgrade -y
sudo apt install -y git python3 python3-pip 
git clone https://github.com/mishailovic/VWapi
cd VWapi
pip3 install -r requirements.txt
python3 -m uvicorn weatherapi:app

Usage:

import requests
import time
from PIL import Image
import io
language = "en" # can be "en" or "ru"
place = "Moscow" # can be any city, place, street, or site, geocoder automatically selects location. 
timestamp = round(time.time()) # optional timestamp, can be any unix timestamp from now, to now + three days 
r = requests.get(f"https://vwapi.herokuapp.com?lang={language}&city={place}&timestamp={timestamp}")
image = Image.open(io.BytesIO(r.content))
image.show()

Notes about performance

StreamingResponse

Usually StreamingResponse is slower than Response, but it depends on the environment where VWapi is gonna be deployed, run some tests before and after using StreamingResponse and see which one has better performance.

If you want to use StreamingResponse set USE_STREAMING_RESPONSE environment variable to true.

Telegram bot setup

Demo

screenshot

screenshot

You can also setup your own copy of @visualweatherbot

First, install mogodb, and create directory with database. (If you don't need analytics you can skip this step)

sudo apt install mongodb-server
sudo mkdir /data
sudo mkdir /data/db

Run mongo, copy the connection url, and put it in config.py. Then, talk with @botfather and get your telegram botapi token, you also need to put it in config.py.

Now, form repo directory run:

pip3 install -r requirements.txt
python3 bot.py

Your telegram bot is ready.

Credits:

render.py based on https://github.com/adrian-kalinin/TeleWeatherRobot/blob/master/bot/utils/render.py Huge thanks to its developer @adrian-kalinin

Thx to @notmyst33d for https://github.com/notmyst33d/Dripcons

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].