summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2022-06-17 16:25:20 -0500
committerJordan Cook <jordan.cook@pioneer.com>2022-06-17 16:33:47 -0500
commit8bc2f70d0b8a7c7ad22da7bed69d41bc7d11e8c2 (patch)
treeaf2a016a83bd83c675fe9ad04f759bfcc63da325 /docs
parent2bcd6df0fd80205a03aa4787ddf411e9632c4fed (diff)
downloadrequests-cache-8bc2f70d0b8a7c7ad22da7bed69d41bc7d11e8c2.tar.gz
Use sphinx-design tabs instead of sphinx-inline-tabs
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py1
-rw-r--r--docs/user_guide/backends.md8
-rw-r--r--docs/user_guide/files.md23
-rw-r--r--docs/user_guide/installation.md10
4 files changed, 29 insertions, 13 deletions
diff --git a/docs/conf.py b/docs/conf.py
index a5dfadb..224e65e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -51,7 +51,6 @@ extensions = [
'sphinx_automodapi.smart_resolver',
'sphinx_copybutton',
'sphinx_design',
- 'sphinx_inline_tabs',
'sphinxcontrib.apidoc',
'sphinxext.opengraph',
'myst_parser',
diff --git a/docs/user_guide/backends.md b/docs/user_guide/backends.md
index 8238665..8eb06a5 100644
--- a/docs/user_guide/backends.md
+++ b/docs/user_guide/backends.md
@@ -75,14 +75,16 @@ If you just want to quickly try out all of the available backends for comparison
[docker-compose](https://docs.docker.com/compose/) config is included for all supported services.
First, [install docker](https://docs.docker.com/get-docker/) if you haven't already. Then, run:
-:::{tab} Bash (Linux/macOS)
+::::{tab-set}
+
+:::{tab-item} Bash (Linux/macOS)
```bash
pip install -U requests-cache[all] docker-compose
curl https://raw.githubusercontent.com/requests-cache/requests-cache/main/docker-compose.yml -O docker-compose.yml
docker-compose up -d
```
:::
-:::{tab} Powershell (Windows)
+:::{tab-item} Powershell (Windows)
```ps1
pip install -U requests-cache[all] docker-compose
Invoke-WebRequest -Uri https://raw.githubusercontent.com/requests-cache/requests-cache/main/docker-compose.yml -Outfile docker-compose.yml
@@ -90,6 +92,8 @@ docker-compose up -d
```
:::
+::::
+
(exporting)=
## Exporting To A Different Backend
If you have cached data that you want to copy or migrate to a different backend, you can do this
diff --git a/docs/user_guide/files.md b/docs/user_guide/files.md
index c47783e..94ced46 100644
--- a/docs/user_guide/files.md
+++ b/docs/user_guide/files.md
@@ -38,21 +38,25 @@ If you don't know exactly where you want to put your cache files, your system's
or **cache directory** is a good choice. Some options are available as shortcuts for these locations.
Use the default temp directory with the `use_temp` option:
-:::{tab} Linux
+::::{tab-set}
+:::{tab-item} Linux
+:sync: linux
```python
>>> session = CachedSession('http_cache', backend='sqlite', use_temp=True)
>>> print(session.cache.db_path)
'/tmp/http_cache.sqlite'
```
:::
-:::{tab} macOS
+:::{tab-item} macOS
+:sync: macos
```python
>>> session = CachedSession('http_cache', backend='sqlite', use_temp=True)
>>> print(session.cache.db_path)
'/var/folders/xx/http_cache.sqlite'
```
:::
-:::{tab} Windows
+:::{tab-item} Windows
+:sync: windows
```python
>>> session = CachedSession('http_cache', backend='sqlite', use_temp=True)
>>> print(session.cache.db_path)
@@ -60,28 +64,35 @@ Use the default temp directory with the `use_temp` option:
```
:::
+::::
+
Or use the default cache directory with the `use_cache_dir` option:
-:::{tab} Linux
+::::{tab-set}
+:::{tab-item} Linux
+:sync: linux
```python
>>> session = CachedSession('http_cache', backend='filesystem', use_cache_dir=True)
>>> print(session.cache.cache_dir)
'/home/user/.cache/http_cache/'
```
:::
-:::{tab} macOS
+:::{tab-item} macOS
+:sync: macos
```python
>>> session = CachedSession('http_cache', backend='filesystem', use_cache_dir=True)
>>> print(session.cache.cache_dir)
'/Users/user/Library/Caches/http_cache/'
```
:::
-:::{tab} Windows
+:::{tab-item} Windows
+:sync: windows
```python
>>> session = CachedSession('http_cache', backend='filesystem', use_cache_dir=True)
>>> print(session.cache.cache_dir)
'C:\\Users\\user\\AppData\\Local\\http_cache\\'
```
:::
+::::
```{note}
If the cache name is an absolute path, the `use_temp` and `use_cache_dir` options will be ignored.
diff --git a/docs/user_guide/installation.md b/docs/user_guide/installation.md
index 65ab45d..8abff9b 100644
--- a/docs/user_guide/installation.md
+++ b/docs/user_guide/installation.md
@@ -1,27 +1,29 @@
# {fas}`download` Installation
Installation instructions:
-:::{tab} Pip
+::::{tab-set}
+:::{tab-item} Pip
Install the latest stable version from [PyPI](https://pypi.org/project/requests-cache/):
```
pip install requests-cache
```
:::
-:::{tab} Conda
+:::{tab-item} Conda
Or install from [conda-forge](https://anaconda.org/conda-forge/requests-cache), if you prefer:
```
conda install -c conda-forge requests-cache
```
:::
-:::{tab} Pre-release
+:::{tab-item} Pre-release
If you would like to use the latest development (pre-release) version:
```
pip install --pre requests-cache
```
:::
-:::{tab} Local development
+:::{tab-item} Local development
See {ref}`contributing` for setup steps for local development
:::
+::::
(requirements)=
## Requirements