reflex/reflex/constants/config.py
Thomas Brandého 0d39237b3c
upgrade to latest ruff (#3497)
* upgrade to latest ruff

* try to fix dep review

* try to fix dep review (2)

* upgrade black

* upgrade black (2)

* update allowed dependencies

* update allowed dependencies (2)

* update allowed dependencies (3)

* wait between interim and final in yield test

* remove previous commit, increase delay between yield

* forgot to save on the time.sleep(1) removal

* fix integration (maybe?)

* fix pyi?

* what even is going on

* what is realityi?

* test another fix for app harness

* try to wait even longer?

* force uvloop to be optional

* downpin fastapi < 0.111, remove changes to test
2024-06-19 12:32:13 +02:00

63 lines
1.4 KiB
Python

"""Config constants."""
import os
from types import SimpleNamespace
from reflex.constants.base import Dirs, Reflex
from .compiler import Ext
# Alembic migrations
ALEMBIC_CONFIG = os.environ.get("ALEMBIC_CONFIG", "alembic.ini")
class Config(SimpleNamespace):
"""Config constants."""
# The name of the reflex config module.
MODULE = "rxconfig"
# The python config file.
FILE = f"{MODULE}{Ext.PY}"
# The previous config file.
PREVIOUS_FILE = f"pcconfig{Ext.PY}"
class Expiration(SimpleNamespace):
"""Expiration constants."""
# Token expiration time in seconds
TOKEN = 60 * 60
# Maximum time in milliseconds that a state can be locked for exclusive access.
LOCK = 10000
# The PING timeout
PING = 120
class GitIgnore(SimpleNamespace):
"""Gitignore constants."""
# The gitignore file.
FILE = ".gitignore"
# Files to gitignore.
DEFAULTS = {Dirs.WEB, "*.db", "__pycache__/", "*.py[cod]"}
class RequirementsTxt(SimpleNamespace):
"""Requirements.txt constants."""
# The requirements.txt file.
FILE = "requirements.txt"
# The partial text used to form requirement that pins a reflex version
DEFAULTS_STUB = f"{Reflex.MODULE_NAME}=="
class DefaultPorts(SimpleNamespace):
"""Default port constants."""
FRONTEND_PORT = 3000
BACKEND_PORT = 8000
# The deployment URL.
PRODUCTION_BACKEND_URL = "https://{username}-{app_name}.api.pynecone.app"