Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
pip._vendor.cachecontrol._cmd Namespace Reference

Functions

 setup_logging ()
 
 get_session ()
 
 get_args ()
 
 main (args=None)
 

Function Documentation

◆ get_args()

get_args ( )

Definition at line 34 of file _cmd.py.

34def get_args():
35 parser = ArgumentParser()
36 parser.add_argument("url", help="The URL to try and cache")
37 return parser.parse_args()
38
39
for i

References i.

Referenced by pip._vendor.cachecontrol._cmd.main().

Here is the caller graph for this function:

◆ get_session()

get_session ( )

Definition at line 22 of file _cmd.py.

22def get_session():
23 adapter = CacheControlAdapter(
24 DictCache(), cache_etags=True, serializer=None, heuristic=None
25 )
26 sess = requests.Session()
27 sess.mount("http://", adapter)
28 sess.mount("https://", adapter)
29
31 return sess
32
33

References i.

Referenced by pip._vendor.cachecontrol._cmd.main().

Here is the caller graph for this function:

◆ main()

main (   args = None)

Definition at line 40 of file _cmd.py.

40def main(args=None):
41 args = get_args()
42 sess = get_session()
43
44 # Make a request to get a response
45 resp = sess.get(args.url)
46
47 # Turn on logging
48 setup_logging()
49
50 # try setting the cache
52
53 # Now try to get it
55 print("Cached!")
56 else:
57 print("Not cached :(")
58
59

References pip._vendor.cachecontrol._cmd.get_args(), pip._vendor.cachecontrol._cmd.get_session(), i, and pip._vendor.cachecontrol._cmd.setup_logging().

Here is the call graph for this function:

◆ setup_logging()

setup_logging ( )

Definition at line 16 of file _cmd.py.

16def setup_logging():
18 handler = logging.StreamHandler()
19 logger.addHandler(handler)
20
21

References i.

Referenced by pip._vendor.cachecontrol._cmd.main().

Here is the caller graph for this function: