with_api_token()
Python package: neptune-fetcher
Copies the context and overwrites the api_token
field with the provided Neptune API token.
Parameters
api_token
str
optional
Your API token or a service account's API token. If None
, the value of the NEPTUNE_API_TOKEN
environment variable is used.
Example
Get the global context, change the Neptune API token, and use the new context:
import neptune_fetcher.alpha as npt
other_account = npt.get_context().with_api_token("SomeOtherNeptuneApiToken")
npt.list_experiments(experiments=r"exp_.*", context=other_account)