Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JulianNorton/weather-milliseconds
Experiment to render a forecast as fast as possible
https://github.com/JulianNorton/weather-milliseconds
flask forecast hacktoberfest python weather
Last synced: about 1 month ago
JSON representation
Experiment to render a forecast as fast as possible
- Host: GitHub
- URL: https://github.com/JulianNorton/weather-milliseconds
- Owner: JulianNorton
- License: mit
- Archived: true
- Created: 2018-03-07T01:33:17.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-03T02:52:11.000Z (about 4 years ago)
- Last Synced: 2024-08-02T13:33:56.433Z (5 months ago)
- Topics: flask, forecast, hacktoberfest, python, weather
- Language: HTML
- Homepage:
- Size: 410 KB
- Stars: 29
- Watchers: 1
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Experiment to render the weather forecast as fast as possible. ~~Goal is sub 100ms.~~ ~40 milliseconds if you're in NYC.
## Set-up
```
python3 -m venv venv && source venv/bin/activate && pip3 install -r requirements.txt && FLASK_APP=app.py FLASK_DEBUG=1 python -m flask run --port=5001
```#### Good resources
* Setting up Flask: https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world### Production setup
```
# Use a screen
# [not needed after venv installed] sudo python3 -m venv venv
screen
source venv/bin/activate
sudo -H pip3 install -r requirements.txt
sudo FLASK_APP=app.py python3 -m flask run --port=5001
```
`Ctrl a` `p` to detatch from the screen### Production reset
```
(To find python processes:)
ps -ef | grep python
sudo kill -9 23826
("23826" is whatever the number is returned that you want to kill)
screen
sudo git pull
sudo python3 -m venv venv
source venv/bin/activate
sudo -H pip3 install -r requirements.txt
sudo FLASK_APP=app.py python3 -m flask run --port=5001
```