Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
So, I'm working on a python tool to help me with investing in stock markets (portfolio optimization, import/export from popular brokers, strategy testing , ... etc), and a huge of part of the work is getting historical price data of stocks from the web ... and it gets tiring if at each run/test I have to wait to pull the same 10 year data for x number of stocks. So I started looking for ways to cache data locally seamlessly without having to do it manually in my code. Another constraint is that it also needs to work with the http lib I'm using: I use the awesome library httpx for making http requests, it provides a requests like interface with async support, and many other features, ...
https://github.com/ionrock/cachecontrol: cache-control for requests
https://github.com/johtso/httpx-caching: supports only httpx version 0.18, and doesn't seem to work with latest versions, and also missing the file-cache feature that I wanted the most ^^
That's why I decided to try and make my own: https://github.com/obendidi/httpx-cache