b2creds

Crates.iob2creds
lib.rsb2creds
version0.2.0
sourcesrc
created_at2021-03-21 08:34:30.677699
updated_at2023-05-29 16:36:56.448094
descriptionLibrary for accessing b2 credentials
homepagehttps://github.com/schultetwin1/b2creds/
repositoryhttps://github.com/schultetwin1/b2creds/
max_upload_size
id371618
size18,776
Matt Schulte (schultetwin1)

documentation

README

b2creds

CI Docs Crates.io

b2creds is a simple library built to access the credentials for BackBlaze APIs. It mimics the access patterns of the b2 CLI tool and thus should work on any machine where a user has logged in with the b2 CLI.

By default, b2creds will search in the following locations:

  1. In the B2_APPLICATION_KEY and B2_APPLICATION_KEY_ID environmentals variables

  2. In the sqlite database pointed to by the environmental variable B2_ACCOUNT_INFO

  3. In the default sqlite database ~/.b2_account_info

let creds = b2creds::Credentials::locate().unwrap();
println!("Key ID: {} Key: {}", creds.application_key_id, creds.application_key);
Commit count: 16

cargo fmt