Skip to content

Commit 128a205

Browse files
committed
Executable config code blocks
1 parent b873705 commit 128a205

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/user-guide/config.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
# Runtime configuration
22

3-
`zarr.config` is responsible for managing the configuration of zarr and
3+
[`zarr.config`][] is responsible for managing the configuration of zarr and
44
is based on the [donfig](https://github.com/pytroll/donfig) Python library.
55

66
Configuration values can be set using code like the following:
77

8-
```python
8+
```python exec="true" session="config" source="above" result="ansi"
9+
910
import zarr
1011

12+
print(zarr.config.get('array.order'))
13+
```
14+
15+
```python exec="true" session="config" source="above" result="ansi"
1116
zarr.config.set({'array.order': 'F'})
12-
# <donfig.config_obj.ConfigSet object at ...>
1317

14-
# revert this change so it doesn't impact the rest of the docs
15-
zarr.config.set({'array.order': 'C'})
16-
# <donfig.config_obj.ConfigSet object at ...>
18+
print(zarr.config.get('array.order'))
1719
```
1820

1921
Alternatively, configuration values can be set using environment variables, e.g.

0 commit comments

Comments
 (0)