summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2022-04-18 13:19:13 -0500
committerJordan Cook <jordan.cook@pioneer.com>2022-04-18 13:40:23 -0500
commitd2a4c9938e43aa6de9e54a150fad44650af6a7e1 (patch)
treeb11c2a5ab356486c7f76ebee212850c4bc7dc3e7 /docs
parent1114085dbb38be59ecb862f77e752772d7b55ca1 (diff)
downloadrequests-cache-d2a4c9938e43aa6de9e54a150fad44650af6a7e1.tar.gz
Add links to source files on Examples page
Diffstat (limited to 'docs')
-rw-r--r--docs/examples.md26
-rw-r--r--docs/user_guide/compatibility.md8
2 files changed, 17 insertions, 17 deletions
diff --git a/docs/examples.md b/docs/examples.md
index 779a64d..367581a 100644
--- a/docs/examples.md
+++ b/docs/examples.md
@@ -28,7 +28,7 @@ The following scripts can also be found in the
:end-line: 4
```
-:::{admonition} Example: `basic_sessions.py`
+:::{admonition} Example: [basic_sessions.py](https://github.com/reclosedev/requests-cache/blob/master/examples/basic_sessions.py)
:class: toggle
```{literalinclude} ../examples/basic_sessions.py
:lines: 6-
@@ -41,7 +41,7 @@ The following scripts can also be found in the
:end-line: 4
```
-:::{admonition} Example: `basic_patching.py`
+:::{admonition} Example: [basic_patching.py](https://github.com/reclosedev/requests-cache/blob/master/examples/basic_patching.py)
:class: toggle
```{literalinclude} ../examples/basic_patching.py
:lines: 6-
@@ -54,7 +54,7 @@ The following scripts can also be found in the
:end-line: 3
```
-:::{admonition} Example: `expiration.py`
+:::{admonition} Example: [expiration.py](https://github.com/reclosedev/requests-cache/blob/master/examples/expiration.py)
:class: toggle
```{literalinclude} ../examples/expiration.py
:lines: 5-
@@ -67,7 +67,7 @@ The following scripts can also be found in the
:end-line: 4
```
-:::{admonition} Example: `url_patterns.py`
+:::{admonition} Example: [url_patterns.py](https://github.com/reclosedev/requests-cache/blob/master/examples/url_patterns.py)
:class: toggle
```{literalinclude} ../examples/url_patterns.py
:lines: 6-
@@ -80,7 +80,7 @@ The following scripts can also be found in the
:end-line: 4
```
-:::{admonition} Example: `threads.py`
+:::{admonition} Example: [threads.py](https://github.com/reclosedev/requests-cache/blob/master/examples/threads.py)
:class: toggle
```{literalinclude} ../examples/threads.py
:lines: 6-
@@ -93,7 +93,7 @@ The following scripts can also be found in the
:end-line: 3
```
-:::{admonition} Example: `log_requests.py`
+:::{admonition} Example: [log_requests.py](https://github.com/reclosedev/requests-cache/blob/master/examples/log_requests.py)
:class: toggle
```{literalinclude} ../examples/log_requests.py
:lines: 5-
@@ -106,7 +106,7 @@ The following scripts can also be found in the
:end-line: 8
```
-:::{admonition} Example: `external_config.py`
+:::{admonition} Example: [external_config.py](https://github.com/reclosedev/requests-cache/blob/master/examples/external_config.py)
:class: toggle
```{literalinclude} ../examples/external_config.py
:lines: 10-
@@ -119,7 +119,7 @@ The following scripts can also be found in the
:end-line: 8
```
-:::{admonition} Example: `benchmark.py`
+:::{admonition} Example: [benchmark.py](https://github.com/reclosedev/requests-cache/blob/master/examples/benchmark.py)
:class: toggle
```{literalinclude} ../examples/benchmark.py
:lines: 10-
@@ -132,7 +132,7 @@ The following scripts can also be found in the
:end-line: 4
```
-:::{admonition} Example: `convert_cache.py`
+:::{admonition} Example: [convert_cache.py](https://github.com/reclosedev/requests-cache/blob/master/examples/convert_cache.py)
:class: toggle
```{literalinclude} ../examples/convert_cache.py
:lines: 6-
@@ -146,7 +146,7 @@ The following scripts can also be found in the
:end-line: 15
```
-:::{admonition} Example: `custom_request_matcher.py`
+:::{admonition} Example: [custom_request_matcher.py](https://github.com/reclosedev/requests-cache/blob/master/examples/custom_request_matcher.py)
:class: toggle
```{literalinclude} ../examples/custom_request_matcher.py
:lines: 17-
@@ -160,7 +160,7 @@ The following scripts can also be found in the
:end-line: 4
```
-:::{admonition} Example: `time_machine_backtesting.py`
+:::{admonition} Example: [time_machine_backtesting.py](https://github.com/reclosedev/requests-cache/blob/master/examples/time_machine_backtesting.py)
:class: toggle
```{literalinclude} ../examples/time_machine_backtesting.py
:lines: 6-
@@ -174,9 +174,9 @@ The following scripts can also be found in the
:end-line: 5
```
-:::{admonition} Example: `vcr.py`
+:::{admonition} Example: [vcr.py](https://github.com/reclosedev/requests-cache/blob/master/examples/vcr.py)
:class: toggle
```{literalinclude} ../examples/vcr.py
:lines: 7-
```
-::: \ No newline at end of file
+:::
diff --git a/docs/user_guide/compatibility.md b/docs/user_guide/compatibility.md
index fff338c..fcd5304 100644
--- a/docs/user_guide/compatibility.md
+++ b/docs/user_guide/compatibility.md
@@ -141,7 +141,7 @@ Or if you use a `CachedSession` object, you could replace it with a regular `Ses
If you want both caching and mocking features at the same time, you can attach requests-mock's
[adapter](https://requests-mock.readthedocs.io/en/latest/adapter.html) to a `CachedSession`:
-:::{admonition} Example: test_requests_mock_combine_cache.py
+:::{admonition} Example: `test_requests_mock_combine_cache.py`
:class: toggle
```{literalinclude} ../../tests/compat/test_requests_mock_combine_cache.py
```
@@ -157,7 +157,7 @@ This has the advantage of only using request-mock's behavior for
```
To turn that into a complete example:
-:::{admonition} Example: test_requests_mock_load_cache.py
+:::{admonition} Example: `test_requests_mock_load_cache.py`
:class: toggle
```{literalinclude} ../../tests/compat/test_requests_mock_load_cache.py
```
@@ -167,7 +167,7 @@ To turn that into a complete example:
Usage with the [responses](https://github.com/getsentry/responses) library is similar to the
requests-mock examples above.
-:::{admonition} Example: test_responses_load_cache.py
+:::{admonition} Example: `test_responses_load_cache.py`
:class: toggle
```{literalinclude} ../../tests/compat/test_responses_load_cache.py
```
@@ -177,7 +177,7 @@ requests-mock examples above.
If you would like to reuse your cached response data for unit tests, one option is to convert your
cache into a format compatible with VCR-vased libraries like
[vcrpy](https://github.com/kevin1024/vcrpy) and [betamax](https://github.com/betamaxpy/betamax).
-:::{admonition} Example: vcr.py
+:::{admonition} Example: `vcr.py`
:class: toggle
```{literalinclude} ../../examples/vcr.py
:lines: 7-