text stringlengths 0 5.92k |
|---|
# **City**{: .color-primary} Environmental Data
<|layout|columns=1 1 1|
<|{selected_city}|selector|lov={selector_city}|on_change=on_change_city|dropdown|label=City|>
<|{selected_pollutant}|toggle|lov={pollutant_selector}|on_change=update_pollutant_display|>
|>
<br/>
<|layout|columns=1 1 1 1|gap=50px|
<|card|
**Air ... |
if __name__ == "__main__":
# Initialize with custom sector-related values
topic = "Finance"
mood = "financial"
style = "financialexpert"
# Create a GUI page with custom settings
page = """
<|container|
# **Generate**{: .color-primary} Finance Tweets
This mini-app generates Tweets r... |
# **City**{: .color-primary} Crime Statistics
<|layout|columns=1 1 1|
<|{selected_city_crime}|selector|lov={selector_city_crime}|on_change=on_change_city_crime|dropdown|label=City|>
<|{selected_crime_type}|toggle|lov={crime_type_selector}|on_change=update_crime_type_display|>
|>
<br/>
<|layout|columns=1 1 1 1|gap=5... |
<|layout|columns=2 9|gap=50px|
<sidebar|sidebar|
**Yield Forecast** Configuration
<|{selected_yield_forecast}|yield_forecast_selector|>
|sidebar>
<yield_forecast|part|render={selected_yield_forecast}|
# **Crop Yield Prediction**{: .color-primary} page
<|1 1|layout|
<date|
#### Forecast **Start Date**{: .color-primar... |
<|layout|columns=1 1|
<|part|class_name=card|
### Select Sales Period<br/>
<|{sales_period_selected}|selector|lov=period_last_month;period_last_quarter;period_last_year|dropdown|on_change=on_sales_period_change|>
|>
<|part|class_name=card|
### Select Product Category<br/>
<|{product_category_selected}|selector|lov=cat... |
#!/usr/bin/env python """The setup script.""" import json import os from setuptools import find_namespace_packages, find_packages, setup with open("README.md") as readme_file: readme = readme_file.read() with open(f"src{os.sep}taipy{os.sep}core{os.sep}version.json") as version_file: version = js... |
"""Unit test package for taipy.""" |
import pytest from src.taipy.core import Core from src.taipy.core._orchestrator._dispatcher import _DevelopmentJobDispatcher, _StandaloneJobDispatcher from src.taipy.core._orchestrator._orchestrator import _Orchestrator from src.taipy.core._orchestrator._orchestrator_factory import _OrchestratorFactory from src.... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
import json import os from datetime import datetime, timedelta import pytest from src.taipy.core._repository._decoder import _Decoder from src.taipy.core._repository._encoder import _Encoder @pytest.fixture(scope="function", autouse=True) def create_and_delete_json_file(): test_json_file = { ... |
import src.taipy.core.taipy as tp from src.taipy.core.config import Config def test_no_special_characters(): scenario_config = Config.configure_scenario("scenario_1") scenario = tp.create_scenario(scenario_config, name="martin") assert scenario.name == "martin" scenarios = tp.get_scenarios()... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
import json import os import pathlib import shutil import pytest from src.taipy.core.exceptions.exceptions import InvalidExportPath from taipy.config.config import Config from .mocks import MockConverter, MockFSRepository, MockModel, MockObj, MockSQLRepository class TestRepositoriesStorage: @pyte... |
import dataclasses import pathlib from dataclasses import dataclass from typing import Any, Dict, Optional from sqlalchemy import Column, String, Table from sqlalchemy.dialects import sqlite from sqlalchemy.orm import declarative_base, registry from sqlalchemy.schema import CreateTable from src.taipy.core._... |
import pytest from taipy.config.config import Config def test_job_config(): assert Config.job_config.mode == "development" job_c = Config.configure_job_executions(mode="standalone", max_nb_of_workers=2) assert job_c.mode == "standalone" assert job_c.max_nb_of_workers == 2 assert Con... |
from taipy.config.config import Config def migrate_pickle_path(dn): dn.path = "s1.pkl" def migrate_skippable(task): task.skippable = True def test_migration_config(): assert Config.migration_functions.migration_fcts == {} data_nodes1 = Config.configure_data_node("data_nodes1", "pick... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
from unittest.mock import patch import pytest from src.taipy.core._init_version import _read_version from src.taipy.core.config.core_section import CoreSection from src.taipy.core.exceptions import ConfigCoreVersionMismatched from taipy.config.config import Config from tests.core.utils.named_temporary_file im... |
from datetime import timedelta from taipy.config import Config from taipy.config.common.scope import Scope class TestConfig: def test_configure_csv_data_node(self): a, b, c, d, e, f = "foo", "path", True, "numpy", Scope.SCENARIO, timedelta(1) Config.configure_csv_data_node(a, b, c, d, e,... |
from unittest.mock import patch from src.taipy.core import Core from src.taipy.core._version._version_manager_factory import _VersionManagerFactory from taipy.config import Config from tests.core.utils.named_temporary_file import NamedTemporaryFile def test_core_section(): with patch("sys.argv", ["prog"... |
from unittest.mock import patch import pytest from src.taipy.core import Core from src.taipy.core._version._version_manager import _VersionManager from src.taipy.core.config import MigrationConfig from taipy.config.config import Config def mock_func(): pass def test_check_if_entity_property_key_... |
import pytest from taipy.config.checker.issue_collector import IssueCollector from taipy.config.config import Config class TestConfigIdChecker: def test_check_standalone_mode(self, caplog): Config._collector = IssueCollector() Config.check() assert len(Config._collector.errors) ... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
import pytest from src.taipy.core.config.job_config import JobConfig from taipy.config.checker.issue_collector import IssueCollector from taipy.config.config import Config class TestJobConfigChecker: def test_check_standalone_mode(self, caplog): Config._collector = IssueCollector() Conf... |
from src.taipy.core.config.checkers._core_section_checker import _CoreSectionChecker from src.taipy.core.config.core_section import CoreSection from taipy.config import Config from taipy.config.checker.issue_collector import IssueCollector class TestCoreSectionChecker: _CoreSectionChecker._ACCEPTED_REPOS... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
from queue import SimpleQueue from src.taipy.core import taipy as tp from src.taipy.core.notification.core_event_consumer import CoreEventConsumerBase from src.taipy.core.notification.event import Event, EventEntityType, EventOperation from src.taipy.core.notification.notifier import Notifier from taipy.config i... |
from queue import SimpleQueue from src.taipy.core.notification import EventEntityType, EventOperation from src.taipy.core.notification._registration import _Registration from src.taipy.core.notification._topic import _Topic def test_create_registration(): registration_0 = _Registration() assert is... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
import os import pytest from src.taipy.core.cycle._cycle_fs_repository import _CycleFSRepository from src.taipy.core.cycle._cycle_sql_repository import _CycleSQLRepository from src.taipy.core.cycle.cycle import Cycle, CycleId from src.taipy.core.exceptions import ModelNotFound class TestCycleRepositories:... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
import dataclasses import pathlib from dataclasses import dataclass from typing import Any, Dict, Iterable, List, Optional, Union from src.taipy.core._manager._manager import _Manager from src.taipy.core._repository._abstract_converter import _AbstractConverter from src.taipy.core._repository._abstract_reposito... |
class NotifyMock: """ A shared class for testing notification on jobStatus of sequence level and scenario level "entity" can be understood as either "scenario" or "sequence". """ def __init__(self, entity): self.scenario = entity self.nb_called = 0 self.__name__... |
def assert_true_after_time(assertion, msg=None, time=120): from datetime import datetime from time import sleep loops = 0 start = datetime.now() while (datetime.now() - start).seconds < time: sleep(1) # Limit CPU usage try: if assertion(): re... |
import os import tempfile class NamedTemporaryFile: def __init__(self, content=None): with tempfile.NamedTemporaryFile("w", delete=False) as fd: if content: fd.write(content) self.filename = fd.name def read(self): with open(self.filename, "... |
from unittest import mock import pytest from src.taipy.core import taipy from src.taipy.core._entity._labeled import _Labeled from taipy.config import Config, Frequency, Scope class MockOwner: label = "owner_label" def get_label(self): return self.label def test_get_label(): ... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
from src.taipy.core._entity._entity_ids import _EntityIds class TestEntityIds: def test_add_two_entity_ids(self): entity_ids_1 = _EntityIds() entity_ids_2 = _EntityIds() entity_ids_1_address = id(entity_ids_1) entity_ids_1.data_node_ids.update(["data_node_id_1", "data_n... |
import pytest from src.taipy.core.common._utils import _retry_read_entity from taipy.config import Config def test_retry_decorator(mocker): func = mocker.Mock(side_effect=Exception()) @_retry_read_entity((Exception,)) def decorated_func(): func() with pytest.raises(Exception): ... |
from src.taipy.core.common.warn_if_inputs_not_ready import _warn_if_inputs_not_ready from src.taipy.core.data._data_manager_factory import _DataManagerFactory from taipy.config import Config def test_warn_inputs_all_not_ready(caplog): one = Config.configure_data_node("one") two = Config.configure_data_... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
import os import pytest from src.taipy.core.exceptions import ModelNotFound from src.taipy.core.scenario._scenario_fs_repository import _ScenarioFSRepository from src.taipy.core.scenario._scenario_sql_repository import _ScenarioSQLRepository from src.taipy.core.scenario.scenario import Scenario, ScenarioId ... |
from src.taipy.core._version._version import _Version from taipy.config.config import Config def test_create_version(): v = _Version("foo", config=Config.configure_data_node("dn")) assert v.id == "foo" assert v.config is not None |
import os import pytest from src.taipy.core._version._version import _Version from src.taipy.core._version._version_fs_repository import _VersionFSRepository from src.taipy.core._version._version_sql_repository import _VersionSQLRepository from src.taipy.core.exceptions import ModelNotFound class TestVers... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
import pytest from src.taipy.core._version._version import _Version from src.taipy.core._version._version_manager import _VersionManager from taipy.config.config import Config def test_save_and_get_version_entity(tmpdir): _VersionManager._repository.base_path = tmpdir assert len(_VersionManager._get... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
from unittest import mock import pytest from src.taipy.core._orchestrator._dispatcher import _DevelopmentJobDispatcher, _JobDispatcher, _StandaloneJobDispatcher from src.taipy.core._orchestrator._orchestrator import _Orchestrator from src.taipy.core._orchestrator._orchestrator_factory import _OrchestratorFactor... |
import multiprocessing from concurrent.futures import ProcessPoolExecutor from functools import partial from unittest import mock from unittest.mock import MagicMock from pytest import raises from src.taipy.core import DataNodeId, JobId, TaskId from src.taipy.core._orchestrator._dispatcher._development_job_d... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
from src.taipy.core.data import InMemoryDataNode from src.taipy.core.data._data_manager_factory import _DataManagerFactory from src.taipy.core.task._task_model import _TaskModel from taipy.config.common.scope import Scope def test_none_properties_attribute_compatible(): model = _TaskModel.from_dict( ... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
from src.taipy.core.sequence._sequence_converter import _SequenceConverter from src.taipy.core.sequence.sequence import Sequence from src.taipy.core.task.task import Task def test_entity_to_model(sequence): sequence_model_1 = _SequenceConverter._entity_to_model(sequence) expected_sequence_model_1 = { ... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
from src.taipy.core.data.data_node import DataNode from src.taipy.core.data.in_memory import InMemoryDataNode from taipy.config.common.scope import Scope class FakeDataNode(InMemoryDataNode): read_has_been_called = 0 write_has_been_called = 0 def __init__(self, config_id, **kwargs): sco... |
import os import pytest from src.taipy.core.data._data_fs_repository import _DataFSRepository from src.taipy.core.data._data_sql_repository import _DataSQLRepository from src.taipy.core.data.data_node import DataNode, DataNodeId from src.taipy.core.exceptions import ModelNotFound class TestDataNodeReposit... |
import pytest from src.taipy.core.data.data_node_id import DataNodeId from src.taipy.core.data.in_memory import InMemoryDataNode from src.taipy.core.exceptions.exceptions import NoData from taipy.config.common.scope import Scope from taipy.config.exceptions.exceptions import InvalidConfigurationId class Tes... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
from datetime import datetime from time import sleep from src.taipy.core._version._version_manager_factory import _VersionManagerFactory from src.taipy.core.submission._submission_manager_factory import _SubmissionManagerFactory from src.taipy.core.submission.submission import Submission from src.taipy.core.subm... |
from datetime import datetime from time import sleep from src.taipy.core import Task from src.taipy.core._repository.db._sql_connection import _SQLConnection from src.taipy.core._version._version_manager_factory import _VersionManagerFactory from src.taipy.core.submission._submission_manager_factory import _Subm... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
from importlib.util import find_spec if find_spec("taipy"): if find_spec("taipy.config"): from taipy.config._init import * # type: ignore if find_spec("taipy.gui"): from taipy.gui._init import * # type: ignore if find_spec("taipy.core"): from taipy.core._init import * ... |
from ._core import Core from ._entity.submittable import Submittable from .cycle.cycle import Cycle from .cycle.cycle_id import CycleId from .data.data_node import DataNode from .data.data_node_id import DataNodeId from .job.job import Job from .job.job_id import JobId from .job.status import Status from .scen... |
"""# Taipy Core The Taipy Core package is a Python library designed to build powerful, customized, data-driven back-end applications. It provides the tools to help Python developers transform their algorithms into a complete back-end application. More details on the [Taipy Core](../../core/index.md) functionaliti... |
import json import os from pathlib import Path def _read_version(): with open(f"{Path(os.path.abspath(__file__)).parent}{os.sep}version.json") as version_file: version = json.load(version_file) version_string = f'{version.get("major", 0)}.{version.get("minor", 0)}.{version.get("patch", 0)}... |
from multiprocessing import Lock from typing import Optional from taipy.config import Config from taipy.logger._taipy_logger import _TaipyLogger from ._backup._backup import _init_backup_file_with_storage_folder from ._core_cli import _CoreCLI from ._orchestrator._dispatcher._job_dispatcher import _JobDispatc... |
from typing import Dict from taipy._cli._base_cli import _CLI from .config import CoreSection class _CoreCLI: """Command-line interface for Taipy Core application.""" __MODE_ARGS: Dict[str, Dict] = { "--development": { "action": "store_true", "dest": "taipy_deve... |
import json import re from datetime import datetime, timedelta class _Decoder(json.JSONDecoder): def __init__(self, *args, **kwargs): json.JSONDecoder.__init__(self, object_hook=self.object_hook, *args, **kwargs) def _str_to_timedelta(self, timedelta_str: str) -> timedelta: """ ... |
import pathlib from abc import abstractmethod from typing import Any, Dict, Generic, Iterable, List, Optional, TypeVar, Union ModelType = TypeVar("ModelType") Entity = TypeVar("Entity") class _AbstractRepository(Generic[ModelType, Entity]): @abstractmethod def _save(self, entity: Entity): ... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
import json from datetime import datetime, timedelta from enum import Enum from typing import Any class _Encoder(json.JSONEncoder): def _timedelta_to_str(self, obj: timedelta) -> str: total_seconds = obj.total_seconds() return ( f"{int(total_seconds // 86400)}d" ... |
from abc import ABC, abstractmethod class _AbstractConverter(ABC): @classmethod @abstractmethod def _entity_to_model(cls, entity): raise NotImplementedError @classmethod @abstractmethod def _model_to_entity(cls, model): raise NotImplementedError |
import dataclasses import enum import json from typing import Any, Dict from sqlalchemy import Table from ._decoder import _Decoder from ._encoder import _Encoder class _BaseModel: __table__: Table def __iter__(self): for attr, value in self.__dict__.items(): yield attr,... |
import sqlite3 from functools import lru_cache from sqlite3 import Connection from sqlalchemy.dialects import sqlite from sqlalchemy.schema import CreateTable from taipy.config.config import Config from ...exceptions import MissingRequiredProperty def dict_factory(cursor, row): d = {} for idx... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
from sqlalchemy.orm import declarative_base, registry _SQLBaseModel = declarative_base() mapper_registry = registry() |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
import os from taipy.config import Config __BACKUP_FILE_PATH_ENVIRONMENT_VARIABLE_NAME = "TAIPY_BACKUP_FILE_PATH" def _init_backup_file_with_storage_folder(): if preserve_file_path := os.getenv(__BACKUP_FILE_PATH_ENVIRONMENT_VARIABLE_NAME): with open(preserve_file_path, "a") as f: ... |
from taipy.config import _inject_section from taipy.config.checker._checker import _Checker from taipy.config.common.frequency import Frequency # type: ignore from taipy.config.common.scope import Scope # type: ignore from taipy.config.config import Config # type: ignore from taipy.config.global_app.global_app_... |
import collections.abc from copy import deepcopy from typing import Any, Callable, Dict, Optional, Union from taipy.config._config import _Config from taipy.config.common._template_handler import _TemplateHandler as _tpl from taipy.config.config import Config from taipy.config.section import Section from taipy... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
from typing import Set from taipy.config._config import _Config from taipy.config.checker._checkers._config_checker import _ConfigChecker from taipy.config.checker.issue_collector import IssueCollector from ..core_section import CoreSection class _CoreSectionChecker(_ConfigChecker): _ACCEPTED_REPOSI... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
from taipy.config._config import _Config from taipy.config.checker._checkers._config_checker import _ConfigChecker from taipy.config.checker.issue_collector import IssueCollector from ..._version._version_manager_factory import _VersionManagerFactory from ..migration_config import MigrationConfig class _Migr... |
from typing import Dict from taipy.config._config import _Config from taipy.config.checker._checkers._config_checker import _ConfigChecker from taipy.config.checker.issue_collector import IssueCollector from ..data_node_config import DataNodeConfig from ..job_config import JobConfig class _JobConfigChecke... |
from typing import Dict, List from taipy.config._config import _Config from taipy.config.checker._checkers._config_checker import _ConfigChecker from taipy.config.checker.issue_collector import IssueCollector class _ConfigIdChecker(_ConfigChecker): def __init__(self, config: _Config, collector: IssueColl... |
from taipy.config._config import _Config from taipy.config.checker._checkers._config_checker import _ConfigChecker from taipy.config.checker.issue_collector import IssueCollector from ..data_node_config import DataNodeConfig from ..task_config import TaskConfig class _TaskConfigChecker(_ConfigChecker): ... |
from dataclasses import dataclass, field from datetime import datetime from functools import singledispatch from typing import Any, Optional from ..common._repr_enum import _ReprEnum from ..exceptions.exceptions import InvalidEventAttributeName, InvalidEventOperation class EventOperation(_ReprEnum): ""... |
""" Package for notifications about changes on `Core^` service entities. The Core service generates `Event^` objects to track changes on entities. These events are then relayed to a `Notifier^`, which handles the dispatch to consumers interested in specific event topics. To subscribe, a consumer needs to inv... |
from typing import NewType RegistrationId = NewType("RegistrationId", str) RegistrationId.__doc__ = """Registration identifier. It can be used to instantiate a `CoreEventConsumerBase^`.""" |
from queue import SimpleQueue from typing import Optional from uuid import uuid4 from ._topic import _Topic from .event import EventEntityType, EventOperation from .registration_id import RegistrationId class _Registration: _ID_PREFIX = "REGISTRATION" __SEPARATOR = "_" def __init__( ... |
from typing import Optional from ..exceptions.exceptions import InvalidEventOperation from .event import _UNSUBMITTABLE_ENTITY_TYPES, EventEntityType, EventOperation class _Topic: def __init__( self, entity_type: Optional[EventEntityType] = None, entity_id: Optional[str] = None,... |
import abc import threading from queue import Empty, SimpleQueue from .event import Event class CoreEventConsumerBase(threading.Thread): """Abstract base class for implementing a Core event consumer. This class provides a framework for consuming events from a queue in a separate thread. It sh... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.