Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Requests wrapper that add's support for HTTP caching. It act's just like requests but with a few extra parameters and features.
Urlquick 2 is a wrapper for requests that add's support for http caching. It acts just like requests but with a few extra parameters and features. 'Requests' itself is left untouched.
All GET, HEAD and POST requests are cached locally for a period of 4 hours, this can be changed. When the cache expires, conditional headers are added to any new request e.g. "Etag" and "Last-modified". Then if the server returns a 304 Not-Modified response, the cache is used, saving having to re-download the content body.
All of Requests get
, head
, post
and request
functions/methods all get 2 extra optional parameters.
Both these 2 parameters can also be set on a session object too.
max_age
: Age the 'cache' can be before it’s considered stale.raise_for_status
: Boolean that when set to True
will call resp.raise_for_status()
for you automatically.The Requests response objects also gets too new methods.
parse()
: Parse’s “HTML” document into a element tree using HTMLement.xml()
: Parse’s XML document into a element tree.>>> import urlquick
# Make a simple request to check ip address.
>>> r = urlquick.get('https://httpbin.org/ip')
>>> r.json()
{'ip': '172.69.48.124'}
# Take note of the elapsed time.
>>> r.elapsed
0:00:00.556889
# Now make the same request but notice the much lower elapsed time.
>>> r = urlquick.get('https://httpbin.org/ip')
>>> r.elapsed
0:00:00.000184
# To change the max age for the cache to 1 hour.
>>> r = urlquick.get('https://httpbin.org/ip', max_age=60*60)
# max_age of -1 will disable the caching system.
# max_age of 0 will send conditional headers to check if content needs to be redownloaded.
Urlquick 2 officially supports Python 2.7 & 3.6+.
$ pip install urlquick
FAQs
Requests wrapper that add's support for HTTP caching. It act's just like requests but with a few extra parameters and features.
We found that urlquick demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.