Comments (3)
I am actually thinking of making a few changes over the next few weeks, adding an update() method will be on the list.
In the mean time you can avoid the API call from load_forecast() by removing the "currently" key from the json dictionary. If the "currently" key is missing, it will load it again when called.
Give this a go.
f = Forecastio("Your API Key")
f.load_forecast(-31.967819, 115.87718, lazy=True)
f.getCurrently().time
#Displays the time of the last forecast
f.json.pop("currently")
#Removes the "currently" key from the json dictionary
f.getCurrently().time
#reloads the forecast with a different time
from python-forecast.io.
I had tried something similar but it didn't work. Your suggestion does. Thanks for the great library!
from python-forecast.io.
I have made some big changes and there is now an update() method. Let me know what you think.
from python-forecast.io.
Related Issues (20)
- Pip install not working HOT 4
- Buggy temperature responses? HOT 2
- After installing python-forecastio, still cannnot import forecastio. HOT 2
- Update API endpoint HOT 7
- 1.3.5 HOT 1
- importing forecastio fails HOT 1
- currently option is broken HOT 2
- alerts not functioning correctly HOT 1
- 502 errors HOT 3
- Question on extracting weather data
- Requests don't have timeouts
- error 403 forbidden
- Option to return 'None' instead of KeyError
- Is it possible to "exclude" data blocks to reduce latency?
- alerts not updated
- Flags Object
- Can't handle for forecastio.utils.PropertyUnavailable keyError HOT 2
- Apple has purchased Dark Sky and is shutting down the API
- Can we no longer get an API key? HOT 1
- Fix simple typo: caerful -> careful HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-forecast.io.