Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add install_cache function #95

Merged
merged 3 commits into from
Oct 25, 2023
Merged

Conversation

karpetrosyan
Copy link
Owner

This pull request simply adds the install_cache function, which mocks the httpx.Client and httpx.AsyncClient and adds HTTP caching on top.

Example:

import hishel
import httpx

hishel.install_cache()

client = httpx.Client()
client.get("https://hishel.com")
client.get("https://hishel.com")  # takes from the cache

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #95 (b720a61) into master (2af3363) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #95   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines         1665      1666    +1     
=========================================
+ Hits          1665      1666    +1     
Files Coverage Δ
hishel/__init__.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@karpetrosyan karpetrosyan merged commit 5993430 into master Oct 25, 2023
7 checks passed
@karpetrosyan karpetrosyan mentioned this pull request Oct 25, 2023
@karpetrosyan karpetrosyan added the enhancement New feature or request label Oct 25, 2023
@karpetrosyan karpetrosyan deleted the add-install-cache-globally branch November 22, 2023 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant