Skip to content

Commit 97b9411

Browse files
committed
docs: add quickstart and configuration summary
1 parent 7718e6a commit 97b9411

File tree

2 files changed

+44
-14
lines changed

2 files changed

+44
-14
lines changed

README.rst

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,42 @@
1-
A Python client to query TemplateFlow
2-
=====================================
1+
TemplateFlow Python Client
2+
==========================
33

44
|Zenodo| |preprint| |CircleCI| |Build Status| |Pypi|
55

6-
Reference anatomies of the brain and corresponding atlases play a central role in experimental
7-
neuroimaging workflows and are the foundation for reporting standardized results.
8-
The choice of such references —i.e., templates— and atlases is one relevant source of methodological
9-
variability across studies, which has recently been brought to attention as an important challenge
10-
to reproducibility in neuroscience.
11-
*TemplateFlow* is a publicly available framework for human and nonhuman brain models.
12-
The framework combines an open database with software for access, management, and vetting,
13-
allowing scientists to distribute their resources under *FAIR* —findable, accessible, interoperable,
14-
reusable— principles.
15-
*TemplateFlow* supports a multifaceted insight into brains across species, and enables multiverse
16-
analyses testing whether results generalize across standard references, scales, and in the long term,
17-
species, thereby contributing to increasing the reliability of neuroimaging results.
6+
The TemplateFlow Python client provides a lightweight interface for working with
7+
the `TemplateFlow Archive <https://www.templateflow.org>`__.
8+
It focuses on three core features:
9+
10+
* Discover and retrieve curated, BIDS-like template resources from Python.
11+
* Transparently cache data from the public S3 mirror or a local DataLad clone.
12+
* Share configuration with the command line interface and NiPreps' compatibility wrappers.
13+
14+
Quickstart
15+
----------
16+
17+
.. code-block:: python
18+
19+
>>> from templateflow import TemplateFlowClient
20+
>>> client = TemplateFlowClient()
21+
>>> client.get('MNI152NLin2009cAsym', atlas='HarvardOxford', suffix='probseg')
22+
[PosixPath('.../tpl-MNI152NLin2009cAsym_atlas-HarvardOxford_probseg.nii.gz')]
23+
24+
Use :mod:`templateflow.api` when you need drop-in compatibility with older
25+
TemplateFlow helpers that expose top-level :func:`~templateflow.api.get` or
26+
:func:`~templateflow.api.ls` functions.
27+
28+
Configuration reference
29+
-----------------------
30+
31+
You can configure the client via environment variables or constructor keywords.
32+
33+
============================== ============================== ==============================================
34+
Environment variable ``TemplateFlowClient`` keyword Purpose
35+
============================== ============================== ==============================================
36+
``TEMPLATEFLOW_HOME`` ``root`` Cache directory for downloaded templates.
37+
``TEMPLATEFLOW_USE_DATALAD`` ``use_datalad`` Opt-in to DataLad-backed cache management.
38+
``TEMPLATEFLOW_AUTOUPDATE`` ``autoupdate`` Allow automatic cache updates on import/use.
39+
============================== ============================== ==============================================
1840

1941
Publishing resources in the *TemplateFlow* Archive
2042
--------------------------------------------------

docs/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ About
55
.. include:: ../README.rst
66
:start-line: 3
77

8+
.. seealso::
9+
10+
:doc:`installation`
11+
Instructions for configuring your Python environment and cache.
12+
13+
:doc:`cli`
14+
Usage reference for the command line interface that shares this client's configuration.
15+
816
Contents
917
--------
1018
.. toctree::

0 commit comments

Comments
 (0)