Skip to main content

github

4 configuration options · available in Rust, Python

Quick start
use opendal::Operator;

let op = Operator::via_iter("github", [
("owner".to_string(), "...".to_string()),
("repo".to_string(), "...".to_string()),
])?;
All configuration options (copy & trim)
Full reference
use opendal::Operator;

let op = Operator::via_iter("github", [
// root of this backend.
//
// All operations will happen under this root.
// ("root".to_string(), "...".to_string()),

// GitHub access_token.
//
// optional.
// If not provided, the backend will only support read operations for public repositories.
// And rate limit will be limited to 60 requests per hour.
// ("token".to_string(), "...".to_string()),

// GitHub repo owner.
//
// required.
("owner".to_string(), "...".to_string()),

// GitHub repo name.
//
// required.
("repo".to_string(), "...".to_string()),

])?;

Every option is passed as a string key; OpenDAL parses it into the right type. Some services may require building the binding with the matching services-* feature enabled.

Configuration reference

General4
KeyTypeRequiredDescription
rootstringnoroot of this backend. All operations will happen under this root.
tokenstringnoGitHub access_token. optional. If not provided, the backend will only support read operations for public repositories. And rate limit will be limited to 60 requests per hour.
ownerstringyesGitHub repo owner. required.
repostringyesGitHub repo name. required.