Skip to content

Commit

Permalink
Merge pull request #909 from catalystneuro/dandiapiclient_init_docstring
Browse files Browse the repository at this point in the history
improve DandiApiClient.__init__ docstring
  • Loading branch information
jwodder committed Feb 14, 2022
2 parents 1ca57a6 + 64a6c7c commit 79179bd
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions dandi/dandiapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,17 @@ def __init__(
self, api_url: Optional[str] = None, token: Optional[str] = None
) -> None:
"""
Construct a client instance from a server's base API URL and an
optional authentication token/API key. If no URL is supplied, the URL
of the instance named in the :envvar:`DANDI_INSTANCE` environment
variable (default value: ``dandi``) is used.
Construct a client instance.
:param str api_url: Base API URL of the server to interact with.
- For DANDI production, use ``"https://api.dandiarchive.org/api"``
- For DANDI staging, use ``"https://api-staging.dandiarchive.org/api"``
- If no URL is supplied, the URL is looked up in `known_instances` using the value of the
:envvar:`DANDI_INSTANCE` environment variable (default value: ``"dandi"``).
:param str token: User API Key. Note that different instance APIs have different
keys.
"""

check_dandi_version()
if api_url is None:
instance_name = os.environ.get("DANDI_INSTANCE", "dandi")
Expand Down

0 comments on commit 79179bd

Please sign in to comment.