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
327,900
Euro-BioImaging/EuBI-Bridge
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Euro-BioImaging_EuBI-Bridge/eubi_bridge/base/scale.py
Euro-BioImaging_EuBI-Bridge.eubi_bridge.base.scale.Downscaler
import dask.array as da import dataclasses @dataclasses.dataclass class Downscaler: array: da.Array scale_factor: (list, tuple) n_layers: int scale: (list, tuple) = None output_chunks: (list, tuple) = None backend: str = 'numpy' downscale_method: str = 'simple' def __post_init__(self):...
@dataclasses.dataclass class Downscaler: def __post_init__(self): pass def get_method(self): pass def run(self): pass def update(self, **kwargs): pass
6
0
11
0
10
0
3
0
0
7
1
0
4
4
4
4
54
5
49
19
44
0
40
19
35
4
0
2
12
327,901
Euro-BioImaging/EuBI-Bridge
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Euro-BioImaging_EuBI-Bridge/eubi_bridge/base/writers.py
Euro-BioImaging_EuBI-Bridge.eubi_bridge.base.writers.CompressorConfig
from dataclasses import dataclass @dataclass class CompressorConfig: name: str = 'blosc' params: dict = None def __post_init__(self): self.params = self.params or {}
@dataclass class CompressorConfig: def __post_init__(self): pass
3
0
2
0
2
0
1
0
0
0
0
0
1
0
1
1
6
1
5
4
3
0
5
4
3
1
0
0
1
327,902
Euro-BioImaging/EuBI-Bridge
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Euro-BioImaging_EuBI-Bridge/eubi_bridge/ebridge.py
Euro-BioImaging_EuBI-Bridge.eubi_bridge.ebridge.EuBIBridge
import tempfile from pathlib import Path import dask import time from eubi_bridge.utils.metadata_utils import print_printable, get_printables from multiprocessing.pool import ThreadPool from typing import Union import copy from eubi_bridge.utils.convenience import take_filepaths, is_zarr_group import os import zarr fro...
class EuBIBridge: ''' EuBIBridge is a conversion tool for bioimage datasets, allowing for both unary and aggregative conversion of image data collections to OME-Zarr format. Attributes: config_gr (zarr.Group): Configuration settings stored in a Zarr group. config (dict): Dictionary repr...
20
18
55
6
38
12
4
0.48
0
12
1
0
19
12
19
19
1,188
131
728
204
603
349
263
101
241
10
0
4
74
327,903
Euro-BioImaging/EuBI-Bridge
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Euro-BioImaging_EuBI-Bridge/eubi_bridge/ebridge_base.py
Euro-BioImaging_EuBI-Bridge.eubi_bridge.ebridge_base.BridgeBase
from eubi_bridge.fileset_io import BatchFile import os import tempfile import dask from eubi_bridge.base.data_manager import BatchManager from eubi_bridge.base.readers import read_single_image_asarray from eubi_bridge.utils.convenience import take_filepaths from pathlib import Path from typing import Tuple, Union impor...
class BridgeBase: def __init__(self, input_path: Union[str, Path], includes=None, excludes=None, metadata_path=None, series=None, client=None, zarr_format=2, verbose=False): ''' Initialize the BridgeBase class. This class is the main entry point for converting and processing image data. ...
14
10
37
4
22
10
3
0.45
0
11
2
0
13
22
13
13
494
73
293
134
237
133
156
83
142
8
0
3
37
327,904
Euro-BioImaging/EuBI-Bridge
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Euro-BioImaging_EuBI-Bridge/eubi_bridge/fileset_io.py
Euro-BioImaging_EuBI-Bridge.eubi_bridge.fileset_io.BatchFile
from dask import delayed from natsort import natsorted import os import dask.array as da from eubi_bridge.base.data_manager import ArrayManager, ChannelIterator from typing import Dict, Iterable, List, Union import copy class BatchFile: def __init__(self, filepaths: Iterable[str], shapes: Iterable[tuple | list]=N...
class BatchFile: def __init__(self, filepaths: Iterable[str], shapes: Iterable[tuple | list]=None, axis_tag0: Union[str, tuple]=None, axis_tag1: Union[str, tuple]=None, axis_tag2: Union[str, tuple]=None, axis_tag3: Union[str, tuple]=None, axis_tag4: Union[str, tuple]=None, arrays: Iterable[da.Array]=None): ...
9
0
20
2
18
1
3
0.06
0
10
3
0
8
6
8
8
174
25
142
67
108
8
83
42
74
5
0
2
24
327,905
Euro-BioImaging/EuBI-Bridge
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Euro-BioImaging_EuBI-Bridge/eubi_bridge/fileset_io.py
Euro-BioImaging_EuBI-Bridge.eubi_bridge.fileset_io.FileSet
from natsort import natsorted import copy import numpy as np import dask.array as da from typing import Dict, Iterable, List, Union class FileSet: """ A class to manage file paths and their shapes for multi-dimensional data. This class handles file paths and their corresponding array data, supporting oper...
class FileSet: ''' A class to manage file paths and their shapes for multi-dimensional data. This class handles file paths and their corresponding array data, supporting operations like concatenation along specified axes. It's designed to work with up to 5 dimensions (t, c, z, y, x). ''' def _...
7
7
37
5
21
12
5
0.6
0
9
0
0
6
8
6
6
249
39
132
73
115
79
103
63
96
10
0
7
28
327,906
Euro-BioImaging/EuBI-Bridge
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Euro-BioImaging_EuBI-Bridge/eubi_bridge/ngff/multiscales.py
Euro-BioImaging_EuBI-Bridge.eubi_bridge.ngff.multiscales.NGFFMetadataHandler
import zarr import copy import numpy as np from typing import Optional, Dict, List, Any, Tuple, Union, Iterable, ClassVar from pathlib import Path class NGFFMetadataHandler: """Class for handling NGFF metadata in zarr groups.""" SUPPORTED_VERSIONS: ClassVar[List[str]] = ['0.4', '0.5'] def __init__(self) -...
class NGFFMetadataHandler: '''Class for handling NGFF metadata in zarr groups.''' def __init__(self) -> None: '''Initialize an empty metadata handler.''' pass def __enter__(self) -> 'NGFFMetadataHandler': pass def __exit__(self, exc_type, exc_val, exc_tb) -> None: pas...
58
27
11
1
9
1
3
0.13
0
19
0
0
44
5
44
44
530
71
415
133
323
52
276
86
231
7
0
3
114
327,907
Euro-BioImaging/EuBI-Bridge
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Euro-BioImaging_EuBI-Bridge/eubi_bridge/ngff/multiscales.py
Euro-BioImaging_EuBI-Bridge.eubi_bridge.ngff.multiscales.Pyramid
import numpy as np import dask.array as da from eubi_bridge.base.scale import Downscaler import zarr from pathlib import Path class Pyramid: def __init__(self, gr: (zarr.Group, zarr.storage.StoreLike, Path, str)=None): self.meta = None self.gr = None if gr is not None: self.fro...
class Pyramid: def __init__(self, gr: (zarr.Group, zarr.storage.StoreLike, Path, str)=None): pass def __repr__(self): pass def from_ngff(self, gr): pass def to_ngff(self, store: (zarr.Group, zarr.storage.StoreLike, Path, str), version: pass @property def axes...
22
2
8
0
7
1
2
0.29
0
6
2
0
15
3
15
15
162
18
112
59
72
32
76
35
60
4
0
2
25
327,908
Euro-BioImaging/EuBI-Bridge
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Euro-BioImaging_EuBI-Bridge/eubi_bridge/utils/dask_client_plugins.py
Euro-BioImaging_EuBI-Bridge.eubi_bridge.utils.dask_client_plugins.ForcefulShutdownPlugin
from distributed.diagnostics.plugin import SchedulerPlugin from distributed.diagnostics.plugin import SchedulerPlugin class ForcefulShutdownPlugin(SchedulerPlugin): def start(self, scheduler): for idx, worker in dask_scheduler.workers.items(): print(f'Worker shutting down: {idx}') ...
class ForcefulShutdownPlugin(SchedulerPlugin): def start(self, scheduler): pass
2
0
4
0
4
0
2
0
1
0
0
0
1
0
1
1
5
0
5
3
3
0
5
3
3
2
1
1
2
327,909
Euro-BioImaging/EuBI-Bridge
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Euro-BioImaging_EuBI-Bridge/eubi_bridge/utils/dask_client_plugins.py
Euro-BioImaging_EuBI-Bridge.eubi_bridge.utils.dask_client_plugins.ShutdownOnWorkerRemovalPlugin
import asyncio from distributed.diagnostics.plugin import SchedulerPlugin from distributed.diagnostics.plugin import SchedulerPlugin class ShutdownOnWorkerRemovalPlugin(SchedulerPlugin): async def remove_worker(self, scheduler, worker, **kwargs): for worker in scheduler.workers.values(): await...
class ShutdownOnWorkerRemovalPlugin(SchedulerPlugin): async def remove_worker(self, scheduler, worker, **kwargs): pass
2
0
6
0
6
0
2
0
1
0
0
0
1
0
1
1
7
0
7
2
5
0
7
2
5
2
1
1
2
327,910
Euro-BioImaging/EuBI-Bridge
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Euro-BioImaging_EuBI-Bridge/eubi_bridge/utils/dask_client_plugins.py
Euro-BioImaging_EuBI-Bridge.eubi_bridge.utils.dask_client_plugins.ShutdownPlugin
import asyncio from distributed.diagnostics.plugin import SchedulerPlugin from distributed.diagnostics.plugin import SchedulerPlugin class ShutdownPlugin(SchedulerPlugin): def __init__(self, output_folder, timeout=60, verbose=False): self.output_folder = output_folder self.timeout = timeout ...
class ShutdownPlugin(SchedulerPlugin): def __init__(self, output_folder, timeout=60, verbose=False): pass def start(self, scheduler): pass
3
0
3
0
3
0
1
0
1
0
0
0
2
3
2
2
8
1
7
6
4
0
7
6
4
1
1
0
2
327,911
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/config/base.py
strawchemy.config.base.StrawchemyConfig
from typing import TYPE_CHECKING, Optional from strawchemy.strawberry.repository import StrawchemySyncRepository from strawchemy.sqlalchemy.inspector import SQLAlchemyGraphQLInspector from strawchemy.strawberry import default_session_getter from dataclasses import dataclass, field @dataclass class StrawchemyConfig: ...
@dataclass class StrawchemyConfig: '''Global configuration for Strawchemy. Attributes: dialect: The SQLAlchemy dialect being used. session_getter: Function to retrieve SQLAlchemy session from strawberry `Info` object. auto_snake_case: Automatically convert snake cased names to camel case...
3
2
3
0
2
1
1
1.71
0
1
1
0
1
0
1
1
42
4
14
12
12
24
14
12
12
1
0
0
1
327,912
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/config/databases.py
strawchemy.config.databases.DatabaseFeatures
from dataclasses import dataclass, field from typing import TYPE_CHECKING, Protocol from strawchemy.exceptions import StrawchemyError @dataclass(frozen=True) class DatabaseFeatures(Protocol): """Defines a protocol for database-specific features. Attributes: dialect: The SQL dialect supported by these ...
@dataclass(frozen=True) class DatabaseFeatures(Protocol): '''Defines a protocol for database-specific features. Attributes: dialect: The SQL dialect supported by these features. supports_lateral: Whether the database supports LATERAL joins. supports_distinct_on: Whether the database supp...
4
2
20
3
9
8
4
0.59
1
4
4
3
0
0
1
25
52
6
29
9
26
17
16
8
14
4
5
1
4
327,913
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/config/databases.py
strawchemy.config.databases.MySQLFeatures
from dataclasses import dataclass, field @dataclass(frozen=True) class MySQLFeatures(DatabaseFeatures): """Database features specific to MySQL.""" dialect: SupportedDialect = 'mysql'
@dataclass(frozen=True) class MySQLFeatures(DatabaseFeatures): '''Database features specific to MySQL.''' pass
2
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
25
4
1
2
2
1
1
2
2
1
0
6
0
0
327,914
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/config/databases.py
strawchemy.config.databases.PostgresFeatures
from dataclasses import dataclass, field @dataclass(frozen=True) class PostgresFeatures(DatabaseFeatures): """Database features specific to PostgreSQL.""" dialect: SupportedDialect = 'postgresql' supports_distinct_on: bool = True supports_lateral: bool = True supports_null_ordering: bool = True
@dataclass(frozen=True) class PostgresFeatures(DatabaseFeatures): '''Database features specific to PostgreSQL.''' pass
2
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
25
7
1
5
5
4
1
5
5
4
0
6
0
0
327,915
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/config/databases.py
strawchemy.config.databases.SQLiteFeatures
from dataclasses import dataclass, field @dataclass(frozen=True) class SQLiteFeatures(DatabaseFeatures): """Database features specific to SQLite.""" dialect: SupportedDialect = 'sqlite' aggregation_functions: set[AggregationFunction] = field(default_factory=lambda: {'min', 'max', 'sum', 'avg', 'count'})
@dataclass(frozen=True) class SQLiteFeatures(DatabaseFeatures): '''Database features specific to SQLite.''' pass
2
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
25
7
1
5
3
4
1
3
3
2
0
6
0
0
327,916
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/backend/pydantic.py
strawchemy.dto.backend.pydantic.MappedPydanticDTO
from strawchemy.dto.base import DTOBackend, DTOBase, DTOFieldDefinition, MappedDTO, ModelFieldT, ModelT class MappedPydanticDTO(_PydanticDTOBase, MappedDTO[ModelT]): ...
class MappedPydanticDTO(_PydanticDTOBase, MappedDTO[ModelT]): pass
1
0
0
0
0
0
0
0
2
0
0
1
0
0
0
85
1
0
1
1
1
0
2
1
1
0
6
0
0
327,917
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/backend/pydantic.py
strawchemy.dto.backend.pydantic.PydanticDTO
from strawchemy.dto.base import DTOBackend, DTOBase, DTOFieldDefinition, MappedDTO, ModelFieldT, ModelT class PydanticDTO(_PydanticDTOBase, DTOBase[ModelT]): ...
class PydanticDTO(_PydanticDTOBase, DTOBase[ModelT]): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
84
1
0
1
1
1
0
2
1
1
0
6
0
0
327,918
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/backend/pydantic.py
strawchemy.dto.backend.pydantic.PydanticDTOBackend
from pydantic import BaseModel, BeforeValidator, ConfigDict, create_model from strawchemy.utils import get_annotations from strawchemy.dto.base import DTOBackend, DTOBase, DTOFieldDefinition, MappedDTO, ModelFieldT, ModelT from inspect import getmodule from strawchemy.dto.types import DTOMissing from pydantic.fields im...
class PydanticDTOBackend(DTOBackend[PydanticDTOT]): '''Implements DTO factory using pydantic.''' def __init__(self, dto_base: type[PydanticDTOT]) -> None: pass def _construct_field_info(self, field_def: DTOFieldDefinition[ModelT, ModelFieldT]) -> FieldInfo: '''Build a `FieldInfo instance ...
7
2
17
1
15
1
5
0.05
1
12
2
0
4
1
4
31
74
9
62
30
46
3
40
18
35
13
6
2
20
327,919
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/backend/pydantic.py
strawchemy.dto.backend.pydantic._PydanticDTOBase
from pydantic import BaseModel, BeforeValidator, ConfigDict, create_model class _PydanticDTOBase(BaseModel): model_config = ConfigDict(from_attributes=True, arbitrary_types_allowed=True, populate_by_name=True)
class _PydanticDTOBase(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
2
0
0
0
82
2
0
2
2
1
0
2
2
1
0
5
0
0
327,920
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/backend/strawberry.py
strawchemy.dto.backend.strawberry.FieldInfo
from strawchemy.dto.types import DTOMissing from typing import TYPE_CHECKING, Any, Optional, TypeVar, Union, get_origin from strawberry.types.field import StrawberryField from dataclasses import dataclass @dataclass class FieldInfo: name: str type: Any field: Union[StrawberryField, type[DTOMissing]] = DTOM...
@dataclass class FieldInfo: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
4
0
4
2
3
0
4
2
3
0
0
0
0
327,921
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/backend/strawberry.py
strawchemy.dto.backend.strawberry.MappedStrawberryDTO
from strawchemy.dto.base import DTOBackend, DTOBase, MappedDTO, ModelFieldT, ModelT class MappedStrawberryDTO(MappedDTO[ModelT]): ...
class MappedStrawberryDTO(MappedDTO[ModelT]): pass
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
3
1
0
1
1
1
0
2
1
1
0
3
0
0
327,922
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/backend/strawberry.py
strawchemy.dto.backend.strawberry.StrawberrryDTOBackend
from __future__ import annotations import strawberry from inspect import getmodule from types import new_class from strawchemy.dto.base import DTOBackend, DTOBase, MappedDTO, ModelFieldT, ModelT from typing import TYPE_CHECKING, Any, Optional, TypeVar, Union, get_origin from strawchemy.utils import get_annotations from...
class StrawberrryDTOBackend(DTOBackend[AnnotatedDTOT]): def __init__(self, dto_base: type[AnnotatedDTOT]) -> None: pass def _construct_field_info(self, field_def: DTOFieldDefinition[ModelT, ModelFieldT]) -> FieldInfo: pass @classmethod def _is_private_attribute(cls, name: str) -> bool...
11
0
13
1
12
0
2
0
1
10
3
0
4
2
5
32
86
12
74
34
56
0
55
23
47
5
6
2
16
327,923
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/backend/strawberry.py
strawchemy.dto.backend.strawberry.StrawberryDTO
from strawchemy.dto.base import DTOBackend, DTOBase, MappedDTO, ModelFieldT, ModelT class StrawberryDTO(DTOBase[ModelT]): ...
class StrawberryDTO(DTOBase[ModelT]): pass
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
2
1
0
1
1
1
0
2
1
1
0
2
0
0
327,924
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/base.py
strawchemy.dto.base.DTOBackend
from typing import TYPE_CHECKING, Annotated, ClassVar, ForwardRef, Generic, Optional, Protocol, TypeVar, Union, cast, get_args, get_origin, get_type_hints, runtime_checkable import contextlib from types import new_class class DTOBackend(Protocol, Generic[DTOBaseT]): dto_base: type[DTOBaseT] def build(self, na...
class DTOBackend(Protocol, Generic[DTOBaseT]): def build(self, name: str, model: type[Any], field_definitions: Iterable[DTOFieldDefinition[Any, Any]], base: Optional[type[Any]]=None, **kwargs: Any) -> type[DTOBaseT]: '''Build a Data transfer object (DTO) from an SQAlchemy model. This inner factory...
4
2
13
2
5
6
1
1.19
2
9
1
3
3
0
3
27
44
9
16
11
5
19
9
4
5
1
5
1
3
327,925
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/base.py
strawchemy.dto.base.DTOBase
from typing import TYPE_CHECKING, Annotated, ClassVar, ForwardRef, Generic, Optional, Protocol, TypeVar, Union, cast, get_args, get_origin, get_type_hints, runtime_checkable from .types import DTOAuto, DTOConfig, DTOFieldConfig, DTOMissing, DTOSkip, DTOUnset, ExcludeFields, IncludeFields, Purpose, PurposeConfig class ...
class DTOBase(Generic[ModelT]): '''Base class to define DTO mapping classes.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
4
0
0
0
2
7
1
5
1
4
1
5
1
4
0
1
1
0
327,926
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/base.py
strawchemy.dto.base.DTOFactory
from strawchemy.graph import Node from __future__ import annotations from typing import TYPE_CHECKING, Annotated, ClassVar, ForwardRef, Generic, Optional, Protocol, TypeVar, Union, cast, get_args, get_origin, get_type_hints, runtime_checkable import warnings from strawchemy.dto.exceptions import DTOError, EmptyDTOError...
class DTOFactory(Generic[ModelT, ModelFieldT, DTOBaseT]): '''Base class for implementing DTO factory. Provide methods to inspect SQLAlchemy models and iterating over fields to convert. ''' def __init__(self, inspector: ModelInspector[ModelT, ModelFieldT], backend: DTOBackend[DTOBaseT], handle_cycl...
20
5
22
2
20
1
3
0.04
1
28
12
2
13
7
13
15
322
40
270
130
179
12
136
54
120
10
1
3
49
327,927
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/base.py
strawchemy.dto.base.DTOFieldDefinition
from .types import DTOAuto, DTOConfig, DTOFieldConfig, DTOMissing, DTOSkip, DTOUnset, ExcludeFields, IncludeFields, Purpose, PurposeConfig from typing_extensions import Self, TypeAlias, override from strawchemy.dto.exceptions import DTOError, EmptyDTOError from .utils import config from typing import TYPE_CHECKING, Ann...
@dataclass class DTOFieldDefinition(Generic[ModelT, ModelFieldT]): def __post_init__(self) -> None: pass @property def model_field(self) -> ModelFieldT: pass @model_field.setter def model_field(self) -> ModelFieldT: pass @property def has_model_field(self) -> bool: ...
29
0
4
0
4
0
2
0.02
1
9
4
1
14
0
14
16
112
21
89
48
61
2
74
33
59
8
1
1
26
327,928
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/base.py
strawchemy.dto.base.MappedDTO
from typing_extensions import Self, TypeAlias, override import dataclasses from typing import TYPE_CHECKING, Annotated, ClassVar, ForwardRef, Generic, Optional, Protocol, TypeVar, Union, cast, get_args, get_origin, get_type_hints, runtime_checkable from dataclasses import dataclass, field from .types import DTOAuto, DT...
class MappedDTO(DTOBase[ModelT]): '''Base class to define DTO mapping classes.''' def to_mapped(self, visitor: Optional[VisitorProtocol[ModelT]]=None, override: Optional[dict[str, Any]]=None, level: int=0) -> ModelT: '''Create an instance of `self.__d_model__`. Fill the bound SQLAlchemy model ...
2
2
59
8
48
3
14
0.08
1
13
4
2
1
0
1
3
62
9
49
15
42
4
32
7
30
14
2
2
14
327,929
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/base.py
strawchemy.dto.base.ModelInspector
from strawchemy.graph import Node from strawchemy.utils import is_type_hint_optional, non_optional_type_hint from .types import DTOAuto, DTOConfig, DTOFieldConfig, DTOMissing, DTOSkip, DTOUnset, ExcludeFields, IncludeFields, Purpose, PurposeConfig from typing import TYPE_CHECKING, Annotated, ClassVar, ForwardRef, Gener...
class ModelInspector(Protocol, Generic[ModelT, ModelFieldT]): def field_definitions(self, model: type[Any], dto_config: DTOConfig) -> Iterable[tuple[str, DTOFieldDefinition[ModelT, ModelFieldT]]]: pass def id_field_definitions(self, model: type[Any], dto_config: DTOConfig) -> list[tuple[str, DTOField...
13
0
2
0
2
0
1
0
2
12
4
1
12
0
12
36
38
11
27
22
17
0
28
14
15
3
5
1
14
327,930
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/base.py
strawchemy.dto.base.Reference
from dataclasses import dataclass, field from typing import TYPE_CHECKING, Annotated, ClassVar, ForwardRef, Generic, Optional, Protocol, TypeVar, Union, cast, get_args, get_origin, get_type_hints, runtime_checkable from typing_extensions import Self, TypeAlias, override from strawchemy.graph import Node @dataclass cla...
@dataclass class Reference(Generic[T, DTOBaseT]): @override def __repr__(self) -> str: pass
4
0
2
0
2
0
1
0
1
1
0
0
1
0
1
3
7
1
6
3
3
0
5
2
3
1
1
0
1
327,931
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/base.py
strawchemy.dto.base.Relation
from dataclasses import dataclass, field from typing import TYPE_CHECKING, Annotated, ClassVar, ForwardRef, Generic, Optional, Protocol, TypeVar, Union, cast, get_args, get_origin, get_type_hints, runtime_checkable from typing_extensions import Self, TypeAlias, override @dataclass class Relation(Generic[T, DTOBaseT]):...
@dataclass class Relation(Generic[T, DTOBaseT]): @override def __repr__(self) -> str: pass
4
0
2
0
2
0
1
0
1
1
0
0
1
0
1
3
9
1
8
7
5
0
7
6
5
1
1
0
1
327,932
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/base.py
strawchemy.dto.base.ToMappedProtocol
from typing import TYPE_CHECKING, Annotated, ClassVar, ForwardRef, Generic, Optional, Protocol, TypeVar, Union, cast, get_args, get_origin, get_type_hints, runtime_checkable @runtime_checkable class ToMappedProtocol(Protocol, Generic[ModelT]): def to_mapped(self, visitor: Optional[VisitorProtocol[ModelT]]=None, o...
@runtime_checkable class ToMappedProtocol(Protocol, Generic[ModelT]): def to_mapped(self, visitor: Optional[VisitorProtocol[ModelT]]=None, override: Optional[dict[str, Any]]=None, level: int=0) -> Any: pass
3
0
6
0
6
0
1
0
2
5
1
5
1
0
1
25
7
0
7
7
1
0
3
2
1
1
5
0
1
327,933
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/base.py
strawchemy.dto.base.VisitorProtocol
from typing import TYPE_CHECKING, Annotated, ClassVar, ForwardRef, Generic, Optional, Protocol, TypeVar, Union, cast, get_args, get_origin, get_type_hints, runtime_checkable class VisitorProtocol(Protocol, Generic[ModelT]): def field_value(self, parent: ToMappedProtocol[ModelT], field: DTOFieldDefinition[Any, Any...
class VisitorProtocol(Protocol, Generic[ModelT]): def field_value(self, parent: ToMappedProtocol[ModelT], field: DTOFieldDefinition[Any, Any], value: Any, level: int) -> Any: pass def model(self, parent: ToMappedProtocol[ModelT], model_cls: type[ModelT], params: dict[str, Any], override: dict[str, An...
3
0
6
0
6
0
1
0
2
6
2
1
2
0
2
26
13
1
12
12
2
0
5
3
2
1
5
0
2
327,934
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/exceptions.py
strawchemy.dto.exceptions.DTOError
class DTOError(Exception): ...
class DTOError(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
2
0
0
0
10
1
0
1
1
1
0
2
1
1
0
3
0
0
327,935
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/exceptions.py
strawchemy.dto.exceptions.EmptyDTOError
class EmptyDTOError(DTOError): ...
class EmptyDTOError(DTOError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
1
0
1
1
1
0
2
1
1
0
4
0
0
327,936
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/exceptions.py
strawchemy.dto.exceptions.ModelInspectorError
class ModelInspectorError(DTOError): ...
class ModelInspectorError(DTOError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
1
0
1
1
1
0
2
1
1
0
4
0
0
327,937
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/inspectors/sqlalchemy.py
strawchemy.dto.inspectors.sqlalchemy.SQLAlchemyInspector
from typing_extensions import TypeIs, override from sqlalchemy.orm import NO_VALUE, ColumnProperty, DeclarativeBase, Mapped, MappedAsDataclass, MappedSQLExpression, Mapper, QueryableAttribute, RelationshipDirection, RelationshipProperty, registry from inspect import getmodule, signature from strawchemy.dto.types import...
class SQLAlchemyInspector(ModelInspector[DeclarativeBase, QueryableAttribute[Any]]): def __init__(self, registries: Optional[list[registry]]=None) -> None: '''Initialize internal state to keep track of generated DTOs.''' pass def _update_mapped_classes(self, mapper: Mapper[Any]) -> None: ...
56
3
9
0
8
1
2
0.08
1
26
9
1
23
4
32
68
338
45
274
116
200
22
177
71
143
15
6
4
79
327,938
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/types.py
strawchemy.dto.types.DTOAuto
from typing import TYPE_CHECKING, Any, Literal, Optional, Union, final, get_type_hints @final class DTOAuto: ...
@final class DTOAuto: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
1
0
2
1
1
0
0
0
0
327,939
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/types.py
strawchemy.dto.types.DTOConfig
from typing import TYPE_CHECKING, Any, Literal, Optional, Union, final, get_type_hints from dataclasses import dataclass, field from strawchemy.utils import get_annotations import dataclasses @dataclass class DTOConfig: """Control the generated DTO. This class holds configuration settings that influence how a...
@dataclass class DTOConfig: '''Control the generated DTO. This class holds configuration settings that influence how a Data Transfer Object (DTO) is generated by the DTO factory. It allows customization of field inclusion/exclusion, optionality, type hints, and field aliasing based on the intended p...
6
3
20
1
16
3
6
0.72
0
11
1
0
4
0
4
4
142
11
76
34
58
55
46
21
41
11
0
2
24
327,940
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/types.py
strawchemy.dto.types.DTOFieldConfig
from dataclasses import dataclass, field @dataclass class DTOFieldConfig: """For configuring DTO behavior on SQLAlchemy model fields.""" purposes: set[Purpose] = field(default_factory=lambda: {Purpose.READ, Purpose.WRITE}) default_config: PurposeConfig = field(default_factory=PurposeConfig) configs: di...
@dataclass class DTOFieldConfig: '''For configuring DTO behavior on SQLAlchemy model fields.''' def purpose_config(self, dto_config: DTOConfig) -> PurposeConfig: pass
3
1
2
0
2
0
1
0.17
0
3
3
0
1
0
1
1
9
2
6
5
4
1
6
5
4
1
0
0
1
327,941
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/types.py
strawchemy.dto.types.DTOMissing
from typing import TYPE_CHECKING, Any, Literal, Optional, Union, final, get_type_hints @final class DTOMissing: """A sentinel type to detect if a parameter is supplied or not when. constructing pydantic FieldInfo. """
@final class DTOMissing: '''A sentinel type to detect if a parameter is supplied or not when. constructing pydantic FieldInfo. ''' pass
2
1
0
0
0
0
0
3
0
0
0
0
0
0
0
0
5
1
1
1
0
3
1
1
0
0
0
0
0
327,942
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/types.py
strawchemy.dto.types.DTOSkip
from typing import TYPE_CHECKING, Any, Literal, Optional, Union, final, get_type_hints @final class DTOSkip: ...
@final class DTOSkip: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
1
0
2
1
1
0
0
0
0
327,943
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/types.py
strawchemy.dto.types.DTOUnset
from typing import TYPE_CHECKING, Any, Literal, Optional, Union, final, get_type_hints from typing_extensions import TypeAlias, override @final class DTOUnset: @override def __str__(self) -> str: return '' @override def __repr__(self) -> str: return 'DTOUnset' def __bool__(self) ...
@final class DTOUnset: @override def __str__(self) -> str: pass @override def __repr__(self) -> str: pass def __bool__(self) -> bool: pass
7
0
2
0
2
0
1
0
0
2
0
0
3
0
3
3
11
2
9
6
3
0
7
4
3
1
0
0
3
327,944
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/types.py
strawchemy.dto.types.Purpose
from enum import Enum class Purpose(str, Enum): """For identifying the purpose of a DTO to the factory. The factory will exclude fields marked as private or read-only on the domain model depending on the purpose of the DTO. Example: ```python ReadDTO = dto.factory("AuthorReadDTO", Author, pur...
class Purpose(str, Enum): '''For identifying the purpose of a DTO to the factory. The factory will exclude fields marked as private or read-only on the domain model depending on the purpose of the DTO. Example: ```python ReadDTO = dto.factory("AuthorReadDTO", Author, purpose=dto.Purpose.READ) ...
1
1
0
0
0
0
0
3.5
2
0
0
0
0
0
0
115
21
3
4
4
3
14
4
4
3
0
4
0
0
327,945
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/dto/types.py
strawchemy.dto.types.PurposeConfig
from typing import TYPE_CHECKING, Any, Literal, Optional, Union, final, get_type_hints from dataclasses import dataclass, field @dataclass class PurposeConfig: """Mark the field as read-only, or private.""" type_override: Optional[Any] = DTOMissing validator: Optional[Callable[[Any], Any]] = None 'Sing...
@dataclass class PurposeConfig: '''Mark the field as read-only, or private.''' pass
2
1
0
0
0
0
0
0.6
0
0
0
0
0
0
0
0
9
1
5
5
4
3
5
5
4
0
0
0
0
327,946
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/exceptions.py
strawchemy.exceptions.StrawchemyError
class StrawchemyError(Exception): ...
class StrawchemyError(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
1
0
1
1
1
0
2
1
1
0
3
0
0
327,947
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/graph.py
strawchemy.graph.GraphError
class GraphError(Exception): ...
class GraphError(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
1
0
1
1
1
0
2
1
1
0
3
0
0
327,948
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/graph.py
strawchemy.graph.GraphMetadata
from dataclasses import dataclass, field from typing import TYPE_CHECKING, Any, Generic, Literal, Optional, TypeVar, Union, overload @dataclass class GraphMetadata(Generic[T]): metadata: T count: int = 0
@dataclass class GraphMetadata(Generic[T]): pass
2
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
3
0
3
2
2
0
3
2
2
0
1
0
0
327,949
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/graph.py
strawchemy.graph.Node
from dataclasses import dataclass, field from typing import TYPE_CHECKING, Any, Generic, Literal, Optional, TypeVar, Union, overload from collections import deque import dataclasses import sys from typing_extensions import Self, TypeAlias, override @dataclass class Node(Generic[NodeValueT, NodeMetadataT]): """Very...
@dataclass class Node(Generic[NodeValueT, NodeMetadataT]): '''Very minimalist implementation of a direct graph.''' def __post_init__(self) -> None: '''Initialize node level and root after instance creation. This method is automatically called after the dataclass is initialized. It sets ...
56
21
10
1
5
4
2
0.67
1
14
3
1
35
0
38
38
453
79
224
144
118
150
149
70
110
6
1
2
65
327,950
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/graph.py
strawchemy.graph.NodeMetadata
from typing import TYPE_CHECKING, Any, Generic, Literal, Optional, TypeVar, Union, overload from dataclasses import dataclass, field @dataclass class NodeMetadata(Generic[T]): data: T
@dataclass class NodeMetadata(Generic[T]): pass
2
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
327,951
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/mapper.py
strawchemy.mapper.Strawchemy
import dataclasses from .strawberry._registry import StrawberryRegistry from strawchemy.strawberry.factories.enum import EnumDTOBackend, UpsertConflictFieldsEnumDTOBackend from .strawberry.factories.inputs import AggregateFilterDTOFactory, BooleanFilterDTOFactory from strawchemy.strawberry.factories.aggregations import...
class Strawchemy: '''Main entry point for integrating SQLAlchemy models with Strawberry GraphQL. This class provides a cohesive interface to generate Strawberry GraphQL types, inputs, filters, and fields based on SQLAlchemy models. It manages configuration, type registration, and various factories for ...
15
10
56
3
33
20
3
0.64
0
32
21
0
11
23
11
11
657
48
371
231
193
238
79
64
66
7
0
1
33
327,952
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_executor.py
strawchemy.sqlalchemy._executor.AsyncQueryExecutor
from dataclasses import dataclass from .typing import AnyAsyncSession, AnySyncSession, DeclarativeT from typing import TYPE_CHECKING, Any, Generic, Literal, Optional, Union @dataclass class AsyncQueryExecutor(QueryExecutor[DeclarativeT]): """Extends QueryExecutor to provide asynchronous query execution. This ...
@dataclass class AsyncQueryExecutor(QueryExecutor[DeclarativeT]): '''Extends QueryExecutor to provide asynchronous query execution. This class inherits the query building capabilities of `QueryExecutor` and adapts them for an asynchronous environment. It uses an `AnyAsyncSession` to execute the SQLAlche...
5
4
13
3
2
8
1
4.43
1
3
1
0
3
0
3
5
52
14
7
4
3
31
7
4
3
1
2
0
3
327,953
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_executor.py
strawchemy.sqlalchemy._executor.NodeResult
from typing import TYPE_CHECKING, Any, Generic, Literal, Optional, Union import dataclasses from strawchemy.dto import ModelT from dataclasses import dataclass from typing_extensions import Self @dataclass class NodeResult(Generic[ModelT]): """Represents a single node result from a query. Attributes: ...
@dataclass class NodeResult(Generic[ModelT]): '''Represents a single node result from a query. Attributes: model: The SQLAlchemy model instance. computed_values: A dictionary of computed values for this node. node_key: A callable to generate a key for a query node type. ''' def ...
4
3
13
3
3
8
2
2.1
1
1
0
0
2
0
2
2
40
9
10
3
7
21
10
3
7
2
1
1
3
327,954
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_executor.py
strawchemy.sqlalchemy._executor.QueryExecutor
from typing import TYPE_CHECKING, Any, Generic, Literal, Optional, Union from collections import defaultdict from dataclasses import dataclass import dataclasses from .typing import AnyAsyncSession, AnySyncSession, DeclarativeT @dataclass class QueryExecutor(Generic[DeclarativeT]): """Executes SQLAlchemy queries a...
@dataclass class QueryExecutor(Generic[DeclarativeT]): '''Executes SQLAlchemy queries and converts the results into QueryResult objects. This class provides methods for executing SQLAlchemy queries and converting the results into QueryResult objects. It supports applying unique constraints, handling roo...
4
3
24
3
16
6
4
0.43
1
7
1
2
2
0
2
2
62
9
37
19
32
16
29
17
26
6
1
1
8
327,955
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_executor.py
strawchemy.sqlalchemy._executor.QueryResult
from strawchemy.dto import ModelT from typing import TYPE_CHECKING, Any, Generic, Literal, Optional, Union from dataclasses import dataclass from typing_extensions import Self from .exceptions import QueryResultError import dataclasses from collections import defaultdict @dataclass class QueryResult(Generic[ModelT]): ...
@dataclass class QueryResult(Generic[ModelT]): '''Represents the result of a GraphQL query. This class holds the nodes (data objects) returned by the query, computed values for each node, and computed values for the query itself. Attributes: nodes: A sequence of data objects of type ModelT. ...
8
6
11
2
4
5
2
1.29
1
10
2
0
6
0
6
6
89
18
31
17
24
40
27
15
20
2
1
1
11
327,956
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_executor.py
strawchemy.sqlalchemy._executor.SyncQueryExecutor
from dataclasses import dataclass from .typing import AnyAsyncSession, AnySyncSession, DeclarativeT from typing import TYPE_CHECKING, Any, Generic, Literal, Optional, Union @dataclass class SyncQueryExecutor(QueryExecutor[DeclarativeT]): """Extends QueryExecutor to provide synchronous query execution. This cl...
@dataclass class SyncQueryExecutor(QueryExecutor[DeclarativeT]): '''Extends QueryExecutor to provide synchronous query execution. This class inherits the query building capabilities of `QueryExecutor` and adapts them for a synchronous environment. It uses an `AnySyncSession` to execute the SQLAlchemy st...
5
4
13
3
2
8
1
4.43
1
3
1
0
3
0
3
5
52
14
7
4
3
31
7
4
3
1
2
0
3
327,957
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_query.py
strawchemy.sqlalchemy._query.AggregationJoin
from sqlalchemy.sql import ColumnElement, SQLColumnExpression from sqlalchemy.orm import QueryableAttribute, RelationshipDirection, RelationshipProperty, aliased, class_mapper, raiseload from sqlalchemy.sql.elements import NamedColumn from sqlalchemy.orm.util import AliasedClass from sqlalchemy import CTE, AliasedRetur...
class AggregationJoin(Join): '''Represents a join specifically for aggregation purposes, often involving a subquery. This class extends `Join` and is used when aggregations (e.g., counts, sums) need to be performed on related entities. It manages a subquery that computes these aggregations and ensures ...
8
6
17
2
9
5
3
0.69
1
8
0
0
6
3
6
16
120
22
58
28
42
40
46
17
39
5
1
3
18
327,958
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_query.py
strawchemy.sqlalchemy._query.Conjunction
from dataclasses import dataclass from sqlalchemy.sql import ColumnElement, SQLColumnExpression import dataclasses from sqlalchemy import CTE, AliasedReturnsRows, BooleanClauseList, Label, Lateral, Select, Subquery, UnaryExpression, func, inspect, null, select @dataclass class Conjunction: """Represents a group of...
@dataclass class Conjunction: '''Represents a group of SQLAlchemy filter expressions and their associated joins. A conjunction typically corresponds to a set of conditions that are ANDed together in a WHERE clause. It also tracks the common join path required by these expressions to ensure correct query...
3
2
15
2
6
7
2
1.9
0
1
0
0
1
0
1
1
35
6
10
5
8
19
8
5
6
2
0
1
2
327,959
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_query.py
strawchemy.sqlalchemy._query.DistinctOn
from sqlalchemy.orm import QueryableAttribute, RelationshipDirection, RelationshipProperty, aliased, class_mapper, raiseload from sqlalchemy import CTE, AliasedReturnsRows, BooleanClauseList, Label, Lateral, Select, Subquery, UnaryExpression, func, inspect, null, select from typing import TYPE_CHECKING, Any, Generic, O...
@dataclass class DistinctOn: '''Manages the DISTINCT ON clause for a SQLAlchemy query. This class is responsible for generating the expressions for a `DISTINCT ON` clause. It ensures that the fields used in `DISTINCT ON` are compatible with the database and align with the initial fields of any `ORDER BY...
7
4
15
2
5
8
2
1.65
0
6
2
0
3
0
3
3
65
12
20
8
14
33
15
6
11
4
0
2
6
327,960
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_query.py
strawchemy.sqlalchemy._query.HookApplier
from dataclasses import dataclass from sqlalchemy.orm.util import AliasedClass from typing import TYPE_CHECKING, Any, Generic, Optional, Union, cast from sqlalchemy import CTE, AliasedReturnsRows, BooleanClauseList, Label, Lateral, Select, Subquery, UnaryExpression, func, inspect, null, select from .typing import Decla...
@dataclass class HookApplier: '''Manages and applies query hooks to SQLAlchemy SELECT statements. This class is responsible for invoking registered `QueryHook` instances at appropriate points during the construction of a SQLAlchemy query. Hooks can modify the statement, for example, by adding columns, a...
3
2
44
4
16
24
3
1.76
0
4
0
0
1
0
1
1
66
8
21
13
12
37
12
6
10
3
0
2
3
327,961
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_query.py
strawchemy.sqlalchemy._query.Join
from sqlalchemy.orm import QueryableAttribute, RelationshipDirection, RelationshipProperty, aliased, class_mapper, raiseload from sqlalchemy import CTE, AliasedReturnsRows, BooleanClauseList, Label, Lateral, Select, Subquery, UnaryExpression, func, inspect, null, select from typing import TYPE_CHECKING, Any, Generic, O...
class Join: '''Represents a join to be applied to a SQLAlchemy query. This class encapsulates information about a join, including the target entity, the corresponding query node, join conditions, and ordering information. Attributes: target: The SQLAlchemy entity, CTE, or aliased class to join ...
16
10
5
0
4
1
1
0.48
0
5
0
1
10
5
10
10
74
12
42
28
19
20
27
16
16
2
0
1
12
327,962
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_query.py
strawchemy.sqlalchemy._query.OrderBy
from .typing import DeclarativeT, OrderBySpec from sqlalchemy.sql import ColumnElement, SQLColumnExpression from dataclasses import dataclass from sqlalchemy import CTE, AliasedReturnsRows, BooleanClauseList, Label, Lateral, Select, Subquery, UnaryExpression, func, inspect, null, select import dataclasses from strawche...
@dataclass class OrderBy: '''Manages the ORDER BY clause components for a SQLAlchemy query. This class stores the columns to order by, their respective ordering directions (ASC, DESC, with NULLS FIRST/LAST handling), and any joins required to access these columns. It also considers database-specific fea...
5
3
23
2
14
7
7
0.79
0
3
1
0
2
0
2
2
68
9
33
9
29
26
23
8
20
11
0
1
13
327,963
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_query.py
strawchemy.sqlalchemy._query.Query
from .typing import DeclarativeT, OrderBySpec from typing import TYPE_CHECKING, Any, Generic, Optional, Union, cast import dataclasses from sqlalchemy.sql import ColumnElement, SQLColumnExpression from dataclasses import dataclass from sqlalchemy import CTE, AliasedReturnsRows, BooleanClauseList, Label, Lateral, Select...
@dataclass class Query: '''Encapsulates all components required to build a SQLAlchemy query. This class acts as a container for various parts of a query, such as database-specific features, distinct clauses, joins, filtering conditions (WHERE), ordering (ORDER BY), root-level aggregation functions, and ...
6
4
28
4
11
14
4
1.49
0
4
0
0
3
0
3
3
123
17
43
18
38
64
35
16
31
9
0
1
13
327,964
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_query.py
strawchemy.sqlalchemy._query.QueryGraph
from strawchemy.graph import merge_trees from typing import TYPE_CHECKING, Any, Generic, Optional, Union, cast import dataclasses from strawchemy.strawberry.dto import BooleanFilterDTO, EnumDTO, Filter, GraphQLFieldDefinition, OrderByDTO, OrderByEnum, QueryNode from dataclasses import dataclass from functools import ca...
@dataclass class QueryGraph(Generic[DeclarativeT]): '''Represents the structure and components of a GraphQL query to be translated to SQLAlchemy. This class holds information about the selected fields (selection_tree), ordering, distinct clauses, and filters. It processes these components to build vario...
7
4
18
2
12
5
4
0.6
1
3
1
0
4
0
4
4
108
15
58
24
52
35
49
23
44
7
1
2
17
327,965
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_query.py
strawchemy.sqlalchemy._query.SubqueryBuilder
from sqlalchemy.sql import ColumnElement, SQLColumnExpression from functools import cached_property import dataclasses from sqlalchemy import CTE, AliasedReturnsRows, BooleanClauseList, Label, Lateral, Select, Subquery, UnaryExpression, func, inspect, null, select from sqlalchemy.orm.util import AliasedClass from .typi...
@dataclass class SubqueryBuilder(Generic[DeclarativeT]): '''Builds and manages aliased subqueries, often for DISTINCT ON emulation. This utility class is responsible for constructing aliased subqueries, particularly useful for emulating `DISTINCT ON` behavior with window functions (e.g., `ROW_NUMBER()`)...
9
6
22
3
9
11
2
1.34
1
6
2
0
5
0
5
5
140
23
50
16
42
67
29
13
23
5
1
1
9
327,966
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_query.py
strawchemy.sqlalchemy._query.Where
from typing_extensions import Self from dataclasses import dataclass from sqlalchemy.sql import ColumnElement, SQLColumnExpression import dataclasses @dataclass class Where: """Represents the WHERE clause of a SQLAlchemy query. This class encapsulates the filter conditions (as a `Conjunction`) and any add...
@dataclass class Where: '''Represents the WHERE clause of a SQLAlchemy query. This class encapsulates the filter conditions (as a `Conjunction`) and any additional joins specifically required by these conditions. Attributes: conjunction: A `Conjunction` object holding the filter expressions ...
7
4
6
1
2
3
1
1.64
0
3
1
0
2
0
3
3
37
8
11
8
5
18
9
6
5
1
0
0
3
327,967
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_scope.py
strawchemy.sqlalchemy._scope.AggregationFunctionInfo
from typing_extensions import Self, TypeAlias, override from .exceptions import TranspilingError from typing import TYPE_CHECKING, Any, ClassVar, Generic, Optional, Union from sqlalchemy.orm import DeclarativeBase, Mapper, MapperProperty, QueryableAttribute, RelationshipProperty, aliased from dataclasses import datacla...
@dataclass class AggregationFunctionInfo: '''Information about a SQL function and its application context. A helper class that encapsulates information about how a SQL function should be applied in query building. Used internally by NodeInspect to map GraphQL functions to their SQLAlchemy equivalents. ...
5
3
21
4
6
12
2
1.26
0
3
1
0
1
0
2
2
73
12
27
9
23
34
16
8
13
2
0
1
4
327,968
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_scope.py
strawchemy.sqlalchemy._scope.ColumnTransform
from dataclasses import dataclass from sqlalchemy.dialects import postgresql from sqlalchemy import cast as sqla_cast from sqlalchemy import ColumnElement, FromClause, Function, Label, Select, func, inspect from sqlalchemy.orm import DeclarativeBase, Mapper, MapperProperty, QueryableAttribute, RelationshipProperty, ali...
@dataclass(frozen=True) class ColumnTransform: '''Represents a transformed SQLAlchemy column attribute. This dataclass typically stores a `QueryableAttribute` that has undergone some transformation, such as being labeled or having a function applied (e.g., for JSON extraction). Instances are usually cre...
6
3
27
4
7
16
2
2.59
0
2
1
0
0
0
2
2
75
14
17
8
10
44
9
4
6
2
0
1
3
327,969
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_scope.py
strawchemy.sqlalchemy._scope.NodeInspect
from sqlalchemy import ColumnElement, FromClause, Function, Label, Select, func, inspect from sqlalchemy.orm.util import AliasedClass from sqlalchemy import distinct as sqla_distinct from sqlalchemy.orm import DeclarativeBase, Mapper, MapperProperty, QueryableAttribute, RelationshipProperty, aliased from strawchemy.con...
class NodeInspect: '''Inspection helper for SQLAlchemy query nodes. Provides functionality to inspect and process SQLAlchemy query nodes within a QueryScope context. Handles function mapping, foreign key resolution, and property access for query nodes. Attributes: node (QueryNodeType): The quer...
21
15
24
3
9
12
2
1.55
0
11
4
0
14
2
14
14
382
61
126
62
93
195
84
43
69
5
0
3
33
327,970
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_scope.py
strawchemy.sqlalchemy._scope.QueryScope
from typing import TYPE_CHECKING, Any, ClassVar, Generic, Optional, Union from strawchemy.dto.types import DTOConfig, Purpose from collections import defaultdict from strawchemy.strawberry.dto import GraphQLFieldDefinition, QueryNode from .inspector import SQLAlchemyInspector from sqlalchemy import ColumnElement, FromC...
class QueryScope(Generic[DeclarativeT]): '''Manages the context for building SQLAlchemy queries from GraphQL queries. The QueryScope class is responsible for maintaining the state and context required to transpile a GraphQL query into a SQLAlchemy query. It manages aliases for tables and relationships,...
22
10
19
2
8
8
2
1.24
1
17
8
0
17
15
17
17
370
58
139
74
101
173
103
52
85
5
1
2
39
327,971
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/_transpiler.py
strawchemy.sqlalchemy._transpiler.QueryTranspiler
from .exceptions import TranspilingError from .typing import DeclarativeT, OrderBySpec, QueryExecutorT import dataclasses from strawchemy.constants import AGGREGATIONS_KEY from strawchemy.strawberry.filters import GraphQLComparison from ._executor import SyncQueryExecutor from collections import defaultdict from strawc...
class QueryTranspiler(Generic[DeclarativeT]): '''Transpiles a GraphQL query into a SQLAlchemy query.''' def __init__(self, model: type[DeclarativeT], dialect: Dialect, statement: Optional[Select[tuple[DeclarativeT]]]=None, scope: Optional[QueryScope[DeclarativeT]]=None, query_hooks: Optional[defaultdict[Query...
29
25
32
3
20
9
4
0.44
1
36
24
0
26
8
26
26
867
107
526
207
455
234
342
159
315
10
1
3
99
327,972
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/exceptions.py
strawchemy.sqlalchemy.exceptions.QueryHookError
class QueryHookError(Exception): """Raised when an error occurs within a query hook's execution."""
class QueryHookError(Exception): '''Raised when an error occurs within a query hook's execution.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
10
2
0
1
1
0
1
1
1
0
0
3
0
0
327,973
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/exceptions.py
strawchemy.sqlalchemy.exceptions.QueryResultError
class QueryResultError(Exception): """Raised when an error occurs during query result processing or mapping."""
class QueryResultError(Exception): '''Raised when an error occurs during query result processing or mapping.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
10
2
0
1
1
0
1
1
1
0
0
3
0
0
327,974
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/exceptions.py
strawchemy.sqlalchemy.exceptions.TranspilingError
class TranspilingError(Exception): """Raised when an error occurs during transpiling."""
class TranspilingError(Exception): '''Raised when an error occurs during transpiling.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
10
2
0
1
1
0
1
1
1
0
0
3
0
0
327,975
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/hook.py
strawchemy.sqlalchemy.hook.QueryHook
from sqlalchemy.orm import ColumnProperty, RelationshipProperty, joinedload, selectinload, undefer from contextvars import ContextVar from sqlalchemy.orm.util import AliasedClass from .exceptions import QueryHookError from .typing import DeclarativeT from sqlalchemy.orm.strategy_options import _AbstractLoad from typing...
@dataclass class QueryHook(Generic[DeclarativeT]): '''Base class for defining custom query modifications and data loading strategies. `QueryHook` instances are used to dynamically alter SQLAlchemy queries, primarily for specifying which columns and relationships should be eagerly loaded. This is often d...
10
7
21
3
9
9
3
1.13
1
5
1
6
7
0
7
7
178
31
69
37
52
78
56
27
48
7
1
3
24
327,976
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/inspector.py
strawchemy.sqlalchemy.inspector.SQLAlchemyGraphQLInspector
from sqlalchemy.orm import NO_VALUE, DeclarativeBase, QueryableAttribute, registry from typing import TYPE_CHECKING, Any, Dict, Optional, TypeVar from strawchemy.strawberry.filters.inputs import make_full_json_comparison_input, make_sqlite_json_comparison_input from strawchemy.constants import GEO_INSTALLED from strawc...
class SQLAlchemyGraphQLInspector(SQLAlchemyInspector): '''Inspects SQLAlchemy models to determine appropriate GraphQL filter types. This inspector extends `SQLAlchemyInspector` to provide mappings from SQLAlchemy model attributes and Python types to specific GraphQL comparison filter input types (e.g.,...
9
7
20
3
7
11
2
1.72
1
12
6
0
4
2
6
74
141
27
43
24
24
74
31
15
21
3
7
2
12
327,977
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/repository/_async.py
strawchemy.sqlalchemy.repository._async.SQLAlchemyGraphQLAsyncRepository
from strawchemy.sqlalchemy._executor import AsyncQueryExecutor, QueryResult from strawchemy.strawberry.mutation.input import UpsertData from ._base import InsertData, MutationData, SQLAlchemyGraphQLRepository from sqlalchemy.orm import RelationshipProperty from sqlalchemy import ColumnElement, Row, and_, delete, inspec...
class SQLAlchemyGraphQLAsyncRepository(SQLAlchemyGraphQLRepository[DeclarativeT, AnyAsyncSession]): async def _insert_many(self, data: InsertData) -> Sequence[Row[Any]]: pass async def _insert_nested(self, data: InsertData, level: LevelInput) -> None: '''Inserts multiple records for a given model...
20
10
28
2
18
8
3
0.42
1
21
13
0
19
2
19
27
547
56
346
167
260
146
180
97
160
9
2
4
58
327,978
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/repository/_base.py
strawchemy.sqlalchemy.repository._base.InsertData
from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Generic, Literal, Optional, TypeVar, Union from strawchemy.exceptions import StrawchemyError from sqlalchemy import Column, Function, Insert, Row, func, insert @dataclass(frozen=True) class InsertData: model_type: type[DeclarativeBase] va...
@dataclass(frozen=True) class InsertData: @property def is_upsert(self) -> bool: pass @property def upsert_data_or_raise(self) -> UpsertData: pass def conflict_target_columns(self) -> list[Column[Any]]: pass def upsert_set(self, dialect: SupportedDialect, columns: Read...
8
0
8
0
8
0
2
0
0
7
2
0
4
0
4
4
41
4
37
16
28
0
22
10
17
2
0
1
7
327,979
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/repository/_base.py
strawchemy.sqlalchemy.repository._base.MutationData
from typing import TYPE_CHECKING, Any, Generic, Literal, Optional, TypeVar, Union from strawchemy.sqlalchemy.typing import DeclarativeT, QueryExecutorT, SessionT from dataclasses import dataclass @dataclass(frozen=True) class MutationData(Generic[DeclarativeT]): mode: InsertOrUpdate input: Input[DeclarativeT] ...
@dataclass(frozen=True) class MutationData(Generic[DeclarativeT]): pass
2
0
0
0
0
0
0
0
1
0
0
0
0
0
0
2
6
0
6
4
5
0
6
4
5
0
1
0
0
327,980
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/repository/_base.py
strawchemy.sqlalchemy.repository._base.SQLAlchemyGraphQLRepository
from strawchemy.strawberry.mutation.types import RelationType from typing import TYPE_CHECKING, Any, Generic, Literal, Optional, TypeVar, Union from strawchemy.exceptions import StrawchemyError from strawchemy.dto.inspectors.sqlalchemy import SQLAlchemyInspector from sqlalchemy import Column, Function, Insert, Row, fun...
class SQLAlchemyGraphQLRepository(Generic[DeclarativeT, SessionT]): def __init__(self, model: type[DeclarativeT], session: SessionT, statement: Optional[Select[tuple[DeclarativeT]]]=None, execution_options: Optional[dict[str, Any]]=None, deterministic_ordering: bool=False) -> None: pass def _get_quer...
7
0
16
0
16
0
3
0.02
1
19
10
2
6
6
6
8
102
6
95
42
69
2
43
23
36
5
1
2
17
327,981
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/sqlalchemy/repository/_sync.py
strawchemy.sqlalchemy.repository._sync.SQLAlchemyGraphQLSyncRepository
from sqlalchemy import ColumnElement, Row, and_, delete, inspect, select, update from strawchemy.sqlalchemy._transpiler import QueryTranspiler from strawchemy.sqlalchemy.typing import AnySyncSession, DeclarativeT from typing import TYPE_CHECKING, Any, NamedTuple, Optional, TypeVar from strawchemy.strawberry.mutation.ty...
class SQLAlchemyGraphQLSyncRepository(SQLAlchemyGraphQLRepository[DeclarativeT, AnySyncSession]): def _insert_many(self, data: InsertData) -> Sequence[Row[Any]]: pass def _insert_nested(self, data: InsertData, level: LevelInput) -> None: '''Inserts multiple records for a given model type and ...
20
10
28
2
18
8
3
0.42
1
21
13
0
19
2
19
27
545
56
344
165
260
146
180
97
160
9
2
4
58
327,982
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/_field.py
strawchemy.strawberry._field.StrawchemyCreateMutationField
from typing import TYPE_CHECKING, Any, Literal, Optional, TypeVar, Union, cast, get_args, get_origin from strawberry.annotation import StrawberryAnnotation from strawchemy.constants import DATA_KEY, DISTINCT_ON_KEY, FILTER_KEY, LIMIT_KEY, NODES_KEY, OFFSET_KEY, ORDER_BY_KEY, UPSERT_CONFLICT_FIELDS, UPSERT_UPDATE_FIELDS...
class StrawchemyCreateMutationField(_StrawchemyInputMutationField, _StrawchemyMutationField): def _create_resolver(self, info: Info, data: Union[AnyMappedDTO, Sequence[AnyMappedDTO]]) -> Union[_CreateOrUpdateResolverResult, Coroutine[_CreateOrUpdateResolverResult, Any, Any]]: pass @override def au...
6
0
6
0
6
0
2
0
2
7
3
0
3
0
3
36
24
2
22
13
12
0
16
6
12
3
3
1
6
327,983
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/_field.py
strawchemy.strawberry._field.StrawchemyDeleteMutationField
from strawchemy.strawberry.dto import BooleanFilterDTO, EnumDTO, MappedStrawberryGraphQLDTO, OrderByDTO, StrawchemyDTOAttributes from .exceptions import StrawchemyFieldError from typing import TYPE_CHECKING, Any, Literal, Optional, TypeVar, Union, cast, get_args, get_origin from strawberry.types.base import StrawberryL...
class StrawchemyDeleteMutationField(StrawchemyField, _StrawchemyMutationField): def __init__(self, input_type: Optional[type[BooleanFilterDTO]]=None, *args: Any, **kwargs: Any) -> None: pass def _delete_resolver(self, info: Info, filter_input: Optional[BooleanFilterDTO]=None) -> Union[_CreateOrUpdate...
9
0
8
0
7
0
2
0.02
2
8
3
0
5
2
5
37
46
4
41
24
21
1
20
10
14
2
2
1
8
327,984
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/_field.py
strawchemy.strawberry._field.StrawchemyField
from strawchemy.strawberry.dto import BooleanFilterDTO, EnumDTO, MappedStrawberryGraphQLDTO, OrderByDTO, StrawchemyDTOAttributes from strawchemy.dto.types import DTOConfig, Purpose from inspect import isclass import dataclasses from typing import TYPE_CHECKING, Any, Literal, Optional, TypeVar, Union, cast, get_args, ge...
class StrawchemyField(StrawberryField): '''A custom field class for Strawberry GraphQL that allows explicit handling of resolver arguments. This class extends the default Strawberry field functionality by allowing the specification of a list of arguments that the resolver function accepts, instead of pulli...
54
1
11
0
10
0
2
0.07
1
30
13
2
29
24
30
30
384
36
336
160
217
23
144
69
113
8
1
2
65
327,985
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/_field.py
strawchemy.strawberry._field.StrawchemyUpdateMutationField
from typing_extensions import Self, TypeAlias, TypeIs, override from typing import TYPE_CHECKING, Any, Literal, Optional, TypeVar, Union, cast, get_args, get_origin from .exceptions import StrawchemyFieldError from strawchemy.strawberry.dto import BooleanFilterDTO, EnumDTO, MappedStrawberryGraphQLDTO, OrderByDTO, Straw...
class StrawchemyUpdateMutationField(_StrawchemyInputMutationField, _StrawchemyMutationField): @override def _validate_type(self, type_: Union[Union[StrawberryType, type[WithStrawberryObjectDefinition]], Any]) -> None: pass def _update_by_ids_resolver(self, info: Info, data: Union[AnyMappedDTO, Se...
9
0
10
0
9
0
3
0
2
10
5
0
5
1
5
38
56
5
51
24
36
0
34
12
28
4
3
1
14
327,986
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/_field.py
strawchemy.strawberry._field.StrawchemyUpsertMutationField
from typing import TYPE_CHECKING, Any, Literal, Optional, TypeVar, Union, cast, get_args, get_origin from strawchemy.strawberry.mutation.input import Input from .repository import StrawchemyAsyncRepository from collections.abc import Sequence from strawberry.annotation import StrawberryAnnotation from strawchemy.strawb...
class StrawchemyUpsertMutationField(_StrawchemyInputMutationField, _StrawchemyMutationField): def __init__(self, input_type: type[MappedGraphQLDTO[T]], update_fields_enum: type[EnumDTO], conflict_fields_enum: type[EnumDTO], *args: Any, **kwargs: Any) -> None: pass def _upsert_resolver(self, info: Inf...
7
0
14
0
14
0
2
0
2
11
5
0
4
2
4
37
63
3
60
29
37
0
22
10
17
3
3
1
7
327,987
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/_field.py
strawchemy.strawberry._field._StrawchemyInputMutationField
from typing import TYPE_CHECKING, Any, Literal, Optional, TypeVar, Union, cast, get_args, get_origin class _StrawchemyInputMutationField(StrawchemyField): def __init__(self, input_type: type[MappedGraphQLDTO[T]], *args: Any, validation: Optional[ValidationProtocol[T]]=None, **kwargs: Any) -> None: super()...
class _StrawchemyInputMutationField(StrawchemyField): def __init__(self, input_type: type[MappedGraphQLDTO[T]], *args: Any, validation: Optional[ValidationProtocol[T]]=None, **kwargs: Any) -> None: pass
2
0
11
0
11
0
1
0
1
4
1
3
1
3
1
31
12
0
12
11
4
0
6
5
4
1
2
0
1
327,988
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/_field.py
strawchemy.strawberry._field._StrawchemyMutationField
from strawchemy.strawberry.mutation.input import Input from typing import TYPE_CHECKING, Any, Literal, Optional, TypeVar, Union, cast, get_args, get_origin class _StrawchemyMutationField: async def _input_result_async(self, repository_call: Awaitable[GraphQLResult[Any, Any]], input_data: Input[Any]) -> _ListResol...
class _StrawchemyMutationField: async def _input_result_async(self, repository_call: Awaitable[GraphQLResult[Any, Any]], input_data: Input[Any]) -> _ListResolverResult: pass def _input_result_sync(self, repository_call: GraphQLResult[Any, Any], input_data: Input[Any]) -> _ListResolverResult: pass
3
0
5
0
5
0
2
0
0
4
2
4
2
0
2
2
11
1
10
8
3
0
6
4
3
2
0
0
4
327,989
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/_instance.py
strawchemy.strawberry._instance.MapperModelInstance
from strawberry.types.private import StrawberryPrivate class MapperModelInstance(StrawberryPrivate): ...
class MapperModelInstance(StrawberryPrivate): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
1
1
1
0
2
1
1
0
1
0
0
327,990
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/_registry.py
strawchemy.strawberry._registry.RegistryTypeInfo
from typing import TYPE_CHECKING, Any, ForwardRef, Literal, NewType, Optional, TypeVar, Union, cast, get_args, get_origin, overload import dataclasses @dataclasses.dataclass(frozen=True, eq=True) class RegistryTypeInfo: name: str graphql_type: GraphQLType default_name: Optional[str] = None user_defined...
@dataclasses.dataclass(frozen=True, eq=True) class RegistryTypeInfo: @property def scoped_id(self) -> Hashable: pass
4
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
7
0
7
5
6
0
7
5
6
0
0
0
0
327,991
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/_registry.py
strawchemy.strawberry._registry.StrawberryRegistry
import dataclasses from strawberry.types import get_object_definition, has_object_definition import strawberry from typing import TYPE_CHECKING, Any, ForwardRef, Literal, NewType, Optional, TypeVar, Union, cast, get_args, get_origin, overload from ._utils import strawberry_contained_types from strawberry.types.field im...
class StrawberryRegistry: def __init__(self, strawberry_config: StrawberryConfig) -> None: pass def _get_field_type_name(self, field: Union[StrawberryField, StrawberryArgument], inner_type: Any, graphql_type: GraphQLType) -> Optional[str]: '''Get the type name of a field. This will ha...
23
7
9
0
8
1
2
0.06
0
14
2
0
16
5
17
17
173
20
144
64
108
9
96
38
78
10
0
4
41
327,992
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/_registry.py
strawchemy.strawberry._registry._TypeReference
import dataclasses from strawberry.types.field import StrawberryField from strawberry.types.base import StrawberryContainer from typing import TYPE_CHECKING, Any, ForwardRef, Literal, NewType, Optional, TypeVar, Union, cast, get_args, get_origin, overload from copy import copy from strawberry.annotation import Strawber...
@dataclasses.dataclass class _TypeReference: @classmethod def _replace_contained_type(cls, container: StrawberryContainer, strawberry_type: type[WithStrawberryObjectDefinition]) -> StrawberryContainer: '''Recursively replace the contained type in a StrawberryContainer. Args: contain...
6
3
7
0
7
0
2
0
0
1
0
0
2
0
3
3
28
3
25
9
18
0
17
6
13
3
0
1
7
327,993
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/dto.py
strawchemy.strawberry.dto.AggregateDTO
from sqlalchemy.orm import DeclarativeBase, QueryableAttribute class AggregateDTO(UnmappedStrawberryGraphQLDTO[DeclarativeBase]): ...
class AggregateDTO(UnmappedStrawberryGraphQLDTO[DeclarativeBase]): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
2
1
0
1
1
1
0
2
1
1
0
4
0
0
327,994
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/dto.py
strawchemy.strawberry.dto.AggregateFieldDefinition
from dataclasses import dataclass @dataclass(eq=False, repr=False) class AggregateFieldDefinition(GraphQLFieldDefinition): is_relation: bool = True is_aggregate: bool = True
@dataclass(eq=False, repr=False) class AggregateFieldDefinition(GraphQLFieldDefinition): pass
2
0
0
0
0
0
0
0
1
0
0
0
0
0
0
26
3
0
3
3
2
0
3
3
2
0
3
0
0
327,995
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/dto.py
strawchemy.strawberry.dto.AggregateFilterDTO
from .typing import GraphQLPurpose, OrderByDTOT, QueryNodeType class AggregateFilterDTO(GraphQLFilterDTO): def flatten(self, aggregation_node: QueryNodeType) -> list[AggregationFilter]: aggregations = [] for name in self.dto_set_fields: function_filter: AggregationFunctionFilterDTO = g...
class AggregateFilterDTO(GraphQLFilterDTO): def flatten(self, aggregation_node: QueryNodeType) -> list[AggregationFilter]: pass
2
0
31
0
31
0
3
0
1
5
4
0
1
1
1
4
32
0
32
9
30
0
12
8
10
3
5
2
3
327,996
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/dto.py
strawchemy.strawberry.dto.AggregationFilter
from dataclasses import dataclass from typing import TYPE_CHECKING, Any, ClassVar, Generic, Literal, Optional, TypeVar, Union, overload from .typing import GraphQLPurpose, OrderByDTOT, QueryNodeType @dataclass class AggregationFilter: function_info: FilterFunctionInfo predicate: EqualityComparison[Any] fie...
@dataclass class AggregationFilter: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0
5
2
4
0
5
2
4
0
0
0
0
327,997
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/dto.py
strawchemy.strawberry.dto.AggregationFunctionFilterDTO
from sqlalchemy.orm import DeclarativeBase, QueryableAttribute from typing import TYPE_CHECKING, Any, ClassVar, Generic, Literal, Optional, TypeVar, Union, overload class AggregationFunctionFilterDTO(UnmappedStrawberryGraphQLDTO[DeclarativeBase]): __dto_function_info__: ClassVar[FilterFunctionInfo] arguments: ...
class AggregationFunctionFilterDTO(UnmappedStrawberryGraphQLDTO[DeclarativeBase]): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
2
6
1
5
2
4
0
5
2
4
0
4
0
0
327,998
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/dto.py
strawchemy.strawberry.dto.BooleanFilterDTO
import strawberry from typing import TYPE_CHECKING, Any, ClassVar, Generic, Literal, Optional, TypeVar, Union, overload from .typing import GraphQLPurpose, OrderByDTOT, QueryNodeType from msgspec import Struct, field, json from typing_extensions import Self, override class BooleanFilterDTO(GraphQLFilterDTO): and_:...
class BooleanFilterDTO(GraphQLFilterDTO): def filters_tree(self, _node: Optional[QueryNodeType]=None) -> tuple[QueryNodeType, Filter]: pass
2
0
23
0
23
0
6
0
1
7
5
0
1
0
1
4
28
1
27
13
25
0
21
13
19
6
5
3
6
327,999
gazorby/strawchemy
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/gazorby_strawchemy/src/strawchemy/strawberry/dto.py
strawchemy.strawberry.dto.DTOKey
from .typing import GraphQLPurpose, OrderByDTOT, QueryNodeType from typing import TYPE_CHECKING, Any, ClassVar, Generic, Literal, Optional, TypeVar, Union, overload from typing_extensions import Self, override from strawchemy.graph import AnyNode, GraphMetadata, MatchOn, Node, NodeMetadata, NodeT class DTOKey(_Key[typ...
class DTOKey(_Key[type[Any]]): @override def to_str(self, obj: type[Any]) -> str: pass @classmethod def from_dto_node(cls, node: Node[Any, Any]) -> Self: pass @classmethod def from_query_node(cls, node: QueryNodeType) -> Self: pass
7
0
3
0
3
0
2
0
1
4
1
0
1
0
3
13
16
2
14
7
7
0
11
4
7
3
2
1
5