id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
23,200 | dagster-io/dagster | dagster-io_dagster/examples/project_du_dbt_starter/dagster_university/assets/requests.py | dagster_university.assets.requests.AdhocRequestConfig | import dagster as dg
class AdhocRequestConfig(dg.Config):
filename: str
borough: str
start_date: str
end_date: str |
class AdhocRequestConfig(dg.Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 1 | 0 | 0 |
23,201 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagster-wandb/dagster_wandb/io_manager.py | dagster_wandb.io_manager.ArtifactsIOManager | import pickle
from dagster_wandb.resources import WANDB_CLOUD_HOST
import platform
from dagster_wandb.version import __version__
import shutil
import time
from dagster import Field, InitResourceContext, InputContext, Int, IOManager, MetadataValue, OutputContext, String, io_manager
import datetime
import os
import uuid
... |
class ArtifactsIOManager(IOManager):
'''IO Manager to handle Artifacts in Weights & Biases (W&B) .
It handles 3 different inputs:
- Pickable objects (the serialization module is configurable)
- W&B Objects (Audio, Table, Image, etc)
- W&B Artifacts
'''
def __init__(self, wandb_client, conf... | 12 | 1 | 50 | 6 | 42 | 3 | 8 | 0.09 | 1 | 7 | 2 | 0 | 10 | 10 | 10 | 10 | 518 | 68 | 422 | 90 | 410 | 38 | 253 | 84 | 242 | 28 | 1 | 6 | 78 |
23,202 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagster-wandb/dagster_wandb/io_manager.py | dagster_wandb.io_manager.Config | from typing import Optional, TypedDict
class Config(TypedDict):
dagster_run_id: str
wandb_host: str
wandb_entity: str
wandb_project: str
wandb_run_name: Optional[str]
wandb_run_id: Optional[str]
wandb_run_tags: Optional[list[str]]
base_dir: str
cache_duration_in_minutes: Optional[in... |
class Config(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0 | 10 | 1 | 9 | 0 | 10 | 1 | 9 | 0 | 1 | 0 | 0 |
23,203 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagster-wandb/dagster_wandb/types.py | dagster_wandb.types.SerializationModule | from typing import Any, TypedDict
class SerializationModule(TypedDict, total=False):
"""W&B Artifacts IO Manager configuration of the serialization module. Useful for type checking."""
name: str
parameters: dict[str, Any] |
class SerializationModule(TypedDict, total=False):
'''W&B Artifacts IO Manager configuration of the serialization module. Useful for type checking.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 3 | 1 | 2 | 1 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
23,204 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagster-wandb/dagster_wandb/types.py | dagster_wandb.types.WandbArtifactConfiguration | from typing import Any, TypedDict
class WandbArtifactConfiguration(TypedDict, total=False):
"""W&B Artifacts IO Manager configuration. Useful for type checking."""
name: str
type: str
description: str
aliases: list[str]
add_dirs: list[dict[str, Any]]
add_files: list[dict[str, Any]]
add_... |
class WandbArtifactConfiguration(TypedDict, total=False):
'''W&B Artifacts IO Manager configuration. Useful for type checking.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 1 | 10 | 1 | 9 | 1 | 10 | 1 | 9 | 0 | 1 | 0 | 0 |
23,205 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagster-wandb/dagster_wandb/utils/errors.py | dagster_wandb.utils.errors.WandbArtifactsIOManagerError | class WandbArtifactsIOManagerError(Exception):
"""Represents an execution error of the W&B Artifacts IO Manager."""
def __init__(self, message='A W&B Artifacts IO Manager error occurred.'):
self.message = message
super().__init__(self.message) | class WandbArtifactsIOManagerError(Exception):
'''Represents an execution error of the W&B Artifacts IO Manager.'''
def __init__(self, message='A W&B Artifacts IO Manager error occurred.'):
pass | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 0.25 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 11 | 6 | 1 | 4 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | 3 | 0 | 1 |
23,206 | dagster-io/dagster | dagster-io_dagster/python_modules/dagster-webserver/dagster_webserver/debug.py | dagster_webserver.debug.WebserverDebugWorkspaceProcessContext | from dagster import DagsterInstance
from dagster._core.workspace.context import BaseWorkspaceRequestContext, IWorkspaceProcessContext, WorkspaceRequestContext
from dagster._core.workspace.workspace import CurrentWorkspace
from dagster_webserver.version import __version__
from typing import Any, Optional
class Webserve... |
class WebserverDebugWorkspaceProcessContext(IWorkspaceProcessContext):
'''IWorkspaceProcessContext that works with an ephemeral instance, which is needed
for `dagster-webserver debug` to work (a regular WorkspaceProcessContext will fail when it tries
to call .get_ref() on the instance when spinning up a co... | 11 | 1 | 3 | 0 | 3 | 0 | 1 | 0.14 | 1 | 6 | 3 | 0 | 8 | 1 | 8 | 37 | 41 | 8 | 29 | 15 | 15 | 4 | 17 | 10 | 8 | 1 | 5 | 0 | 8 |
23,207 | dagster-io/dagster | dagster-io_dagster/python_modules/dagster-webserver/dagster_webserver/external_assets.py | dagster_webserver.external_assets.ReportAssetCheckEvalParam | class ReportAssetCheckEvalParam:
"""Class to collect all supported args by report_asset_check endpoint
to ensure consistency with related APIs.
"""
asset_key = 'asset_key'
check_name = 'check_name'
metadata = 'metadata'
severity = 'severity'
passed = 'passed' | class ReportAssetCheckEvalParam:
'''Class to collect all supported args by report_asset_check endpoint
to ensure consistency with related APIs.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 6 | 6 | 5 | 3 | 6 | 6 | 5 | 0 | 0 | 0 | 0 |
23,208 | dagster-io/dagster | dagster-io_dagster/python_modules/dagster-webserver/dagster_webserver/external_assets.py | dagster_webserver.external_assets.ReportAssetMatParam | class ReportAssetMatParam:
"""Class to collect all supported args by report_asset_materialization endpoint
to ensure consistency with related APIs.
"""
asset_key = 'asset_key'
data_version = 'data_version'
metadata = 'metadata'
description = 'description'
partition = 'partition' | class ReportAssetMatParam:
'''Class to collect all supported args by report_asset_materialization endpoint
to ensure consistency with related APIs.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 6 | 6 | 5 | 3 | 6 | 6 | 5 | 0 | 0 | 0 | 0 |
23,209 | dagster-io/dagster | dagster-io_dagster/python_modules/dagster-webserver/dagster_webserver/external_assets.py | dagster_webserver.external_assets.ReportAssetObsParam | class ReportAssetObsParam:
"""Class to collect all supported args by report_asset_observation endpoint
to ensure consistency with related APIs.
"""
asset_key = 'asset_key'
data_version = 'data_version'
metadata = 'metadata'
description = 'description'
partition = 'partition' | class ReportAssetObsParam:
'''Class to collect all supported args by report_asset_observation endpoint
to ensure consistency with related APIs.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 6 | 6 | 5 | 3 | 6 | 6 | 5 | 0 | 0 | 0 | 0 |
23,210 | dagster-io/dagster | dagster-io_dagster/python_modules/dagster-webserver/dagster_webserver/graphql.py | dagster_webserver.graphql.GraphQLServer | from dagster_graphql.implementation.utils import ErrorCapture
from graphql import ASTValidationRule, GraphQLError, GraphQLFormattedError, execute, parse, specified_rules, validate
from dagster._serdes import pack_value
import dagster._check as check
from collections.abc import AsyncGenerator, Collection, Iterator, Sequ... |
class GraphQLServer(ABC, Generic[TRequestContext]):
def __init__(self, app_path_prefix: str=''):
pass
@abstractmethod
def build_graphql_schema(self) -> Schema:
pass
@abstractmethod
def build_graphql_middleware(self) -> list:
pass
def build_graphql_validation_rules(self... | 24 | 3 | 19 | 2 | 15 | 1 | 3 | 0.07 | 2 | 12 | 2 | 1 | 15 | 3 | 15 | 37 | 300 | 46 | 237 | 86 | 189 | 17 | 125 | 48 | 109 | 11 | 4 | 4 | 46 |
23,211 | dagster-io/dagster | dagster-io_dagster/python_modules/dagster-webserver/dagster_webserver/graphql.py | dagster_webserver.graphql.GraphQLWS | from enum import Enum
class GraphQLWS(str, Enum):
PROTOCOL = 'graphql-ws'
CONNECTION_INIT = 'connection_init'
CONNECTION_ACK = 'connection_ack'
CONNECTION_ERROR = 'connection_error'
CONNECTION_TERMINATE = 'connection_terminate'
CONNECTION_KEEP_ALIVE = 'ka'
START = 'start'
DATA = 'data'
... |
class GraphQLWS(str, Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 14 | 1 | 12 | 12 | 11 | 1 | 12 | 12 | 11 | 0 | 4 | 0 | 0 |
23,212 | dagster-io/dagster | dagster-io_dagster/python_modules/dagster-webserver/dagster_webserver/webserver.py | dagster_webserver.webserver.DagsterTracedCounterMiddleware | from dagster_shared.seven import json
from starlette.types import Message
from dagster._utils import Counter, traced_counter
from starlette.datastructures import MutableHeaders
class DagsterTracedCounterMiddleware:
"""Middleware for counting traced dagster calls.
Args:
app (ASGI application): ASGI appli... |
class DagsterTracedCounterMiddleware:
'''Middleware for counting traced dagster calls.
Args:
app (ASGI application): ASGI application
'''
def __init__(self, app):
pass
async def __call__(self, scope, receive, send):
pass
def send_wrapper(message: Message):
... | 4 | 1 | 8 | 1 | 6 | 0 | 2 | 0.31 | 0 | 1 | 1 | 0 | 2 | 1 | 2 | 2 | 23 | 6 | 13 | 7 | 9 | 4 | 13 | 7 | 9 | 3 | 0 | 2 | 5 |
23,213 | dagster-io/dagster | dagster-io_dagster/python_modules/dagster-webserver/dagster_webserver/webserver.py | dagster_webserver.webserver.DagsterWebserver | from dagster_webserver.graphql import GraphQLServer
from starlette.routing import Mount, Route, WebSocketRoute
import io
from dagster._core.storage.local_compute_log_manager import LocalComputeLogManager
from starlette.responses import FileResponse, HTMLResponse, JSONResponse, PlainTextResponse, RedirectResponse, Strea... |
class DagsterWebserver(GraphQLServer[BaseWorkspaceRequestContext], Generic[T_IWorkspaceProcessContext]):
def __init__(self, process_context: T_IWorkspaceProcessContext, app_path_prefix: str='', live_data_poll_rate: Optional[int]=None, uses_app_path_prefix: bool=True):
pass
def build_graphql_schema(se... | 22 | 1 | 14 | 1 | 13 | 1 | 2 | 0.04 | 2 | 19 | 7 | 1 | 18 | 4 | 18 | 55 | 304 | 41 | 255 | 80 | 218 | 11 | 122 | 60 | 99 | 6 | 5 | 3 | 35 |
23,214 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagstermill/dagstermill/context.py | dagstermill.context.DagstermillExecutionContext | from dagster._core.log_manager import DagsterLogManager
from dagster._core.definitions.dependency import Node, NodeHandle
from collections.abc import Mapping
from dagster._core.definitions.repository_definition.repository_definition import RepositoryDefinition
from dagster._annotations import beta, public
from dagster.... | @beta
class DagstermillExecutionContext(AbstractComputeExecutionContext):
'''Dagstermill-specific execution context.
Do not initialize directly: use :func:`dagstermill.get_context`.
'''
def __init__(self, job_context: PlanExecutionContext, job_def: JobDefinition, resource_keys_to_init: AbstractSet[str]... | 39 | 16 | 6 | 1 | 3 | 2 | 1 | 0.55 | 1 | 11 | 6 | 1 | 16 | 6 | 16 | 46 | 144 | 26 | 76 | 45 | 30 | 42 | 43 | 24 | 26 | 3 | 5 | 1 | 18 |
23,215 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagstermill/dagstermill/context.py | dagstermill.context.DagstermillRuntimeExecutionContext | from dagster._core.definitions.dependency import Node, NodeHandle
from typing import AbstractSet, Any, Optional, cast
from dagster._core.execution.context.system import PlanExecutionContext, StepExecutionContext
from dagster import DagsterRun, JobDefinition, OpDefinition, _check as check
class DagstermillRuntimeExecut... |
class DagstermillRuntimeExecutionContext(DagstermillExecutionContext):
def __init__(self, job_context: PlanExecutionContext, job_def: JobDefinition, resource_keys_to_init: AbstractSet[str], op_name: str, step_context: StepExecutionContext, node_handle: NodeHandle, op_config: Any=None):
pass
@property
... | 4 | 0 | 11 | 0 | 11 | 0 | 1 | 0 | 1 | 6 | 3 | 0 | 2 | 1 | 2 | 48 | 24 | 1 | 23 | 14 | 10 | 0 | 6 | 4 | 3 | 1 | 6 | 0 | 2 |
23,216 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagstermill/dagstermill/errors.py | dagstermill.errors.DagstermillError | from dagster_shared.error import DagsterError
class DagstermillError(DagsterError):
"""Base class for errors raised by dagstermill.""" |
class DagstermillError(DagsterError):
'''Base class for errors raised by dagstermill.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
23,217 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagstermill/dagstermill/examples/repository.py | dagstermill.examples.repository.FilePickleList | from dagster._utils import PICKLE_PROTOCOL, file_relative_path
import uuid
import os
import pickle
class FilePickleList:
def __init__(self, path):
self.closed = False
self.id = str(uuid.uuid4())[-6:]
self.path = path
self.list = []
if not os.path.exists(self.path):
... |
class FilePickleList:
def __init__(self, path):
pass
def open(self):
pass
def append(self, obj):
pass
def read(self):
pass
def write(self):
pass
def close(self):
pass | 7 | 0 | 4 | 0 | 4 | 0 | 1 | 0.04 | 0 | 1 | 0 | 0 | 6 | 4 | 6 | 6 | 33 | 5 | 27 | 13 | 20 | 1 | 27 | 11 | 20 | 2 | 0 | 1 | 7 |
23,218 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagstermill/dagstermill/examples/repository.py | dagstermill.examples.repository.GoodbyeConfig | from dagster._config.pythonic_config import Config
class GoodbyeConfig(Config):
farewell: str = 'goodbye' |
class GoodbyeConfig(Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 1 | 0 | 0 |
23,219 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagstermill/dagstermill/examples/repository.py | dagstermill.examples.repository.HelloWorldConfig | from dagster._config.pythonic_config import Config
class HelloWorldConfig(Config):
greeting: str = 'hello' |
class HelloWorldConfig(Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 1 | 0 | 0 |
23,220 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagstermill/dagstermill/io_managers.py | dagstermill.io_managers.ConfigurableLocalOutputNotebookIOManager | from dagster import AssetKey, AssetMaterialization, ConfigurableIOManagerFactory, InitResourceContext, IOManager
from pydantic import Field
import dagster._check as check
from dagster._annotations import beta
from typing import Any, Optional
@beta
class ConfigurableLocalOutputNotebookIOManager(ConfigurableIOManagerFac... | @beta
class ConfigurableLocalOutputNotebookIOManager(ConfigurableIOManagerFactory):
'''Built-in IO Manager for handling output notebook.'''
@classmethod
def _is_dagster_maintained(cls) -> bool:
pass
def create_io_manager(self, context: InitResourceContext) -> 'LocalOutputNotebookIOManager':
... | 5 | 1 | 4 | 0 | 4 | 0 | 1 | 0.04 | 1 | 2 | 1 | 0 | 1 | 0 | 2 | 2 | 27 | 3 | 23 | 6 | 19 | 1 | 7 | 5 | 4 | 1 | 1 | 0 | 2 |
23,221 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagstermill/dagstermill/io_managers.py | dagstermill.io_managers.LocalOutputNotebookIOManager | from typing import Any, Optional
from dagster._utils import mkdir_p
from collections.abc import Sequence
from dagster._core.definitions.metadata import MetadataValue
from dagstermill.factory import _clean_path_for_windows
from dagster._core.execution.context.output import OutputContext
from pathlib import Path
import o... |
class LocalOutputNotebookIOManager(OutputNotebookIOManager):
def __init__(self, base_dir: str, asset_key_prefix: Optional[Sequence[str]]=None):
pass
def _get_path(self, context: OutputContext) -> str:
'''Automatically construct filepath.'''
pass
def handle_output(self, context: O... | 5 | 2 | 11 | 1 | 10 | 1 | 2 | 0.1 | 1 | 8 | 3 | 0 | 4 | 4 | 4 | 7 | 49 | 6 | 39 | 15 | 34 | 4 | 26 | 12 | 21 | 2 | 2 | 1 | 6 |
23,222 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagstermill/dagstermill/io_managers.py | dagstermill.io_managers.OutputNotebookIOManager | from dagster._core.execution.context.output import OutputContext
from dagster._core.execution.context.input import InputContext
from dagster import AssetKey, AssetMaterialization, ConfigurableIOManagerFactory, InitResourceContext, IOManager
from typing import Any, Optional
from collections.abc import Sequence
class Ou... |
class OutputNotebookIOManager(IOManager):
def __init__(self, asset_key_prefix: Optional[Sequence[str]]=None):
pass
def handle_output(self, context: OutputContext, obj: bytes):
pass
def load_input(self, context: InputContext) -> Any:
pass | 4 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 7 | 2 | 1 | 3 | 1 | 3 | 3 | 9 | 2 | 7 | 5 | 3 | 0 | 7 | 5 | 3 | 2 | 1 | 0 | 4 |
23,223 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagstermill/dagstermill/manager.py | dagstermill.manager.DagstermillResourceEventGenerationManager | from dagster._utils import EventGenerationManager
class DagstermillResourceEventGenerationManager(EventGenerationManager):
"""Utility class to explicitly manage setup/teardown of resource events. Overrides the default
`generate_teardown_events` method so that teardown is deferred until explicitly called by the... |
class DagstermillResourceEventGenerationManager(EventGenerationManager):
'''Utility class to explicitly manage setup/teardown of resource events. Overrides the default
`generate_teardown_events` method so that teardown is deferred until explicitly called by the
dagstermill Manager.
'''
def generat... | 3 | 1 | 2 | 0 | 2 | 0 | 1 | 0.8 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 8 | 11 | 2 | 5 | 3 | 2 | 4 | 5 | 3 | 2 | 1 | 2 | 0 | 2 |
23,224 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagstermill/dagstermill/manager.py | dagstermill.manager.Manager | from dagster._core.system_config.objects import ResolvedRunConfig, ResourceConfig
from dagster._core.execution.api import create_execution_plan, scoped_job_context
from dagster._core.execution.plan.outputs import StepOutputHandle
import pickle
from dagstermill.errors import DagstermillError
from dagstermill.context imp... | @beta
class Manager:
def __init__(self):
pass
def _setup_resources(self, resource_defs: Mapping[str, ResourceDefinition], resource_configs: Mapping[str, ResourceConfig], log_manager: DagsterLogManager, execution_plan: Optional[ExecutionPlan], dagster_run: Optional[DagsterRun], resource_keys_to_init: O... | 10 | 5 | 40 | 5 | 29 | 7 | 3 | 0.24 | 0 | 31 | 24 | 0 | 8 | 6 | 8 | 8 | 324 | 45 | 229 | 76 | 192 | 56 | 105 | 46 | 94 | 4 | 0 | 2 | 21 |
23,225 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagstermill/dagstermill/translator.py | dagstermill.translator.DagsterTranslator | import papermill.translators
import papermill
from dagster_shared import seven
class DagsterTranslator(papermill.translators.PythonTranslator):
@classmethod
def codify(cls, parameters, comment=None):
assert '__dm_context' in parameters
assert '__dm_executable_dict' in parameters
assert... |
class DagsterTranslator(papermill.translators.PythonTranslator):
@classmethod
def codify(cls, parameters, comment=None):
pass | 3 | 0 | 30 | 5 | 24 | 1 | 3 | 0.04 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 32 | 5 | 26 | 9 | 23 | 1 | 18 | 8 | 16 | 3 | 1 | 1 | 3 |
23,226 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/guides/dagster/development_to_production/assets_v2.py | development_to_production.assets_v2.ItemsConfig | from dagster import Config, asset
class ItemsConfig(Config):
base_item_id: int |
class ItemsConfig(Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,227 | dagster-io/dagster | dagster-io_dagster/examples/development_to_production/development_to_production/resources.py | development_to_production.resources.HNAPIClient | import requests
from typing import Any, Optional
from collections.abc import Sequence
class HNAPIClient(HNClient):
"""Hacker News client that fetches live data."""
def fetch_item_by_id(self, item_id: int) -> Optional[dict[str, Any]]:
"""Fetches a single item from the Hacker News API by item id."""
... |
class HNAPIClient(HNClient):
'''Hacker News client that fetches live data.'''
def fetch_item_by_id(self, item_id: int) -> Optional[dict[str, Any]]:
'''Fetches a single item from the Hacker News API by item id.'''
pass
def fetch_max_item_id(self) -> int:
pass
@property
def ... | 5 | 2 | 7 | 0 | 7 | 0 | 1 | 0.09 | 1 | 5 | 0 | 0 | 3 | 0 | 3 | 26 | 27 | 3 | 22 | 7 | 17 | 2 | 9 | 6 | 5 | 1 | 5 | 0 | 3 |
23,228 | dagster-io/dagster | dagster-io_dagster/examples/development_to_production/development_to_production/resources.py | development_to_production.resources.HNClient | from abc import ABC, abstractmethod
from collections.abc import Sequence
from typing import Any, Optional
class HNClient(ABC):
"""Base class for a Hacker News Client."""
@abstractmethod
def fetch_item_by_id(self, item_id: int) -> Optional[dict[str, Any]]:
...
@abstractmethod
def fetch_max... |
class HNClient(ABC):
'''Base class for a Hacker News Client.'''
@abstractmethod
def fetch_item_by_id(self, item_id: int) -> Optional[dict[str, Any]]:
pass
@abstractmethod
def fetch_max_item_id(self) -> int:
pass
@property
@abstractmethod
def item_field_names(self) -> Seq... | 8 | 1 | 1 | 0 | 1 | 0 | 1 | 0.13 | 1 | 5 | 0 | 2 | 3 | 0 | 3 | 23 | 12 | 3 | 8 | 7 | 3 | 1 | 7 | 4 | 3 | 1 | 4 | 0 | 3 |
23,229 | dagster-io/dagster | dagster-io_dagster/examples/development_to_production/development_to_production/resources.py | development_to_production.resources.StubHNClient | from typing import Any, Optional
from collections.abc import Sequence
class StubHNClient(HNClient):
"""Hacker News Client that returns fake data."""
def __init__(self):
self.data = {1: {'id': 1, 'type': 'comment', 'title': 'the first comment', 'by': 'user1'}, 2: {'id': 2, 'type': 'story', 'title': 'an... |
class StubHNClient(HNClient):
'''Hacker News Client that returns fake data.'''
def __init__(self):
pass
def fetch_item_by_id(self, item_id: int) -> Optional[dict[str, Any]]:
pass
def fetch_max_item_id(self) -> int:
pass
@property
def item_field_names(self) -> Sequence... | 6 | 1 | 5 | 0 | 5 | 0 | 1 | 0.04 | 1 | 5 | 0 | 0 | 4 | 1 | 4 | 27 | 28 | 4 | 23 | 7 | 17 | 1 | 9 | 6 | 4 | 1 | 5 | 0 | 4 |
23,230 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/guides/dagster/development_to_production/resources/resources_v1.py | development_to_production.resources.resources_v1.HNAPIClient | import requests
from typing import Any, Optional
from dagster import ConfigurableResource
class HNAPIClient(ConfigurableResource):
"""Hacker News client that fetches live data."""
def fetch_item_by_id(self, item_id: int) -> Optional[dict[str, Any]]:
"""Fetches a single item from the Hacker News API by... |
class HNAPIClient(ConfigurableResource):
'''Hacker News client that fetches live data.'''
def fetch_item_by_id(self, item_id: int) -> Optional[dict[str, Any]]:
'''Fetches a single item from the Hacker News API by item id.'''
pass
def fetch_max_item_id(self) -> int:
pass
@prope... | 5 | 2 | 4 | 0 | 3 | 1 | 1 | 0.25 | 1 | 5 | 0 | 0 | 3 | 0 | 3 | 3 | 18 | 3 | 12 | 7 | 7 | 3 | 9 | 6 | 5 | 1 | 1 | 0 | 3 |
23,231 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/guides/dagster/development_to_production/resources/resources_v2.py | development_to_production.resources.resources_v2.StubHNClient | from typing import Any, Optional
class StubHNClient:
"""Hacker News Client that returns fake data."""
def __init__(self):
self.data = {1: {'id': 1, 'type': 'comment', 'title': 'the first comment', 'by': 'user1'}, 2: {'id': 2, 'type': 'story', 'title': 'an awesome story', 'by': 'user2'}}
def fetch... |
class StubHNClient:
'''Hacker News Client that returns fake data.'''
def __init__(self):
pass
def fetch_item_by_id(self, item_id: int) -> Optional[dict[str, Any]]:
pass
def fetch_max_item_id(self) -> int:
pass
@property
def item_field_names(self) -> list:
pass | 6 | 1 | 4 | 0 | 4 | 0 | 1 | 0.06 | 0 | 5 | 0 | 0 | 4 | 1 | 4 | 4 | 23 | 4 | 18 | 7 | 12 | 1 | 9 | 6 | 4 | 1 | 0 | 0 | 4 |
23,232 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/assets/asset_config.py | docs_snippets.concepts.assets.asset_config.MyDownstreamAssetConfig | from dagster import Config, asset
class MyDownstreamAssetConfig(Config):
api_endpoint: str |
class MyDownstreamAssetConfig(Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,233 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/assets/asset_input_managers.py | docs_snippets.concepts.assets.asset_input_managers.PandasSeriesIOManager | class PandasSeriesIOManager:
pass | class PandasSeriesIOManager:
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 0 | 0 |
23,234 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/assets/asset_input_managers_numpy.py | docs_snippets.concepts.assets.asset_input_managers_numpy.NumpyAssetIOManager | from .asset_input_managers import load_numpy_array, load_pandas_dataframe, store_pandas_dataframe
import numpy as np
import dagster as dg
class NumpyAssetIOManager(PandasAssetIOManager):
def load_input(self, context: dg.InputContext) -> np.ndarray:
file_path = self._get_path(context)
return load_n... |
class NumpyAssetIOManager(PandasAssetIOManager):
def load_input(self, context: dg.InputContext) -> np.ndarray:
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 4 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 2 | 0 | 1 |
23,235 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/assets/asset_input_managers_numpy.py | docs_snippets.concepts.assets.asset_input_managers_numpy.PandasAssetIOManager | from .asset_input_managers import load_numpy_array, load_pandas_dataframe, store_pandas_dataframe
import pandas as pd
import dagster as dg
import os
class PandasAssetIOManager(dg.ConfigurableIOManager):
def handle_output(self, context: dg.OutputContext, obj):
file_path = self._get_path(context)
st... |
class PandasAssetIOManager(dg.ConfigurableIOManager):
def handle_output(self, context: dg.OutputContext, obj):
pass
def _get_path(self, context):
pass
def load_input(self, context: dg.InputContext) -> pd.DataFrame:
pass | 4 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 3 | 0 | 3 | 3 | 14 | 2 | 12 | 6 | 8 | 0 | 9 | 6 | 5 | 1 | 1 | 0 | 3 |
23,236 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/assets/asset_testing.py | docs_snippets.concepts.assets.asset_testing.MyAPIResource | import requests
from typing import Any
from dagster import Config, ConfigurableResource
class MyAPIResource(ConfigurableResource):
def query(self, url) -> dict[str, Any]:
return requests.get(url).json() |
class MyAPIResource(ConfigurableResource):
def query(self, url) -> dict[str, Any]:
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 1 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
23,237 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/assets/asset_testing.py | docs_snippets.concepts.assets.asset_testing.MyConfig | from dagster import Config, ConfigurableResource
class MyConfig(Config):
api_url: str |
class MyConfig(Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,238 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/assets/load_asset_values.py | docs_snippets.concepts.assets.load_asset_values.MyIOManager | import dagster as dg
class MyIOManager(dg.IOManager):
def handle_output(self, context: dg.OutputContext, obj):
assert False
def load_input(self, context: dg.InputContext):
return 5 |
class MyIOManager(dg.IOManager):
def handle_output(self, context: dg.OutputContext, obj):
pass
def load_input(self, context: dg.InputContext):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 6 | 1 | 5 | 3 | 2 | 0 | 5 | 3 | 2 | 1 | 1 | 0 | 2 |
23,239 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/assets/observations.py | docs_snippets.concepts.assets.observations.MyOpConfig | import dagster as dg
class MyOpConfig(dg.Config):
date: str |
class MyOpConfig(dg.Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,240 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/configuration/configurable_op_asset_resource.py | docs_snippets.concepts.configuration.configurable_op_asset_resource.MyDatabaseConnection | class MyDatabaseConnection:
def __init__(self, url):
self.url = url | class MyDatabaseConnection:
def __init__(self, url):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 3 | 0 | 3 | 3 | 1 | 0 | 3 | 3 | 1 | 1 | 0 | 0 | 1 |
23,241 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/custom_io_manager.py | docs_snippets.concepts.io_management.custom_io_manager.ConfigurableExternalIOManager | import dagster as dg
class ConfigurableExternalIOManager(dg.ConfigurableIOManagerFactory):
api_token: str
def create_io_manager(self, context) -> ExternalIOManager:
return ExternalIOManager(self.api_token) |
class ConfigurableExternalIOManager(dg.ConfigurableIOManagerFactory):
def create_io_manager(self, context) -> ExternalIOManager:
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 2 | 2 | 0 | 4 | 2 | 2 | 1 | 1 | 0 | 1 |
23,242 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/custom_io_manager.py | docs_snippets.concepts.io_management.custom_io_manager.DataframeTableIOManager | import dagster as dg
class DataframeTableIOManager(dg.ConfigurableIOManager):
def handle_output(self, context: dg.OutputContext, obj):
table_name = context.name
write_dataframe_to_table(name=table_name, dataframe=obj)
def load_input(self, context: dg.InputContext):
if context.upstream... |
class DataframeTableIOManager(dg.ConfigurableIOManager):
def handle_output(self, context: dg.OutputContext, obj):
pass
def load_input(self, context: dg.InputContext):
pass | 3 | 0 | 5 | 0 | 4 | 1 | 2 | 0.25 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 11 | 1 | 8 | 5 | 5 | 2 | 8 | 5 | 5 | 2 | 1 | 1 | 3 |
23,243 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/custom_io_manager.py | docs_snippets.concepts.io_management.custom_io_manager.DataframeTableIOManagerWithMetadata | import dagster as dg
class DataframeTableIOManagerWithMetadata(dg.ConfigurableIOManager):
def handle_output(self, context: dg.OutputContext, obj):
table_name = context.name
write_dataframe_to_table(name=table_name, dataframe=obj)
context.add_output_metadata({'num_rows': len(obj), 'table_na... |
class DataframeTableIOManagerWithMetadata(dg.ConfigurableIOManager):
def handle_output(self, context: dg.OutputContext, obj):
pass
def load_input(self, context: dg.InputContext):
pass | 3 | 0 | 5 | 1 | 4 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 11 | 2 | 9 | 5 | 6 | 0 | 9 | 5 | 6 | 2 | 1 | 1 | 3 |
23,244 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/custom_io_manager.py | docs_snippets.concepts.io_management.custom_io_manager.ExternalIOManager | import dagster as dg
class ExternalIOManager(dg.IOManager):
def __init__(self, api_token):
self._api_token = api_token
self._cache = {}
def handle_output(self, context: dg.OutputContext, obj):
...
def load_input(self, context: dg.InputContext):
if context.asset_key in sel... |
class ExternalIOManager(dg.IOManager):
def __init__(self, api_token):
pass
def handle_output(self, context: dg.OutputContext, obj):
pass
def load_input(self, context: dg.InputContext):
pass | 4 | 0 | 3 | 0 | 3 | 0 | 1 | 0.11 | 1 | 0 | 0 | 0 | 3 | 2 | 3 | 3 | 12 | 2 | 9 | 6 | 6 | 1 | 10 | 6 | 6 | 2 | 1 | 1 | 4 |
23,245 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/custom_io_manager.py | docs_snippets.concepts.io_management.custom_io_manager.MyIOManager | import dagster as dg
class MyIOManager(dg.ConfigurableIOManager):
path_prefix: list[str] = []
def _get_path(self, context) -> str:
return '/'.join(self.path_prefix + context.asset_key.path)
def handle_output(self, context: dg.OutputContext, obj):
write_csv(self._get_path(context), obj)
... |
class MyIOManager(dg.ConfigurableIOManager):
def _get_path(self, context) -> str:
pass
def handle_output(self, context: dg.OutputContext, obj):
pass
def load_input(self, context: dg.InputContext):
pass | 4 | 0 | 2 | 0 | 2 | 0 | 1 | 0.13 | 1 | 1 | 0 | 0 | 3 | 0 | 3 | 3 | 12 | 3 | 8 | 5 | 4 | 1 | 8 | 5 | 4 | 1 | 1 | 0 | 3 |
23,246 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/custom_io_manager.py | docs_snippets.concepts.io_management.custom_io_manager.MyPartitionedIOManager | import dagster as dg
class MyPartitionedIOManager(dg.IOManager):
def _get_path(self, context) -> str:
if context.has_partition_key:
return '/'.join(context.asset_key.path + [context.asset_partition_key])
else:
return '/'.join(context.asset_key.path)
def handle_output(s... |
class MyPartitionedIOManager(dg.IOManager):
def _get_path(self, context) -> str:
pass
def handle_output(self, context: dg.OutputContext, obj):
pass
def load_input(self, context: dg.InputContext):
pass | 4 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 3 | 0 | 3 | 3 | 12 | 2 | 10 | 4 | 6 | 0 | 9 | 4 | 5 | 2 | 1 | 1 | 4 |
23,247 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/filesystem_io_manager.py | docs_snippets.concepts.io_management.filesystem_io_manager.LocalPandasParquetIOManager | from dagster import ConfigurableIOManagerFactory, EnvVar
from typing import Optional
from upath import UPath
class LocalPandasParquetIOManager(ConfigurableIOManagerFactory):
base_path: Optional[str] = None
def create_io_manager(self, context) -> PandasParquetIOManager:
base_path = UPath(self.base_path... |
class LocalPandasParquetIOManager(ConfigurableIOManagerFactory):
def create_io_manager(self, context) -> PandasParquetIOManager:
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 6 | 1 | 5 | 4 | 3 | 0 | 5 | 4 | 3 | 1 | 1 | 0 | 1 |
23,248 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/filesystem_io_manager.py | docs_snippets.concepts.io_management.filesystem_io_manager.PandasParquetIOManager | from upath import UPath
import pandas as pd
from dagster import InputContext, OutputContext, UPathIOManager
class PandasParquetIOManager(UPathIOManager):
extension: str = '.parquet'
def dump_to_path(self, context: OutputContext, obj: pd.DataFrame, path: UPath):
with path.open('wb') as file:
... |
class PandasParquetIOManager(UPathIOManager):
def dump_to_path(self, context: OutputContext, obj: pd.DataFrame, path: UPath):
pass
def load_from_path(self, context: InputContext, path: UPath) -> pd.DataFrame:
pass | 3 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 10 | 2 | 8 | 6 | 5 | 0 | 8 | 4 | 5 | 1 | 1 | 1 | 2 |
23,249 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/filesystem_io_manager.py | docs_snippets.concepts.io_management.filesystem_io_manager.S3ParquetIOManager | from upath import UPath
from dagster import ConfigurableIOManagerFactory, EnvVar
class S3ParquetIOManager(ConfigurableIOManagerFactory):
base_path: str
aws_access_key: str = EnvVar('AWS_ACCESS_KEY_ID')
aws_secret_key: str = EnvVar('AWS_SECRET_ACCESS_KEY')
def create_io_manager(self, context) -> Pandas... |
class S3ParquetIOManager(ConfigurableIOManagerFactory):
def create_io_manager(self, context) -> PandasParquetIOManager:
pass | 2 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 1 | 0 | 1 | 1 | 10 | 2 | 8 | 5 | 6 | 0 | 8 | 5 | 6 | 1 | 1 | 0 | 1 |
23,250 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/input_managers.py | docs_snippets.concepts.io_management.input_managers.BetterPandasIOManager | import pandas as pd
import os
import dagster as dg
class BetterPandasIOManager(dg.ConfigurableIOManager):
def _get_path(self, output_context):
return os.path.join(self.base_dir, 'storage', f'{output_context.step_key}_{output_context.name}.csv')
def handle_output(self, context: dg.OutputContext, obj: ... |
class BetterPandasIOManager(dg.ConfigurableIOManager):
def _get_path(self, output_context):
pass
def handle_output(self, context: dg.OutputContext, obj: pd.DataFrame):
pass
def load_input(self, context: dg.InputContext) -> pd.DataFrame:
pass | 4 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 3 | 0 | 3 | 3 | 16 | 2 | 14 | 5 | 10 | 0 | 10 | 5 | 6 | 2 | 1 | 1 | 4 |
23,251 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/input_managers.py | docs_snippets.concepts.io_management.input_managers.MyBetterNumpyLoader | import numpy as np
import dagster as dg
class MyBetterNumpyLoader(BetterPandasIOManager):
def load_input(self, context: dg.InputContext) -> np.ndarray:
file_path = self._get_path(context.upstream_output)
array = np.genfromtxt(file_path, delimiter=',', dtype=None)
return array |
class MyBetterNumpyLoader(BetterPandasIOManager):
def load_input(self, context: dg.InputContext) -> np.ndarray:
pass | 2 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 4 | 5 | 0 | 5 | 4 | 3 | 0 | 5 | 4 | 3 | 1 | 2 | 0 | 1 |
23,252 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/input_managers.py | docs_snippets.concepts.io_management.input_managers.MyConfigurableInputLoader | import dagster as dg
class MyConfigurableInputLoader(dg.InputManager):
def load_input(self, context: dg.InputContext):
return read_dataframe_from_table(name=context.config['table']) |
class MyConfigurableInputLoader(dg.InputManager):
def load_input(self, context: dg.InputContext):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
23,253 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/input_managers.py | docs_snippets.concepts.io_management.input_managers.MyIOManager | import dagster as dg
class MyIOManager(dg.ConfigurableIOManager):
def handle_output(self, context: dg.OutputContext, obj):
table_name = context.name
write_dataframe_to_table(name=table_name, dataframe=obj)
def load_input(self, context: dg.InputContext):
if context.upstream_output:
... |
class MyIOManager(dg.ConfigurableIOManager):
def handle_output(self, context: dg.OutputContext, obj):
pass
def load_input(self, context: dg.InputContext):
pass | 3 | 0 | 3 | 0 | 3 | 0 | 2 | 0 | 1 | 0 | 0 | 1 | 2 | 0 | 2 | 2 | 8 | 1 | 7 | 4 | 4 | 0 | 7 | 4 | 4 | 2 | 1 | 1 | 3 |
23,254 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/input_managers.py | docs_snippets.concepts.io_management.input_managers.MyNewInputLoader | import dagster as dg
class MyNewInputLoader(MyIOManager):
def load_input(self, context: dg.InputContext):
if context.upstream_output is None:
return read_dataframe_from_table(name='table_1')
else:
return super().load_input(context) |
class MyNewInputLoader(MyIOManager):
def load_input(self, context: dg.InputContext):
pass | 2 | 0 | 6 | 0 | 5 | 1 | 2 | 0.17 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 3 | 7 | 0 | 6 | 2 | 4 | 1 | 5 | 2 | 3 | 2 | 2 | 1 | 2 |
23,255 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/input_managers.py | docs_snippets.concepts.io_management.input_managers.MyNumpyLoader | import numpy as np
import dagster as dg
class MyNumpyLoader(PandasIOManager):
def load_input(self, context: dg.InputContext) -> np.ndarray:
file_path = 'path/to/dataframe'
array = np.genfromtxt(file_path, delimiter=',', dtype=None)
return array |
class MyNumpyLoader(PandasIOManager):
def load_input(self, context: dg.InputContext) -> np.ndarray:
pass | 2 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 3 | 5 | 0 | 5 | 4 | 3 | 0 | 5 | 4 | 3 | 1 | 2 | 0 | 1 |
23,256 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/input_managers.py | docs_snippets.concepts.io_management.input_managers.PandasIOManager | import dagster as dg
class PandasIOManager(dg.ConfigurableIOManager):
def handle_output(self, context: dg.OutputContext, obj):
pass
def load_input(self, context: dg.InputContext):
pass |
class PandasIOManager(dg.ConfigurableIOManager):
def handle_output(self, context: dg.OutputContext, obj):
pass
def load_input(self, context: dg.InputContext):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 2 | 0 | 2 | 2 | 6 | 1 | 5 | 3 | 2 | 0 | 5 | 3 | 2 | 1 | 1 | 0 | 2 |
23,257 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/input_managers.py | docs_snippets.concepts.io_management.input_managers.Table1IOManager | import dagster as dg
class Table1IOManager(TableIOManager):
def load_input(self, context: dg.InputContext):
return read_dataframe_from_table(name='table_1') |
class Table1IOManager(TableIOManager):
def load_input(self, context: dg.InputContext):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 3 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 2 | 0 | 1 |
23,258 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/input_managers.py | docs_snippets.concepts.io_management.input_managers.Table1InputManager | import dagster as dg
class Table1InputManager(dg.InputManager):
def load_input(self, context: dg.InputContext):
return read_dataframe_from_table(name='table_1') |
class Table1InputManager(dg.InputManager):
def load_input(self, context: dg.InputContext):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
23,259 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/input_managers.py | docs_snippets.concepts.io_management.input_managers.TableIOManager | import dagster as dg
class TableIOManager(dg.ConfigurableIOManager):
def handle_output(self, context: dg.OutputContext, obj):
pass
def load_input(self, context: dg.InputContext):
pass |
class TableIOManager(dg.ConfigurableIOManager):
def handle_output(self, context: dg.OutputContext, obj):
pass
def load_input(self, context: dg.InputContext):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 2 | 0 | 2 | 2 | 6 | 1 | 5 | 3 | 2 | 0 | 5 | 3 | 2 | 1 | 1 | 0 | 2 |
23,260 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/load_custom_type_from_config.py | docs_snippets.concepts.io_management.load_custom_type_from_config.Apple | import dagster as dg
@dg.usable_as_dagster_type(loader=apple_loader)
class Apple:
def __init__(self, diameter, juiciness, cultivar):
self.diameter = diameter
self.juiciness = juiciness
self.cultivar = cultivar | @dg.usable_as_dagster_type(loader=apple_loader)
class Apple:
def __init__(self, diameter, juiciness, cultivar):
pass | 3 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 3 | 1 | 1 | 5 | 0 | 5 | 5 | 3 | 0 | 5 | 5 | 3 | 1 | 0 | 0 | 1 |
23,261 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/metadata.py | docs_snippets.concepts.io_management.metadata.MyIOManager | from dagster import ConfigurableIOManager, InputContext, Out, OutputContext, job, op
class MyIOManager(ConfigurableIOManager):
def handle_output(self, context: OutputContext, obj):
if context.definition_metadata:
table_name = context.definition_metadata['table']
schema = context.de... |
class MyIOManager(ConfigurableIOManager):
def handle_output(self, context: OutputContext, obj):
pass
def load_input(self, context: InputContext):
pass | 3 | 0 | 8 | 0 | 8 | 0 | 2 | 0 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 2 | 18 | 1 | 17 | 7 | 14 | 0 | 13 | 7 | 10 | 2 | 1 | 1 | 4 |
23,262 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/io_management/output_config.py | docs_snippets.concepts.io_management.output_config.MyIOManager | from dagster import InputContext, IOManager, OutputContext, io_manager, job, op
class MyIOManager(IOManager):
def handle_output(self, context: OutputContext, obj):
table_name = context.config['table']
write_dataframe_to_table(name=table_name, dataframe=obj)
def load_input(self, context: Input... |
class MyIOManager(IOManager):
def handle_output(self, context: OutputContext, obj):
pass
def load_input(self, context: InputContext):
pass | 3 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 9 | 1 | 8 | 5 | 5 | 0 | 8 | 5 | 5 | 2 | 1 | 1 | 3 |
23,263 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/ops_jobs_graphs/dynamic.py | docs_snippets.concepts.ops_jobs_graphs.dynamic.BigData | class BigData:
def __init__(self):
self._data = {}
def chunk(self):
return self._data.items() | class BigData:
def __init__(self):
pass
def chunk(self):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 2 | 2 | 6 | 1 | 5 | 4 | 2 | 0 | 5 | 4 | 2 | 1 | 0 | 0 | 2 |
23,264 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/ops_jobs_graphs/graph_provides_config_mapping.py | docs_snippets.concepts.ops_jobs_graphs.graph_provides_config_mapping.AddNConfig | import dagster as dg
class AddNConfig(dg.Config):
n: float |
class AddNConfig(dg.Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,265 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/ops_jobs_graphs/graph_provides_config_mapping.py | docs_snippets.concepts.ops_jobs_graphs.graph_provides_config_mapping.MultiplyByMConfig | import dagster as dg
class MultiplyByMConfig(dg.Config):
m: float |
class MultiplyByMConfig(dg.Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,266 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/ops_jobs_graphs/graph_provides_config_mapping.py | docs_snippets.concepts.ops_jobs_graphs.graph_provides_config_mapping.ToFahrenheitConfig | import dagster as dg
class ToFahrenheitConfig(dg.Config):
from_unit: str |
class ToFahrenheitConfig(dg.Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,267 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/ops_jobs_graphs/jobs_from_graphs.py | docs_snippets.concepts.ops_jobs_graphs.jobs_from_graphs.Server | import dagster as dg
class Server(dg.ConfigurableResource):
def ping_server(self):
... |
class Server(dg.ConfigurableResource):
def ping_server(self):
pass | 2 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 2 | 0 | 2 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
23,268 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/ops_jobs_graphs/jobs_with_config_mapping.py | docs_snippets.concepts.ops_jobs_graphs.jobs_with_config_mapping.DoSomethingConfig | from dagster import Config, OpExecutionContext, RunConfig, config_mapping, job, op
class DoSomethingConfig(Config):
config_param: str |
class DoSomethingConfig(Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,269 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/ops_jobs_graphs/jobs_with_config_mapping.py | docs_snippets.concepts.ops_jobs_graphs.jobs_with_config_mapping.SimplifiedConfig | from dagster import Config, OpExecutionContext, RunConfig, config_mapping, job, op
class SimplifiedConfig(Config):
simplified_param: str |
class SimplifiedConfig(Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,270 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/ops_jobs_graphs/jobs_with_default_config.py | docs_snippets.concepts.ops_jobs_graphs.jobs_with_default_config.DoSomethingConfig | import dagster as dg
class DoSomethingConfig(dg.Config):
config_param: str |
class DoSomethingConfig(dg.Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,271 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/ops_jobs_graphs/ops.py | docs_snippets.concepts.ops_jobs_graphs.ops.MockRequest | class MockRequest:
def get(self, _url):
return MockResponse() | class MockRequest:
def get(self, _url):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 0 | 0 | 1 |
23,272 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/ops_jobs_graphs/ops.py | docs_snippets.concepts.ops_jobs_graphs.ops.MockResponse | class MockResponse:
def json(self):
return {} | class MockResponse:
def json(self):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 0 | 0 | 1 |
23,273 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/ops_jobs_graphs/ops.py | docs_snippets.concepts.ops_jobs_graphs.ops.MyOpConfig | import dagster as dg
class MyOpConfig(dg.Config):
api_endpoint: str |
class MyOpConfig(dg.Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,274 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/partitions_schedules_sensors/date_config_job.py | docs_snippets.concepts.partitions_schedules_sensors.date_config_job.ProcessDateConfig | from dagster import Config, OpExecutionContext, job, op
class ProcessDateConfig(Config):
date: str |
class ProcessDateConfig(Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,275 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/partitions_schedules_sensors/sensors/asset_sensors.py | docs_snippets.concepts.partitions_schedules_sensors.sensors.asset_sensors.ReadMaterializationConfig | from dagster import Config
class ReadMaterializationConfig(Config):
asset_key: list[str] |
class ReadMaterializationConfig(Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,276 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/partitions_schedules_sensors/sensors/sensors.py | docs_snippets.concepts.partitions_schedules_sensors.sensors.sensors.FileConfig | from dagster import op, job, Config, OpExecutionContext
class FileConfig(Config):
filename: str |
class FileConfig(Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,277 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/partitions_schedules_sensors/static_partitioned_asset_job.py | docs_snippets.concepts.partitions_schedules_sensors.static_partitioned_asset_job.ContinentOpConfig | import dagster as dg
class ContinentOpConfig(dg.Config):
continent_name: str |
class ContinentOpConfig(dg.Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,278 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/partitions_schedules_sensors/static_partitioned_job.py | docs_snippets.concepts.partitions_schedules_sensors.static_partitioned_job.ContinentOpConfig | from dagster import Config, OpExecutionContext, job, op, static_partitioned_config
class ContinentOpConfig(Config):
continent_name: str |
class ContinentOpConfig(Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,279 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/concepts/types/object_type.py | docs_snippets.concepts.types.object_type.EvenType | class EvenType:
def __init__(self, num):
assert num % 2 == 0
self.num = num | class EvenType:
def __init__(self, num):
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 0 | 0 | 1 |
23,280 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/integrations/airbyte_cloud/customize_airbyte_cloud_translator_asset_spec.py | docs_snippets.integrations.airbyte_cloud.customize_airbyte_cloud_translator_asset_spec.MyCustomAirbyteTranslator | from dagster_airbyte import AirbyteCloudWorkspace, AirbyteConnectionTableProps, DagsterAirbyteTranslator, load_airbyte_cloud_asset_specs
import dagster as dg
class MyCustomAirbyteTranslator(DagsterAirbyteTranslator):
def get_asset_spec(self, props: AirbyteConnectionTableProps) -> dg.AssetSpec:
default_spe... |
class MyCustomAirbyteTranslator(DagsterAirbyteTranslator):
def get_asset_spec(self, props: AirbyteConnectionTableProps) -> dg.AssetSpec:
pass | 2 | 0 | 7 | 0 | 5 | 2 | 1 | 0.33 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 2 | 8 | 0 | 6 | 3 | 4 | 2 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
23,281 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/integrations/dbt/potemkin_dag_for_cover_image.py | docs_snippets.integrations.dbt.potemkin_dag_for_cover_image.dagster_fivetran | from dagster import AssetExecutionContext, asset
from dagster import asset
class dagster_fivetran:
@staticmethod
def build_fivetran_assets(connector_id, table_names):
@asset(compute_kind='fivetran')
def users():
...
@asset(compute_kind='fivetran')
def orders():
... |
class dagster_fivetran:
@staticmethod
def build_fivetran_assets(connector_id, table_names):
pass
@asset(compute_kind='fivetran')
def users():
pass
@asset(compute_kind='fivetran')
def orders():
pass | 7 | 0 | 3 | 1 | 3 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 10 | 2 | 8 | 7 | 3 | 0 | 7 | 4 | 3 | 1 | 0 | 0 | 3 |
23,282 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/integrations/dlt/dlt_dagster_translator.py | docs_snippets.integrations.dlt.dlt_dagster_translator.CustomDagsterDltTranslator | from dagster_dlt import DagsterDltResource, DagsterDltTranslator, dlt_assets
from dagster import AssetExecutionContext, AssetKey, AssetSpec
from dagster_dlt.translator import DltResourceTranslatorData
class CustomDagsterDltTranslator(DagsterDltTranslator):
def get_asset_spec(self, data: DltResourceTranslatorData)... |
class CustomDagsterDltTranslator(DagsterDltTranslator):
def get_asset_spec(self, data: DltResourceTranslatorData) -> AssetSpec:
'''Overrides asset spec to override asset key to be the dlt resource name.'''
pass | 2 | 1 | 10 | 0 | 6 | 4 | 1 | 0.57 | 1 | 2 | 1 | 0 | 1 | 0 | 1 | 23 | 11 | 0 | 7 | 3 | 5 | 4 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
23,283 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/integrations/fivetran/customize_fivetran_translator_asset_spec.py | docs_snippets.integrations.fivetran.customize_fivetran_translator_asset_spec.MyCustomFivetranTranslator | from dagster_fivetran import DagsterFivetranTranslator, FivetranConnectorTableProps, FivetranWorkspace, load_fivetran_asset_specs
import dagster as dg
class MyCustomFivetranTranslator(DagsterFivetranTranslator):
def get_asset_spec(self, props: FivetranConnectorTableProps) -> dg.AssetSpec:
default_spec = s... |
class MyCustomFivetranTranslator(DagsterFivetranTranslator):
def get_asset_spec(self, props: FivetranConnectorTableProps) -> dg.AssetSpec:
pass | 2 | 0 | 7 | 0 | 5 | 2 | 1 | 0.33 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 2 | 8 | 0 | 6 | 3 | 4 | 2 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
23,284 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/legacy/dagster_pandas_guide/custom_column_constraint.py | docs_snippets.legacy.dagster_pandas_guide.custom_column_constraint.DivisibleByFiveConstraint | from dagster_pandas.constraints import ColumnConstraint, ColumnConstraintViolationException, ColumnDTypeInSetConstraint
class DivisibleByFiveConstraint(ColumnConstraint):
def __init__(self):
message = 'Value must be divisible by 5'
super().__init__(error_description=message, markdown_description=m... |
class DivisibleByFiveConstraint(ColumnConstraint):
def __init__(self):
pass
def validate(self, dataframe, column_name):
pass | 3 | 0 | 7 | 0 | 7 | 0 | 2 | 0 | 1 | 2 | 1 | 0 | 2 | 2 | 2 | 6 | 16 | 1 | 15 | 7 | 12 | 0 | 8 | 5 | 5 | 2 | 2 | 1 | 3 |
23,285 | dagster-io/dagster | dagster-io_dagster/examples/docs_snippets/docs_snippets/integrations/pandera/example.py | example.StockPrices | from pandera.typing import Series
import pandera as pa
class StockPrices(pa.DataFrameModel):
"""Open/close prices for one or more stocks by day."""
name: Series[str] = pa.Field(description='Ticker symbol of stock')
date: Series[str] = pa.Field(description='Date of prices')
open: Series[float] = pa.Fiel... |
class StockPrices(pa.DataFrameModel):
'''Open/close prices for one or more stocks by day.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 1 | 5 | 4 | 4 | 1 | 5 | 4 | 4 | 0 | 0 | 0 | 0 |
23,286 | dagster-io/dagster | dagster-io_dagster/examples/with_wandb/with_wandb/assets/example/fashion_data.py | fashion_data.fashion | import os.path
import torch.utils.data as data
import errno
import os
from PIL import Image
import torch
class fashion(data.Dataset):
"""`MNIST <http://yann.lecun.com/exdb/mnist/>`_ Dataset.
Args:
root (string): Root directory of dataset where ``processed/training.pt``
and ``processed/tes... |
class fashion(data.Dataset):
'''`MNIST <http://yann.lecun.com/exdb/mnist/>`_ Dataset.
Args:
root (string): Root directory of dataset where ``processed/training.pt``
and ``processed/test.pt`` exist.
train (bool, optional): If True, creates dataset from ``training.pt``,
o... | 6 | 3 | 20 | 3 | 15 | 3 | 3 | 0.32 | 1 | 3 | 0 | 0 | 5 | 8 | 5 | 9 | 133 | 21 | 88 | 30 | 80 | 28 | 64 | 26 | 56 | 5 | 2 | 2 | 16 |
23,287 | dagster-io/dagster | dagster-io_dagster/scripts/gen_airbyte_classes.py | gen_airbyte_classes.ListType | from typing import Any, Optional
class ListType(SchemaType):
def __init__(self, inner: SchemaType):
self.inner = inner
def __str__(self):
return f'List[{self.inner}]'
def annotation(self, scope: Optional[str]=None, quote: bool=False, hide_default: bool=False):
return f'List[{self... |
class ListType(SchemaType):
def __init__(self, inner: SchemaType):
pass
def __str__(self):
pass
def annotation(self, scope: Optional[str]=None, quote: bool=False, hide_default: bool=False):
pass
def get_check(self, name: str, scope: Optional[str]=None):
pass | 5 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 4 | 1 | 4 | 29 | 14 | 3 | 11 | 8 | 4 | 0 | 9 | 6 | 4 | 1 | 5 | 0 | 4 |
23,288 | dagster-io/dagster | dagster-io_dagster/scripts/gen_airbyte_classes.py | gen_airbyte_classes.OptType | from typing import Any, Optional
class OptType(SchemaType):
def __init__(self, inner: SchemaType):
self.inner = inner
def __str__(self):
return f'Optional[{self.inner}]'
def annotation(self, scope: Optional[str]=None, quote: bool=False, hide_default: bool=False):
return f"Optiona... |
class OptType(SchemaType):
def __init__(self, inner: SchemaType):
pass
def __str__(self):
pass
def annotation(self, scope: Optional[str]=None, quote: bool=False, hide_default: bool=False):
pass
def get_check(self, name: str, scope: Optional[str]=None):
pass | 5 | 0 | 4 | 0 | 3 | 1 | 2 | 0.21 | 1 | 3 | 1 | 0 | 4 | 1 | 4 | 29 | 21 | 4 | 14 | 9 | 7 | 3 | 12 | 7 | 7 | 2 | 5 | 1 | 6 |
23,289 | dagster-io/dagster | dagster-io_dagster/scripts/gen_airbyte_classes.py | gen_airbyte_classes.RawType | from typing import Any, Optional
class RawType(SchemaType):
def __init__(self, schema_type_str: str, const_value: Optional[Any]=None):
if schema_type_str in TYPE_MAPPING:
self.type_str = TYPE_MAPPING[schema_type_str]
else:
self.type_str = schema_type_str
self._const... |
class RawType(SchemaType):
def __init__(self, schema_type_str: str, const_value: Optional[Any]=None):
pass
def __str__(self):
pass
@property
def const_value(self):
pass
def annotation(self, scope: Optional[str]=None, quote: bool=False, hide_default: bool=False):
p... | 7 | 0 | 5 | 0 | 5 | 0 | 2 | 0 | 1 | 3 | 0 | 0 | 5 | 2 | 5 | 30 | 31 | 5 | 26 | 11 | 17 | 0 | 22 | 8 | 16 | 4 | 5 | 1 | 11 |
23,290 | dagster-io/dagster | dagster-io_dagster/scripts/gen_airbyte_classes.py | gen_airbyte_classes.SchemaType | import re
from typing import Any, Optional
from abc import ABC, abstractmethod
class SchemaType(ABC):
"""Corresponds to the Python type of a field in a schema, has methods to generate
the Python code to annotate that type or check it at runtime.
"""
description: Optional[str] = None
@abstractmetho... |
class SchemaType(ABC):
'''Corresponds to the Python type of a field in a schema, has methods to generate
the Python code to annotate that type or check it at runtime.
'''
@abstractmethod
def get_check(self, name: str, scope: Optional[str]=None) -> str:
'''Returns the dagster._check check fo... | 9 | 4 | 5 | 0 | 5 | 1 | 1 | 0.21 | 1 | 2 | 0 | 4 | 5 | 0 | 5 | 25 | 41 | 6 | 29 | 16 | 18 | 6 | 18 | 11 | 12 | 2 | 4 | 1 | 7 |
23,291 | dagster-io/dagster | dagster-io_dagster/scripts/gen_airbyte_classes.py | gen_airbyte_classes.UnionType | from typing import Any, Optional
from collections.abc import Sequence
class UnionType(SchemaType):
def __init__(self, inner: Sequence[SchemaType]):
self.inner = inner
def __str__(self):
return f"Union[{', '.join([str(x) for x in self.inner])}]"
def annotation(self, scope: Optional[str]=N... |
class UnionType(SchemaType):
def __init__(self, inner: Sequence[SchemaType]):
pass
def __str__(self):
pass
def annotation(self, scope: Optional[str]=None, quote: bool=False, hide_default: bool=False):
pass
def get_check(self, name: str, scope: Optional[str]=None):
pa... | 5 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 3 | 0 | 0 | 4 | 1 | 4 | 29 | 17 | 3 | 14 | 9 | 7 | 0 | 10 | 7 | 5 | 1 | 5 | 0 | 4 |
23,292 | dagster-io/dagster | dagster-io_dagster/scripts/generate_changelog.py | generate_changelog.ParsedCommit | from typing import NamedTuple, Optional
class ParsedCommit(NamedTuple):
issue_link: str
changelog_category: str
raw_changelog_entry: Optional[str]
raw_title: str
author: str
author_email: str
repo_name: str
prefix: Optional[str]
ignore: bool
@property
def documented(self) -... |
class ParsedCommit(NamedTuple):
@property
def documented(self) -> bool:
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 12 | 1 | 11 | 3 | 8 | 0 | 10 | 2 | 8 | 1 | 1 | 0 | 1 |
23,293 | dagster-io/dagster | dagster-io_dagster/examples/google_drive_factory/google_drive_factory/definitions.py | google_drive_factory.definitions.DriveFile | from pydantic import BaseModel, PrivateAttr
class DriveFile(BaseModel):
id: str
name: str
createdTime: str
modifiedTime: str |
class DriveFile(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 5 | 0 | 0 |
23,294 | dagster-io/dagster | dagster-io_dagster/examples/google_drive_factory/google_drive_factory/definitions.py | google_drive_factory.definitions.GoogleDriveClient | from googleapiclient.discovery import build
from google.oauth2 import service_account
class GoogleDriveClient:
"""Handles the Google Drive client creation and API interactions."""
def __init__(self, credentials_json: dict):
self.credentials = service_account.Credentials.from_service_account_info(crede... |
class GoogleDriveClient:
'''Handles the Google Drive client creation and API interactions.'''
def __init__(self, credentials_json: dict):
pass
def retrieve_files(self, folder_id: str):
'''Query for files in a Google Drive folder.'''
pass
def request_content(self, file_id: str... | 5 | 4 | 6 | 0 | 5 | 1 | 1 | 0.19 | 0 | 2 | 0 | 0 | 3 | 2 | 3 | 3 | 22 | 3 | 16 | 8 | 12 | 3 | 10 | 8 | 6 | 1 | 0 | 0 | 3 |
23,295 | dagster-io/dagster | dagster-io_dagster/examples/google_drive_factory/google_drive_factory/definitions.py | google_drive_factory.definitions.GoogleDriveResource | import json
from pydantic import BaseModel, PrivateAttr
import dagster as dg
class GoogleDriveResource(dg.ConfigurableResource):
"""Resource configuration for Google Drive credentials."""
json_data: str
_client: GoogleDriveClient = PrivateAttr()
def setup_for_execution(self, context: dg.InitResourceCo... |
class GoogleDriveResource(dg.ConfigurableResource):
'''Resource configuration for Google Drive credentials.'''
def setup_for_execution(self, context: dg.InitResourceContext):
'''Initialize the Google Drive client using the credentials.'''
pass
def retrieve_files(self, folder_id: str):
... | 5 | 5 | 3 | 0 | 2 | 1 | 1 | 0.4 | 1 | 2 | 1 | 0 | 3 | 0 | 3 | 3 | 19 | 5 | 10 | 6 | 6 | 4 | 10 | 6 | 6 | 1 | 1 | 0 | 3 |
23,296 | dagster-io/dagster | dagster-io_dagster/examples/use_case_repository/use_case_repository/guides/monitor_files_in_aws_s3.py | guides.monitor_files_in_aws_s3.ObjectConfig | from dagster import AssetExecutionContext, Config, Definitions, EnvVar, RunConfig, RunRequest, SkipReason, asset, sensor
class ObjectConfig(Config):
key: str |
class ObjectConfig(Config):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
23,297 | dagster-io/dagster | dagster-io_dagster/python_modules/libraries/dagster-airlift/kitchen-sink/kitchen_sink_tests/integration_tests/conftest.py | kitchen_sink_tests.integration_tests.conftest.ExpectedMat | from typing import NamedTuple, Union
from dagster import AssetKey, DagsterInstance
class ExpectedMat(NamedTuple):
asset_key: AssetKey
runs_in_dagster: bool |
class ExpectedMat(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
23,298 | dagster-io/dagster | dagster-io_dagster/docs/sphinx/_ext/sphinx-mdx-builder/sphinxcontrib/mdxbuilder/builders/mdx.py | mdxbuilder.builders.mdx.MdxBuilder | from os import path
from sphinx.util.osutil import ensuredir
from ..writers.mdx import MdxWriter
from docutils.io import StringOutput
from sphinx.builders import Builder
from collections.abc import Iterator
from docutils import nodes
class MdxBuilder(Builder):
name = 'mdx'
format = 'mdx'
epilog: str = '___... |
class MdxBuilder(Builder):
def init(self):
pass
def file_transform(docname: str) -> str:
pass
def link_transform(docname: str) -> str:
pass
def get_outdated_docs(self) -> Iterator[str]:
pass
def get_target_uri(self, docname: str, typ: str... | 9 | 0 | 7 | 0 | 6 | 0 | 2 | 0.02 | 1 | 6 | 1 | 0 | 6 | 3 | 6 | 6 | 62 | 9 | 53 | 25 | 44 | 1 | 52 | 23 | 43 | 6 | 1 | 3 | 17 |
23,299 | dagster-io/dagster | dagster-io_dagster/docs/sphinx/_ext/sphinx-mdx-builder/sphinxcontrib/mdxbuilder/writers/mdx.py | mdxbuilder.writers.mdx.MdxTranslator | from sphinx import addnodes
import os
import inspect
from sphinx.util.docutils import SphinxTranslator
from sphinx.locale import admonitionlabels
from docutils.nodes import Element
from datetime import datetime
from collections.abc import Sequence
from typing import TYPE_CHECKING, Any, Optional
from docutils import nod... |
class MdxTranslator(SphinxTranslator):
def __init__(self, document: nodes.document, builder: 'MdxBuilder') -> None:
pass
def _unwrap_function_object(self, obj):
'''Attempt to unwrap function-like objects to get the underlying callable.
This method handles various common patterns used ... | 157 | 8 | 4 | 0 | 4 | 0 | 1 | 0.14 | 1 | 10 | 0 | 0 | 152 | 22 | 152 | 152 | 906 | 181 | 639 | 256 | 480 | 91 | 584 | 249 | 430 | 14 | 1 | 3 | 220 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.