Skip to content

Environment and process configuration

For application development, keep environment values in the generated project’s .env and read them from typed files under config/. Start Reactor from that project root so the first environment lookup selects the intended file. Reading and writing environment configuration shows the complete flow.

Keep a .env.example containing the required keys and non-secret examples. Deployment changes to .env require restarting processes or deliberately reloading it; existing service configuration is not automatically rebuilt by an environment edit.

The package-level API is Env plus the env() lookup helper. Both delegate to a process-wide DotEnv singleton. On first use, it resolves .env from the working directory, creates it if absent, loads it into os.environ with file values taking precedence, and caches the file entries for all().

Values may use explicit prefixes such as int:, bool:, list:, path:, or base64:. Unprefixed values still recognize nulls, booleans, and safe Python literals. EnvironmentCaster owns the typed serialization/parsing rules.

  • Python 3.14 or newer.
  • python-dotenv>=1.2.3,<2.0, installed by Orionis.
  • Read/write access to the selected .env file for persistent set, unset, and reload workflows.
  • Uppercase variable names matching [A-Z][A-Z0-9_]*.

Continue with: foundation · encrypter.