Skip to content

Environment Variables

Vignesh Rao edited this page Feb 20, 2024 · 3 revisions

Environment variables can be loaded from a .env file. All env vars are validated using pydantic

PyStream supports custom filename to load the env vars.
All environment variables are case insensitive.

How to use a custom filename for environment variables?

PyStream can use any file as source for environment variables.

Example

import asyncio
import os

import pystream

os.environ['env_file'] = "custom.txt"

if __name__ == '__main__':
    asyncio.run(pystream.start())
Clone this wiki locally