Set an environ variable in colab/kaggle/dotenv(.env/dotenv/env)
Project description
set-env
Set an environ varibale from colab, kaggle or dotenv (search default .env/dotenv/env)
Intro
colab and kaggle bother provide a way to manage secrets (typically API tokens).
set_env
is mainly for running ipynb (jupyter notebook) files in colab/kaggle or cloud instance when we need to set an environ variable, for example, HF_TOKEN
to download models or datasets from huggingdace hub, other scenarios include WANDB_API_KEY
or NGROK_AUTHCODE
or OPENAI_API_KEY
etc.
When running an ipynb in a cloud instance, we may use dotenv
(pip install python-dotenv
) to set environ varibales based on .env
.
Install
pip install set-env
Use it
from set_env import set_env
# e.g.
set_env("HF_TOKEN")
set_env("WANDB_API_KEY")
set_env("NGROK_AUTHCODE")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for set_env_colab_kaggle_dotenv-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c062699ed390aedad0a12e6f0b5755fa5151ef7780385687f10dd153dab3ff99 |
|
MD5 | 45e107bb9446f243ec02b1dcd4a180ac |
|
BLAKE2b-256 | 200239e478a3bd8202287da7e5d1a1d434465cd19e83e9e2f18219505d04d6e4 |
Hashes for set_env_colab_kaggle_dotenv-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3f45729bc6652acaa2ddf52cecac3e10b160a58fde939e3fa15ac6d36908778 |
|
MD5 | b3f1bf42fef1a2532d5f6cc2e9e1b7fe |
|
BLAKE2b-256 | c50d6e4a07ec906ddea9dcf45480054fd66b5b00fe71703a840d66f0f29eb9b4 |