Guides
Secrets
Providing secrets to Tensorlake functions
Secrets allow providing sensitive values to your Tensorlake functions in a secure manner without having to put them into your code.
Was this page helpful?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Providing secrets to Tensorlake functions
tl secrets set AWS_ACCESS_KEY=MY_AWS_ACCESS_KEY
tl secrets set OPENAI_API_KEY=MY_OPENAI_API_KEY
@application()
@function(secrets=["AWS_ACCESS_KEY", "OPENAI_API_KEY"])
def my_function() -> str:
aws_access_key = os.environ["AWS_ACCESS_KEY"]
openai_api_key = os.environ["OPENAI_API_KEY"]
...
$ tl secrets list
| Name | Created At |
| ----------- | ---------- |
| SECRET_NAME | Date |
$ tl secrets set <SECRET_NAME>=<SECRET_VALUE> [<SECRET_NAME>=<SECRET_VALUE>]
tl secrets unset <SECRET_NAME> [<SECRET_NAME>]
Was this page helpful?