reflex/reflex/constants/__init__.py
benedikt-bartscher 4a6c16e9dc
More env var cleanup (#4248)
* fix and test bug in config env loading

* streamline env var interpretation with @adhami3310

* improve error messages, fix invalid value for TELEMETRY_ENABLED

* just a small hint

* ruffing

* fix typo from review

* refactor - ruff broke the imports..

* cleanup imports

* more

* add internal and enum env var support

* ruff cleanup

* more global imports

* revert telemetry, it lives in rx.Config

* minor fixes/cleanup

* i missed some refs

* fix darglint

* reload config is internal

* fix EnvVar name

* add test for EnvVar + minor typing improvement

* bool tests

* was this broken?

* retain old behavior

* migrate APP_HARNESS_HEADLESS to new env var system

* migrate more APP_HARNESS env vars to new config system

* migrate SCREENSHOT_DIR to new env var system

* refactor EnvVar.get to be a method

* readd deleted functions and deprecate them

* improve EnvVar api, cleanup RELOAD_CONFIG question

* move is_prod_mode back to where it was
2024-11-05 12:25:13 -08:00

119 lines
1.9 KiB
Python

"""The constants package."""
from .base import (
COOKIES,
IS_WINDOWS,
LOCAL_STORAGE,
POLLING_MAX_HTTP_BUFFER_SIZE,
PYTEST_CURRENT_TEST,
REFLEX_VAR_CLOSING_TAG,
REFLEX_VAR_OPENING_TAG,
SESSION_STORAGE,
ColorMode,
Dirs,
Env,
LogLevel,
Next,
Ping,
Reflex,
ReflexHostingCLI,
Templates,
)
from .compiler import (
NOCOMPILE_FILE,
SETTER_PREFIX,
CompileVars,
ComponentName,
Ext,
Hooks,
Imports,
MemoizationDisposition,
MemoizationMode,
PageNames,
)
from .config import (
ALEMBIC_CONFIG,
Config,
DefaultPorts,
Expiration,
GitIgnore,
RequirementsTxt,
)
from .custom_components import (
CustomComponents,
)
from .event import Endpoint, EventTriggers, SocketEvent
from .installer import (
Bun,
Fnm,
Node,
PackageJson,
)
from .route import (
ROUTE_NOT_FOUND,
ROUTER,
ROUTER_DATA,
ROUTER_DATA_INCLUDE,
DefaultPage,
Page404,
RouteArgType,
RouteRegex,
RouteVar,
)
from .state import StateManagerMode
from .style import Tailwind
__ALL__ = [
ALEMBIC_CONFIG,
Bun,
ColorMode,
Config,
COOKIES,
ComponentName,
CustomComponents,
DefaultPage,
DefaultPorts,
Dirs,
Endpoint,
Env,
EventTriggers,
Expiration,
Ext,
Fnm,
REFLEX_VAR_CLOSING_TAG,
REFLEX_VAR_OPENING_TAG,
GitIgnore,
Hooks,
Imports,
IS_WINDOWS,
LOCAL_STORAGE,
SESSION_STORAGE,
LogLevel,
MemoizationDisposition,
MemoizationMode,
Next,
Node,
NOCOMPILE_FILE,
PackageJson,
PageNames,
Page404,
Ping,
POLLING_MAX_HTTP_BUFFER_SIZE,
PYTEST_CURRENT_TEST,
Reflex,
RequirementsTxt,
RouteArgType,
RouteRegex,
RouteVar,
ROUTER,
ROUTER_DATA,
ROUTER_DATA_INCLUDE,
ROUTE_NOT_FOUND,
SETTER_PREFIX,
SocketEvent,
StateManagerMode,
Tailwind,
Templates,
CompileVars,
]