repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/recharts/cartesian.py
reflex/components/recharts/cartesian.py
"""Cartesian charts in Recharts.""" from __future__ import annotations from collections.abc import Sequence from typing import Any, ClassVar, TypedDict from reflex.constants import EventTriggers from reflex.constants.colors import Color from reflex.event import EventHandler, no_args_event_spec from reflex.vars.base ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
true
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/recharts/recharts.py
reflex/components/recharts/recharts.py
"""A component that wraps a recharts lib.""" from typing import Any, Literal from reflex.components.component import Component, MemoizationLeaf, NoSSRComponent class Recharts(Component): """A component that wraps a recharts lib.""" library = "recharts@3.6.0" def _get_style(self) -> dict: retur...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/recharts/polar.py
reflex/components/recharts/polar.py
"""Polar charts in Recharts.""" from __future__ import annotations from collections.abc import Sequence from typing import Any, ClassVar from reflex.constants import EventTriggers from reflex.constants.colors import Color from reflex.event import EventHandler, no_args_event_spec from reflex.vars.base import LiteralV...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/recharts/general.py
reflex/components/recharts/general.py
"""General components for Recharts.""" from __future__ import annotations from collections.abc import Sequence from typing import Any, ClassVar from reflex.components.component import MemoizationLeaf from reflex.constants.colors import Color from reflex.event import EventHandler, no_args_event_spec from reflex.vars....
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/recharts/charts.py
reflex/components/recharts/charts.py
"""A module that defines the chart components in Recharts.""" from __future__ import annotations from collections.abc import Sequence from typing import Any, ClassVar from reflex.components.component import Component from reflex.components.recharts.general import ResponsiveContainer from reflex.constants import Even...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/recharts/__init__.py
reflex/components/recharts/__init__.py
"""Recharts components.""" from __future__ import annotations from reflex.utils import lazy_loader _SUBMOD_ATTRS: dict = { "cartesian": [ "area", "Area", "bar", "Bar", "line", "Line", "scatter", "Scatter", "x_axis", "XAxis", ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/react_router/dom.py
reflex/components/react_router/dom.py
"""Components for client side navigation within React Router applications.""" from __future__ import annotations from typing import ClassVar, Literal, TypedDict from reflex.components.el.elements.inline import A from reflex.vars.base import Var LiteralLinkDiscover = Literal["none", "render"] class To(TypedDict): ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/react_router/__init__.py
reflex/components/react_router/__init__.py
"""React-router internal components.""" from .dom import ReactRouterLink link = ReactRouterLink.create
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/react_player/audio.py
reflex/components/react_player/audio.py
"""A audio component.""" from reflex.components.react_player.react_player import ReactPlayer class Audio(ReactPlayer): """Audio component share with Video component."""
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/react_player/__init__.py
reflex/components/react_player/__init__.py
"""React Player component for audio and video.""" from . import react_player from .audio import Audio from .video import Video audio = Audio.create video = Video.create
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/react_player/video.py
reflex/components/react_player/video.py
"""A video component.""" from reflex.components.react_player.react_player import ReactPlayer class Video(ReactPlayer): """Video component share with audio component."""
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/react_player/react_player.py
reflex/components/react_player/react_player.py
"""React-Player component.""" from __future__ import annotations from typing import Any, TypedDict from reflex.components.component import Component from reflex.components.core.cond import cond from reflex.event import EventHandler, no_args_event_spec from reflex.utils import console from reflex.vars.base import Var...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/markdown/markdown.py
reflex/components/markdown/markdown.py
"""Markdown component.""" from __future__ import annotations import dataclasses import textwrap from collections.abc import Callable, Sequence from functools import lru_cache from hashlib import md5 from typing import Any from reflex.components.component import BaseComponent, Component, CustomComponent, field from r...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/components/markdown/__init__.py
reflex/components/markdown/__init__.py
"""Markdown components.""" from .markdown import Markdown markdown = Markdown.create
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/format.py
reflex/utils/format.py
"""Formatting operations.""" from __future__ import annotations import inspect import json import os import re from typing import TYPE_CHECKING, Any from reflex import constants from reflex.constants.state import FRONTEND_EVENT_STATE from reflex.utils import exceptions if TYPE_CHECKING: from reflex.components.c...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/path_ops.py
reflex/utils/path_ops.py
"""Path operations.""" from __future__ import annotations import json import os import re import shutil import stat from pathlib import Path from reflex.config import get_config from reflex.environment import environment # Shorthand for join. join = os.linesep.join def chmod_rm(path: Path): """Remove a file o...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/monitoring.py
reflex/utils/monitoring.py
"""PyLeak integration for monitoring event loop blocking and resource leaks in Reflex applications.""" import contextlib import functools import inspect import threading from collections.abc import AsyncGenerator, Awaitable, Callable, Generator from typing import TypeVar, overload from reflex.config import get_config...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/telemetry.py
reflex/utils/telemetry.py
"""Anonymous telemetry for Reflex.""" import asyncio import dataclasses import importlib.metadata import json import multiprocessing import platform import warnings from contextlib import suppress from datetime import datetime, timezone from typing import TypedDict from reflex import constants from reflex.environment...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/rename.py
reflex/utils/rename.py
"""This module provides utilities for renaming directories and files in a Reflex app.""" import re import sys from pathlib import Path from reflex import constants from reflex.config import get_config from reflex.utils import console from reflex.utils.misc import get_module_path def rename_path_up_tree(full_path: s...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/tasks.py
reflex/utils/tasks.py
"""Helpers for managing asyncio tasks.""" import asyncio import time from collections.abc import Callable, Coroutine from typing import Any from reflex.utils import console async def _run_forever( coro_function: Callable[..., Coroutine], *args: Any, suppress_exceptions: list[type[BaseException]], ex...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/frontend_skeleton.py
reflex/utils/frontend_skeleton.py
"""This module provides utility functions to initialize the frontend skeleton.""" import json import random import re from pathlib import Path from reflex import constants from reflex.compiler import templates from reflex.config import Config, get_config from reflex.environment import environment from reflex.utils im...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/js_runtimes.py
reflex/utils/js_runtimes.py
"""This module provides utilities for managing JavaScript runtimes like Node.js and Bun.""" import functools import os import tempfile from collections.abc import Sequence from pathlib import Path from packaging import version from reflex import constants from reflex.config import Config, get_config from reflex.envi...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/registry.py
reflex/utils/registry.py
"""Utilities for working with registries.""" from pathlib import Path from reflex.environment import environment from reflex.utils import console, net from reflex.utils.decorator import cache_result_in_disk, once def latency(registry: str) -> int: """Get the latency of a registry. Args: registry (s...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/pyi_generator.py
reflex/utils/pyi_generator.py
"""The pyi generator module.""" from __future__ import annotations import ast import contextlib import importlib import inspect import json import logging import re import subprocess import sys import typing from collections.abc import Callable, Iterable, Sequence from hashlib import md5 from inspect import getfullar...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
true
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/export.py
reflex/utils/export.py
"""Export utilities.""" from pathlib import Path from reflex import constants from reflex.config import get_config from reflex.environment import environment from reflex.utils import build, console, exec, prerequisites, telemetry def export( zipping: bool = True, frontend: bool = True, backend: bool = T...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/build.py
reflex/utils/build.py
"""Building the app and initializing all prerequisites.""" from __future__ import annotations import os import zipfile from pathlib import Path, PosixPath from rich.progress import MofNCompleteColumn, Progress, TimeElapsedColumn from reflex import constants from reflex.config import get_config from reflex.utils imp...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/prerequisites.py
reflex/utils/prerequisites.py
"""Everything related to fetching or initializing build prerequisites.""" from __future__ import annotations import contextlib import importlib import importlib.metadata import inspect import json import random import re import sys import typing from datetime import datetime from os import getcwd from pathlib import ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/compat.py
reflex/utils/compat.py
"""Compatibility hacks and helpers.""" import sys from collections.abc import Mapping from importlib.util import find_spec from typing import TYPE_CHECKING, Any if TYPE_CHECKING: from pydantic.fields import FieldInfo async def windows_hot_reload_lifespan_hack(): """[REF-3164] A hack to fix hot reload on Win...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/serializers.py
reflex/utils/serializers.py
"""Serializers used to convert Var types to JSON strings.""" from __future__ import annotations import contextlib import dataclasses import decimal import functools import inspect import json import warnings from collections.abc import Callable, Mapping, Sequence from datetime import date, datetime, time, timedelta f...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/imports.py
reflex/utils/imports.py
"""Import operations.""" from __future__ import annotations import dataclasses from collections import defaultdict from collections.abc import Mapping, Sequence def merge_parsed_imports( *imports: ImmutableParsedImportDict, ) -> ParsedImportDict: """Merge multiple parsed import dicts together. Args: ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/exceptions.py
reflex/utils/exceptions.py
"""Custom Exceptions.""" from __future__ import annotations from typing import TYPE_CHECKING, Any if TYPE_CHECKING: from reflex.vars import Var class ReflexError(Exception): """Base exception for all Reflex exceptions.""" class ConfigError(ReflexError): """Custom exception for config related errors."...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/console.py
reflex/utils/console.py
"""Functions to communicate to the user via console.""" from __future__ import annotations import contextlib import datetime import inspect import os import shutil import sys import time from pathlib import Path from types import FrameType from rich.console import Console from rich.progress import MofNCompleteColumn...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/templates.py
reflex/utils/templates.py
"""This module provides utilities for managing Reflex app templates.""" import dataclasses import shutil import tempfile import zipfile from pathlib import Path from urllib.parse import urlparse from reflex import constants from reflex.config import get_config from reflex.utils import console, net, path_ops, redir ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/codespaces.py
reflex/utils/codespaces.py
"""Utilities for working with Github Codespaces.""" from __future__ import annotations import os from starlette.requests import Request from starlette.responses import HTMLResponse from reflex.components.base.script import Script from reflex.components.component import Component from reflex.components.core.banner i...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/net.py
reflex/utils/net.py
"""Helpers for downloading files from the network.""" import functools import time from collections.abc import Callable from typing import ParamSpec, TypeVar from reflex.utils.decorator import once from reflex.utils.types import Unset from . import console def _httpx_verify_kwarg() -> bool: """Get the value of...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/misc.py
reflex/utils/misc.py
"""Miscellaneous functions for the experimental package.""" import asyncio import contextlib import inspect import sys import threading from collections.abc import Callable from pathlib import Path from typing import Any def get_module_path(module_name: str) -> Path | None: """Check if a module exists and return...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/__init__.py
reflex/utils/__init__.py
"""Reflex utilities."""
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/types.py
reflex/utils/types.py
"""Contains custom types and methods to check types.""" from __future__ import annotations import dataclasses import sys import types from collections.abc import Callable, Iterable, Mapping, Sequence from enum import Enum from functools import cached_property, lru_cache from importlib.util import find_spec from types...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
true
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/decorator.py
reflex/utils/decorator.py
"""Decorator utilities.""" import functools from collections.abc import Callable from pathlib import Path from typing import ParamSpec, TypeVar, cast T = TypeVar("T") def once(f: Callable[[], T]) -> Callable[[], T]: """A decorator that calls the function once and caches the result. Args: f: The fun...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/token_manager.py
reflex/utils/token_manager.py
"""Token manager for handling client token to session ID mappings.""" from __future__ import annotations import asyncio import dataclasses import pickle import uuid from abc import ABC, abstractmethod from collections.abc import AsyncIterator, Callable, Coroutine from types import MappingProxyType from typing import ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/exec.py
reflex/utils/exec.py
"""Everything regarding execution of the built app.""" from __future__ import annotations import hashlib import importlib.util import json import os import platform import re import subprocess import sys from collections.abc import Sequence from pathlib import Path from typing import Any, NamedTuple, TypedDict from u...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/redir.py
reflex/utils/redir.py
"""Utilities to handle redirection to browser UI.""" from typing import TYPE_CHECKING if TYPE_CHECKING: from urllib.parse import SplitResult def open_browser(target_url: "SplitResult") -> None: """Open a browser window to target_url. Args: target_url: The URL to open in the browser. """ ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/processes.py
reflex/utils/processes.py
"""Process operations.""" from __future__ import annotations import collections import contextlib import os import signal import socket import subprocess import sys from collections.abc import Callable, Generator, Sequence from concurrent import futures from contextlib import closing from pathlib import Path from typ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/utils/lazy_loader.py
reflex/utils/lazy_loader.py
"""Module to implement lazy loading in reflex. BSD 3-Clause License Copyright (c) 2022--2023, Scientific Python project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source co...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/plugins/tailwind_v4.py
reflex/plugins/tailwind_v4.py
"""Base class for all plugins.""" import dataclasses from pathlib import Path from types import SimpleNamespace from reflex.constants.base import Dirs from reflex.constants.compiler import Ext, PageNames from reflex.plugins.shared_tailwind import ( TailwindConfig, TailwindPlugin, tailwind_config_js_templa...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/plugins/sitemap.py
reflex/plugins/sitemap.py
"""Sitemap plugin for Reflex.""" import datetime from collections.abc import Sequence from pathlib import Path from types import SimpleNamespace from typing import TYPE_CHECKING, Literal, TypedDict from xml.etree.ElementTree import Element, SubElement, indent, tostring from typing_extensions import NotRequired from ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/plugins/_screenshot.py
reflex/plugins/_screenshot.py
"""Plugin to enable screenshot functionality.""" from typing import TYPE_CHECKING from reflex.plugins.base import Plugin as BasePlugin if TYPE_CHECKING: from starlette.requests import Request from starlette.responses import Response from typing_extensions import Unpack from reflex.app import App ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/plugins/tailwind_v3.py
reflex/plugins/tailwind_v3.py
"""Base class for all plugins.""" import dataclasses from pathlib import Path from types import SimpleNamespace from reflex.constants.base import Dirs from reflex.constants.compiler import Ext, PageNames from reflex.plugins.shared_tailwind import ( TailwindConfig, TailwindPlugin, tailwind_config_js_templa...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/plugins/__init__.py
reflex/plugins/__init__.py
"""Reflex Plugin System.""" from ._screenshot import ScreenshotPlugin as _ScreenshotPlugin from .base import CommonContext, Plugin, PreCompileContext from .sitemap import SitemapPlugin from .tailwind_v3 import TailwindV3Plugin from .tailwind_v4 import TailwindV4Plugin __all__ = [ "CommonContext", "Plugin", ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/plugins/base.py
reflex/plugins/base.py
"""Base class for all plugins.""" from collections.abc import Callable, Sequence from pathlib import Path from typing import TYPE_CHECKING, ParamSpec, Protocol, TypedDict from typing_extensions import Unpack if TYPE_CHECKING: from reflex.app import App, UnevaluatedPage class CommonContext(TypedDict): """Co...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/plugins/shared_tailwind.py
reflex/plugins/shared_tailwind.py
"""Tailwind CSS configuration types for Reflex plugins.""" import dataclasses from collections.abc import Mapping from copy import deepcopy from typing import Any, Literal, TypedDict from typing_extensions import NotRequired, Unpack from .base import Plugin as PluginBase TailwindPluginImport = TypedDict( "Tailw...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/custom_components/custom_components.py
reflex/custom_components/custom_components.py
"""CLI for creating custom components.""" from __future__ import annotations import os import re import subprocess import sys from collections import namedtuple from contextlib import contextmanager from pathlib import Path from typing import Any import click from reflex import constants from reflex.constants impor...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/custom_components/__init__.py
reflex/custom_components/__init__.py
"""The Reflex custom components."""
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/istate/wrappers.py
reflex/istate/wrappers.py
"""Wrappers for the state manager.""" from typing import Any from reflex.istate.proxy import ReadOnlyStateProxy from reflex.state import _split_substate_key, _substate_key, get_state_manager async def get_state(token: str, state_cls: Any | None = None) -> ReadOnlyStateProxy: """Get the instance of a state for a...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/istate/storage.py
reflex/istate/storage.py
"""Client-side storage classes for reflex state variables.""" from __future__ import annotations from typing import Any from reflex.utils import format class ClientStorageBase: """Base class for client-side storage.""" def options(self) -> dict[str, Any]: """Get the options for the storage. ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/istate/dynamic.py
reflex/istate/dynamic.py
"""A container for dynamically generated states.""" # This page intentionally left blank.
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/istate/shared.py
reflex/istate/shared.py
"""Base classes for shared / linked states.""" import asyncio import contextlib from collections.abc import AsyncIterator from typing import Self, TypeVar from reflex.constants import ROUTER_DATA from reflex.event import Event, get_hydrate_event from reflex.state import BaseState, State, _override_base_method, _subst...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/istate/__init__.py
reflex/istate/__init__.py
"""This module will provide interfaces for the state.""" import pickle import sys from collections.abc import Callable from typing import Any # Errors caught during pickling of state HANDLED_PICKLE_ERRORS = ( pickle.PicklingError, AttributeError, IndexError, TypeError, ValueError, ) def _is_pick...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/istate/proxy.py
reflex/istate/proxy.py
"""A module to hold state proxy classes.""" from __future__ import annotations import asyncio import copy import dataclasses import functools import inspect import json from collections.abc import Callable, Sequence from importlib.util import find_spec from types import MethodType from typing import TYPE_CHECKING, An...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/istate/data.py
reflex/istate/data.py
"""This module contains the dataclasses representing the router object.""" import dataclasses from collections.abc import Mapping from types import MappingProxyType from typing import TYPE_CHECKING from urllib.parse import _NetlocResultMixinStr, parse_qsl, urlsplit from reflex import constants from reflex.utils impor...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/istate/manager/memory.py
reflex/istate/manager/memory.py
"""A state manager that stores states in memory.""" import asyncio import contextlib import dataclasses from collections.abc import AsyncIterator from typing_extensions import Unpack, override from reflex.istate.manager import StateManager, StateModificationContext from reflex.state import BaseState, _split_substate...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/istate/manager/disk.py
reflex/istate/manager/disk.py
"""A state manager that stores states on disk.""" import asyncio import contextlib import dataclasses import functools import time from collections.abc import AsyncIterator from hashlib import md5 from pathlib import Path from typing_extensions import Unpack, override from reflex.environment import environment from ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/istate/manager/redis.py
reflex/istate/manager/redis.py
"""A state manager that stores states in redis.""" import asyncio import contextlib import dataclasses import inspect import os import sys import time import uuid from collections.abc import AsyncIterator from typing import TypedDict from redis import ResponseError from redis.asyncio import Redis from typing_extensio...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
true
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/istate/manager/__init__.py
reflex/istate/manager/__init__.py
"""State manager for managing client states.""" import contextlib import dataclasses from abc import ABC, abstractmethod from collections.abc import AsyncIterator from typing import TypedDict from typing_extensions import ReadOnly, Unpack from reflex import constants from reflex.config import get_config from reflex....
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/experimental/client_state.py
reflex/experimental/client_state.py
"""Handle client side state with `useState`.""" from __future__ import annotations import dataclasses import re from collections.abc import Callable from typing import Any from reflex import constants from reflex.event import EventChain, EventHandler, EventSpec, run_script from reflex.utils.imports import ImportVar ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/experimental/__init__.py
reflex/experimental/__init__.py
"""Namespace for experimental features.""" from types import SimpleNamespace from reflex.components.datadisplay.shiki_code_block import code_block as code_block from reflex.utils.console import warn from reflex.utils.misc import run_in_thread from . import hooks as hooks from .client_state import ClientStateVar as C...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/experimental/hooks.py
reflex/experimental/hooks.py
"""Add standard Hooks wrapper for React.""" from __future__ import annotations from reflex.utils.imports import ImportVar from reflex.vars import VarData from reflex.vars.base import Var def _compose_react_imports(tags: list[str]) -> dict[str, list[ImportVar]]: return {"react": [ImportVar(tag=tag) for tag in ta...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/constants/event.py
reflex/constants/event.py
"""Event-related constants.""" from enum import Enum from types import SimpleNamespace class Endpoint(Enum): """Endpoints for the reflex backend API.""" PING = "ping" EVENT = "_event" UPLOAD = "_upload" AUTH_CODESPACE = "auth-codespace" HEALTH = "_health" ALL_ROUTES = "_all_routes" ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/constants/state.py
reflex/constants/state.py
"""State-related constants.""" from enum import Enum class StateManagerMode(str, Enum): """State manager constants.""" DISK = "disk" MEMORY = "memory" REDIS = "redis" # Used for things like console_log, etc. FRONTEND_EVENT_STATE = "__reflex_internal_frontend_event_state" FIELD_MARKER = "_rx_state...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/constants/route.py
reflex/constants/route.py
"""Route constants.""" import re from types import SimpleNamespace class RouteArgType(SimpleNamespace): """Type of dynamic route arg extracted from URI route.""" SINGLE = "arg_single" LIST = "arg_list" # the name of the backend var containing path and client information ROUTER = "router" ROUTER_DATA =...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/constants/custom_components.py
reflex/constants/custom_components.py
"""Constants for the custom components.""" from __future__ import annotations from pathlib import Path from types import SimpleNamespace class CustomComponents(SimpleNamespace): """Constants for the custom components.""" # The name of the custom components source directory. SRC_DIR = Path("custom_compo...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/constants/utils.py
reflex/constants/utils.py
"""Utility functions for constants.""" from collections.abc import Callable from typing import Any, Generic, TypeVar T = TypeVar("T") V = TypeVar("V") class classproperty(Generic[T, V]): """A class property decorator.""" def __init__(self, getter: Callable[[type[T]], V]) -> None: """Initialize the ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/constants/config.py
reflex/constants/config.py
"""Config constants.""" from pathlib import Path from types import SimpleNamespace from reflex.constants.base import Dirs, Reflex from .compiler import Ext # Alembic migrations ALEMBIC_CONFIG = "alembic.ini" class Config(SimpleNamespace): """Config constants.""" # The name of the reflex config module. ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/constants/compiler.py
reflex/constants/compiler.py
"""Compiler variables.""" import dataclasses import enum from enum import Enum from types import SimpleNamespace from reflex.constants import Dirs from reflex.utils.imports import ImportVar # The prefix used to create setters for state vars. SETTER_PREFIX = "set_" # The file used to specify no compilation. NOCOMPIL...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/constants/__init__.py
reflex/constants/__init__.py
"""The constants package.""" from .base import ( APP_HARNESS_FLAG, COOKIES, IS_LINUX, IS_MACOS, 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, ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/constants/base.py
reflex/constants/base.py
"""Base file for constants that don't fit any other categories.""" from __future__ import annotations import platform from enum import Enum from importlib import metadata from pathlib import Path from types import SimpleNamespace from typing import Literal from platformdirs import PlatformDirs IS_WINDOWS = platform...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/constants/installer.py
reflex/constants/installer.py
"""File for constants related to the installation process. (Bun/Node).""" from __future__ import annotations import os from types import SimpleNamespace from .base import IS_WINDOWS from .utils import classproperty # Bun config. class Bun(SimpleNamespace): """Bun constants.""" # The Bun version. VERSI...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/constants/colors.py
reflex/constants/colors.py
"""The colors used in Reflex are a wrapper around https://www.radix-ui.com/colors.""" from __future__ import annotations from dataclasses import dataclass from typing import TYPE_CHECKING, Literal, get_args if TYPE_CHECKING: from reflex.vars import Var ColorType = Literal[ "gray", "mauve", "slate", ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/vars/sequence.py
reflex/vars/sequence.py
"""Collection of string classes and utilities.""" from __future__ import annotations import collections.abc import dataclasses import decimal import inspect import json import re from collections.abc import Iterable, Mapping, Sequence from typing import TYPE_CHECKING, Any, Literal, TypeVar, get_args, overload from t...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
true
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/vars/datetime.py
reflex/vars/datetime.py
"""Immutable datetime and date vars.""" from __future__ import annotations import dataclasses from datetime import date, datetime from typing import Any, TypeVar from reflex.utils.exceptions import VarTypeError from reflex.vars.number import BooleanVar from .base import ( CustomVarOperationReturn, LiteralVa...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/vars/number.py
reflex/vars/number.py
"""Immutable number vars.""" from __future__ import annotations import dataclasses import decimal import json import math from collections.abc import Callable from typing import TYPE_CHECKING, Any, NoReturn, TypeVar, overload from typing_extensions import TypeVar as TypeVarExt from reflex.constants.base import Dirs...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/vars/function.py
reflex/vars/function.py
"""Immutable function vars.""" from __future__ import annotations import dataclasses from collections.abc import Callable, Sequence from typing import Any, Concatenate, Generic, ParamSpec, Protocol, TypeVar, overload from reflex.utils import format from reflex.utils.types import GenericType from .base import Cached...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/vars/object.py
reflex/vars/object.py
"""Classes for immutable object vars.""" from __future__ import annotations import collections.abc import dataclasses import typing from collections.abc import Mapping from importlib.util import find_spec from typing import ( Any, NoReturn, TypeVar, get_args, get_type_hints, is_typeddict, ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/vars/__init__.py
reflex/vars/__init__.py
"""Immutable-Based Var System.""" from .base import ( BaseStateMeta, EvenMoreBasicBaseState, Field, LiteralVar, Var, VarData, field, get_unique_variable_name, get_uuid_string_var, var_operation, var_operation_return, ) from .color import ColorVar, LiteralColorVar from .datet...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/vars/color.py
reflex/vars/color.py
"""Vars for colors.""" import dataclasses from reflex.constants.colors import Color from reflex.vars.base import ( CachedVarOperation, LiteralVar, Var, VarData, cached_property_no_lock, get_python_literal, ) from reflex.vars.number import ternary_operation from reflex.vars.sequence import Conc...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/vars/base.py
reflex/vars/base.py
"""Collection of base classes.""" from __future__ import annotations import contextlib import copy import dataclasses import datetime import functools import inspect import json import re import string import uuid import warnings from abc import ABCMeta from collections.abc import Callable, Coroutine, Iterable, Mappi...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
true
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/vars/dep_tracking.py
reflex/vars/dep_tracking.py
"""Collection of base classes.""" from __future__ import annotations import contextlib import dataclasses import dis import enum import importlib import inspect import sys from types import CellType, CodeType, FunctionType, ModuleType from typing import TYPE_CHECKING, Any, ClassVar, cast from reflex.utils.exceptions...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/compiler/templates.py
reflex/compiler/templates.py
"""Templates to use in the reflex compiler.""" from __future__ import annotations import json from collections.abc import Iterable, Mapping from typing import TYPE_CHECKING, Any, Literal from reflex import constants from reflex.constants import Hooks from reflex.constants.state import CAMEL_CASE_MEMO_MARKER from ref...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/compiler/utils.py
reflex/compiler/utils.py
"""Common utility functions used in the compiler.""" from __future__ import annotations import asyncio import concurrent.futures import operator import traceback from collections.abc import Mapping, Sequence from datetime import datetime from pathlib import Path from typing import Any, TypedDict from urllib.parse imp...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/compiler/compiler.py
reflex/compiler/compiler.py
"""Compiler for the reflex apps.""" from __future__ import annotations import sys from collections.abc import Callable, Iterable, Sequence from inspect import getmodule from pathlib import Path from typing import TYPE_CHECKING, Any from reflex import constants from reflex.compiler import templates, utils from reflex...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/reflex/compiler/__init__.py
reflex/compiler/__init__.py
"""The Reflex compiler."""
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/tests/test_node_version.py
tests/test_node_version.py
"""Test for latest node version being able to run reflex.""" from __future__ import annotations from collections.abc import Generator from typing import Any import httpx import pytest from playwright.sync_api import Page, expect from reflex.testing import AppHarness def TestNodeVersionApp(): """A test app for...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/tests/__init__.py
tests/__init__.py
"""Root directory for tests.""" import os from reflex import constants
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/tests/benchmarks/fixtures.py
tests/benchmarks/fixtures.py
from dataclasses import dataclass from typing import cast import pytest from pydantic import BaseModel import reflex as rx class SideBarState(rx.State): """State for the side bar.""" current_page: rx.Field[str] = rx.field("/") @dataclass(frozen=True) class SideBarPage: """A page in the side bar.""" ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/tests/benchmarks/conftest.py
tests/benchmarks/conftest.py
from .fixtures import evaluated_page, unevaluated_page __all__ = ["evaluated_page", "unevaluated_page"]
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/tests/benchmarks/test_compilation.py
tests/benchmarks/test_compilation.py
from pytest_codspeed import BenchmarkFixture from reflex.compiler.compiler import _compile_page, _compile_stateful_components from reflex.components.component import Component def import_templates(): # Importing the templates module to avoid the import time in the benchmark import reflex.compiler.templates ...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/tests/benchmarks/__init__.py
tests/benchmarks/__init__.py
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/tests/benchmarks/test_evaluate.py
tests/benchmarks/test_evaluate.py
from collections.abc import Callable from pytest_codspeed import BenchmarkFixture from reflex.components.component import Component def test_evaluate_page( unevaluated_page: Callable[[], Component], benchmark: BenchmarkFixture ): benchmark(unevaluated_page)
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/tests/integration/test_event_chain.py
tests/integration/test_event_chain.py
"""Ensure that Event Chains are properly queued and handled between frontend and backend.""" from __future__ import annotations import os from collections.abc import Generator import pytest from selenium.webdriver.common.by import By from reflex.testing import AppHarness, WebDriver MANY_EVENTS = 50 def EventChai...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false
reflex-dev/reflex
https://github.com/reflex-dev/reflex/blob/5b3aa272183504eae277ef61f72c162d72a290a5/tests/integration/test_connection_banner.py
tests/integration/test_connection_banner.py
"""Test case for displaying the connection banner when the websocket drops.""" import pickle from collections.abc import Generator import pytest from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.by import By from reflex import constants from reflex.environment import enviro...
python
Apache-2.0
5b3aa272183504eae277ef61f72c162d72a290a5
2026-01-04T14:43:58.087685Z
false