Python library that check for key value in env and colab userdata. if not found then asks for it using getpass
Project description
Env-colab-pass
Python package that check for key value in env and colab userdata. If key is not found then it will asks for it using getpass
If Colab has key but access is not granted then it will ask for access and use it.
Usage
Install package
pip install env-colab-pass
Import module
from env_colab_pass import passutil
To get the value of a env variable / colab user data / ask user
passutil.get_secret_value(key_name)
Few more examples
## Read env variable
key_name = "TEMP"
value = passutil.get_secret_value(key_name)
print(f"The value for {key_name} is: {value}")
## Read from keylab userdata
key_name = "KEY_FROM_COLAB"
value = passutil.get_secret_value(key_name)
print(f"The value for {key_name} is: {value}")
## ask for value for new key
key_name = "NEW_KEY"
value = passutil.get_secret_value(key_name)
print(f"The value for {key_name} is: {value}")
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file env_colab_pass-0.3.tar.gz.
File metadata
- Download URL: env_colab_pass-0.3.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d99f86bd8808f36183aa7302ac4c176794f4e71e6d114c4b41a35e77f7497d24
|
|
| MD5 |
4c9c23eb55133d9a463e3d57ea9687bc
|
|
| BLAKE2b-256 |
9ea0d740dd69fed8b50633d3eb2f6ea53b970442ed939c4bb89c98c41a373288
|
File details
Details for the file env_colab_pass-0.3-py3-none-any.whl.
File metadata
- Download URL: env_colab_pass-0.3-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d142914ddf1d56d7f83baa3eae33c9615b65d86dab1bfc57654fafa621d0fde
|
|
| MD5 |
8a7a9b04ae0dacc628ea7e83684003cb
|
|
| BLAKE2b-256 |
572676b8d7f03cd088dba71b35c237405469e71abf876b9fa129a2436ca62b49
|