Skip to main content
App version: 3.4.8

Context

Python package: neptune-fetcher

To work with multiple projects simultaneously, use contexts. This way, you can set the scope for individual fetching calls or globally for your session.

Parameters

NameTypeDefaultDescription
projectstr, optionalNoneName of a project in the form workspace-name/project-name. If None, the value of the NEPTUNE_PROJECT environment variable is used.
api_tokenstr, optionalNoneYour Neptune API token or a service account's API token. If None, the value of the NEPTUNE_API_TOKEN environment variable is used.

Methods

MethodDescription
get_context()Returns the currently set global context.
set_context()Sets a global context based on environment variables.
set_api_token()Sets a new API token globally.
set_project()Sets a new project globally.
with_api_token()Copies the context and overwrites the api_token field with the provided token.
with_project()Copies the context and overwrites the project field with the provided project.