Add the missing PyPi classifiers for the supported Python versions.
Release the package as both
async-retrieveron PyPi and Conda-forge.
Append “Error” to all exception classes for conforming to PEP-8 naming conventions.
Bump minimum version of
aiohttp-client-cacheto 0.7.3 since the
attrsversion issue has been addressed.
Add a new function,
stream_write, for writing a response to a file as it’s being retrieved. This could be very useful for downloading large files. This function does not use persistent caching.
Set the minimum supported version of Python to 3.8 since many of the dependencies such as
rioxarrayhave dropped support for Python 3.7.
Add support for setting caching-related arguments using three environmental variables:
HYRIVER_CACHE_NAME: Path to the caching SQLite database.
HYRIVER_CACHE_EXPIRE: Expiration time for cached requests in seconds.
HYRIVER_CACHE_DISABLE: Disable reading/writing from/to the cache file.
You can do this like so:
import os os.environ["HYRIVER_CACHE_NAME"] = "path/to/file.sqlite" os.environ["HYRIVER_CACHE_EXPIRE"] = "3600" os.environ["HYRIVER_CACHE_DISABLE"] = "true"
Include the URL of a failed request in its exception error message.
Add three new functions called
retrieve_binary. These functions are derived from the
retrievefunction and are used to retrieve the text, JSON, or binary content of a response. They are meant to help with type hinting since they have only one return type instead of the three different return types that the
Move all private functions to a new module called
utils. This makes the code-base more readable and easier to maintain.
Set the expiration time to never expire by default.
Add two new arguments to
retrievefor controlling caching. First,
delete_url_cachefor deleting caches for specific requests. Second,
expire_afterfor setting a custom expiration time.
sslargument for disabling the SSL certification verification (GH41).
Add a new option called
disablethat temporarily disables caching requests/responses if set to
True. It defaults to
Add two new arguments,
retrieve. These two arguments give the user more control in dealing with issues related to caching.
pytestas the testing framework.
importlib-metadatafor getting the version instead of
pkg_resourcesto decrease import time as discussed in this issue.
ujonfor converting responses to JSON.
Fix an issue with catching service error messages.
ujsonfor JSON parsing instead of
orjsononly serializes to
byteswhich is not compatible with
Add a new function,
clean_cache, for manually removing the expired responses from the cache database.
Handle all cache file-related operations in the
The responses now are returned to the same order as the input URLs.
Add support for passing connection type, i.e., IPv4 only, IPv6 only, or both via the
familyargument. Defaults to
trust_env=True, so the session can read the system’s
netrcfiles. This can be useful for working with services such as EarthData service that read the user authentication info from a
AsyncRequestclass with the
_retrievefunction to increase readability and reduce overhead.
More robust handling of validating user inputs via a new class called
Move all if-blocks in
async_sessionto other functions to improve performance.
Make persistent caching dependencies required.
retrievewhich now accepts both lower and upper cases of
Pass a new loop explicitly to
Refactor the entire code-base for more efficient handling of different request methods.
Check the validity of inputs before sending requests.
Improve cache handling by removing the expired responses before returning the results.
Increase testing coverage to 100%.