fsspec_utils.storage_options.git
API Reference¶
GitHubStorageOptions
¶
GitHub repository storage configuration options.
Provides access to files in GitHub repositories with support for: - Public and private repositories - Branch/tag/commit selection - Token-based authentication - Custom GitHub Enterprise instances
Attributes:
protocol
(str
): Always "github" for GitHub storageorg
(str
): Organization or user namerepo
(str
): Repository nameref
(str
): Git reference (branch, tag, or commit SHAtoken
(str
): GitHub personal access tokenapi_url
(str
): Custom GitHub API URL for enterprise instances
Example:
from_env()
¶
Create storage options from environment variables.
Reads standard GitHub environment variables: - GITHUB_ORG: Organization or user name - GITHUB_REPO: Repository name - GITHUB_REF: Git reference - GITHUB_TOKEN: Personal access token - GITHUB_API_URL: Custom API URL
Returns:
GitHubStorageOptions
: Configured storage options
Example:
to_env()
¶
Export options to environment variables.
Sets standard GitHub environment variables.
Example:
to_fsspec_kwargs()
¶
Convert options to fsspec filesystem arguments.
Returns:
dict
: Arguments suitable for GitHubFileSystem
Example:
GitLabStorageOptions
¶
GitLab repository storage configuration options.
Provides access to files in GitLab repositories with support for: - Public and private repositories - Self-hosted GitLab instances - Project ID or name-based access - Branch/tag/commit selection - Token-based authentication
Attributes:
protocol
(str
): Always "gitlab" for GitLab storagebase_url
(str
): GitLab instance URL, defaults to gitlab.comproject_id
(str
|int
): Project ID numberproject_name
(str
): Project name/pathref
(str
): Git reference (branch, tag, or commit SHA)token
(str
): GitLab personal access tokenapi_version
(str
): API version to use
Example:
from_env()
¶
Create storage options from environment variables.
Reads standard GitLab environment variables: - GITLAB_URL: Instance URL - GITLAB_PROJECT_ID: Project ID - GITLAB_PROJECT_NAME: Project name/path - GITLAB_REF: Git reference - GITLAB_TOKEN: Personal access token - GITLAB_API_VERSION: API version
Returns:
GitLabStorageOptions
: Configured storage options
Example:
to_env()
¶
Export options to environment variables.
Sets standard GitLab environment variables.
Example:
to_fsspec_kwargs()
¶
Convert options to fsspec filesystem arguments.
Returns:
dict
: Arguments suitable for GitLabFileSystem
Example: