Skip to content

omnipy.shared.protocols.content

Protocols for model content types with Omnipy-specific typing behavior.

CLASS DESCRIPTION
IsBoolContent

Protocol for bool-like model content bitwise operations.

IsBytesContent

Protocol for bytes model content concatenation.

IsConcatenableItemSequenceLikeColumnContent

Protocol for concatenable column content with padding helpers.

IsConcatenableItemSequenceLikeContent

Protocol for sequence-like content that supports concatenation operations.

IsDictContent

Protocol for dict model content with dict-preserving merges.

IsDictOfConcatenableItemSequenceLikeColumnContent

Protocol for mappings from column names to concatenable column content.

IsDictOfDictsContent

Protocol for dict content whose values are mapping-like values.

IsDictOfListsContent
IsFloatContent

Protocol for float-like model content operations.

IsIntContent

Protocol for integer-like model content operations.

IsListContent

Protocol for list model content with list-preserving operations.

IsListOfDictsContent

Protocol for list content whose items are mapping-like values.

IsListOfListsContent
IsPairTupleContent

Protocol for paired-type tuples as Model content, e.g. Model[tuple[int, str]]

IsSameTypeTupleContent

Protocol for single-type tuples as Model content, e.g. Model[tuple[int, ...]]

IsSetContent

Protocol for set model content with set-preserving operations.

IsStrContent

Protocol for string model content concatenation.

IsBoolContent

Bases: IsBool, Protocol


              flowchart BT
              omnipy.shared.protocols.content.IsBoolContent[IsBoolContent]
              omnipy.shared.protocols.builtins.IsBool[IsBool]
              omnipy.shared.protocols.builtins.IsInt[IsInt]

                              omnipy.shared.protocols.builtins.IsBool --> omnipy.shared.protocols.content.IsBoolContent
                                omnipy.shared.protocols.builtins.IsInt --> omnipy.shared.protocols.builtins.IsBool
                



              click omnipy.shared.protocols.content.IsBoolContent href "" "omnipy.shared.protocols.content.IsBoolContent"
              click omnipy.shared.protocols.builtins.IsBool href "" "omnipy.shared.protocols.builtins.IsBool"
              click omnipy.shared.protocols.builtins.IsInt href "" "omnipy.shared.protocols.builtins.IsInt"
            

Protocol for bool-like model content bitwise operations.

METHOD DESCRIPTION
as_integer_ratio
bit_count
bit_length
conjugate
from_bytes
is_integer
to_bytes
ATTRIBUTE DESCRIPTION
denominator

TYPE: Literal[1]

imag

TYPE: Literal[0]

numerator

TYPE: int

real

TYPE: int

Source code in src/omnipy/shared/protocols/content.py
class IsBoolContent(IsBool, Protocol):
    """Protocol for bool-like model content bitwise operations."""
    @overload  # type: ignore [override]
    def __and__(self, value: IsBool, /) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def __and__(self, value: int, /) -> int:  # type: ignore [overload-overlap]
        raise AssumedToBeImplementedException

    @overload
    def __and__(self, value: ConvertibleToInt, /) -> Self:
        raise AssumedToBeImplementedException

    def __and__(  # pyright: ignore[reportIncompatibleMethodOverride]
        self,
        value: ConvertibleToInt | IsBool,
        /,
    ) -> int | Self:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def __or__(self, value: IsBool, /) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def __or__(self, value: int, /) -> int:  # type: ignore [overload-overlap]
        raise AssumedToBeImplementedException

    @overload
    def __or__(self, value: ConvertibleToInt, /) -> Self:
        raise AssumedToBeImplementedException

    def __or__(  # pyright: ignore[reportIncompatibleMethodOverride]
        self,
        value: ConvertibleToInt | IsBool,
        /,
    ) -> int | Self:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def __xor__(self, value: IsBool, /) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def __xor__(self, value: int, /) -> int:  # type: ignore [overload-overlap]
        raise AssumedToBeImplementedException

    @overload
    def __xor__(self, value: ConvertibleToInt, /) -> Self:
        raise AssumedToBeImplementedException

    def __xor__(  # pyright: ignore[reportIncompatibleMethodOverride]
        self,
        value: ConvertibleToInt | IsBool,
        /,
    ) -> int | Self:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def __rand__(self, value: IsBool, /) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def __rand__(self, value: int, /) -> int:  # type: ignore [overload-overlap]
        raise AssumedToBeImplementedException

    @overload
    def __rand__(self, value: ConvertibleToInt, /) -> Self:
        raise AssumedToBeImplementedException

    def __rand__(  # pyright: ignore[reportIncompatibleMethodOverride]
        self,
        value: ConvertibleToInt | IsBool,
        /,
    ) -> int | Self:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def __ror__(self, value: IsBool, /) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def __ror__(self, value: int, /) -> int:  # type: ignore [overload-overlap]
        raise AssumedToBeImplementedException

    @overload
    def __ror__(self, value: ConvertibleToInt, /) -> Self:
        raise AssumedToBeImplementedException

    def __ror__(  # pyright: ignore[reportIncompatibleMethodOverride]
        self,
        value: ConvertibleToInt | IsBool,
        /,
    ) -> int | Self:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def __rxor__(self, value: IsBool, /) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def __rxor__(self, value: int, /) -> int:  # type: ignore [overload-overlap]
        raise AssumedToBeImplementedException

    @overload
    def __rxor__(self, value: ConvertibleToInt, /) -> Self:
        raise AssumedToBeImplementedException

    def __rxor__(  # pyright: ignore[reportIncompatibleMethodOverride]
        self,
        value: ConvertibleToInt | IsBool,
        /,
    ) -> int | Self:
        raise AssumedToBeImplementedException

denominator property

denominator: Literal[1]

imag property

imag: Literal[0]

numerator property

numerator: int

real property

real: int

as_integer_ratio

as_integer_ratio() -> tuple[int, Literal[1]]
Source code in src/omnipy/shared/protocols/builtins.py
def as_integer_ratio(self) -> tuple[int, Literal[1]]: raise AssumedToBeImplementedException

bit_count

bit_count() -> int
Source code in src/omnipy/shared/protocols/builtins.py
def bit_count(self) -> int: raise AssumedToBeImplementedException

bit_length

bit_length() -> int
Source code in src/omnipy/shared/protocols/builtins.py
def bit_length(self) -> int: raise AssumedToBeImplementedException

conjugate

conjugate() -> int
Source code in src/omnipy/shared/protocols/builtins.py
def conjugate(self) -> int: raise AssumedToBeImplementedException

from_bytes classmethod

from_bytes(
    bytes: Iterable[SupportsIndex] | SupportsBytes | ReadableBuffer,
    byteorder: Literal["little", "big"],
    *,
    signed: bool = False,
) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
@classmethod
def from_bytes(
    cls,
    bytes: Iterable[SupportsIndex] | SupportsBytes | ReadableBuffer,
    byteorder: Literal["little", "big"],
    *, 
    signed: bool = False,
) -> Self: raise AssumedToBeImplementedException

is_integer

is_integer() -> Literal[True]
Source code in src/omnipy/shared/protocols/builtins.py
def is_integer(self) -> Literal[True]: raise AssumedToBeImplementedException

to_bytes

to_bytes(
    length: SupportsIndex, byteorder: Literal["little", "big"], *, signed: bool = False
) -> bytes
Source code in src/omnipy/shared/protocols/builtins.py
def to_bytes(self, length: SupportsIndex, byteorder: Literal["little", "big"], *, signed: bool = False) -> bytes: raise AssumedToBeImplementedException

IsBytesContent

Bases: IsBytes, Protocol


              flowchart BT
              omnipy.shared.protocols.content.IsBytesContent[IsBytesContent]
              omnipy.shared.protocols.builtins.IsBytes[IsBytes]
              omnipy.shared.protocols.typing.IsItemSequence[IsItemSequence]

                              omnipy.shared.protocols.builtins.IsBytes --> omnipy.shared.protocols.content.IsBytesContent
                                omnipy.shared.protocols.typing.IsItemSequence --> omnipy.shared.protocols.builtins.IsBytes
                



              click omnipy.shared.protocols.content.IsBytesContent href "" "omnipy.shared.protocols.content.IsBytesContent"
              click omnipy.shared.protocols.builtins.IsBytes href "" "omnipy.shared.protocols.builtins.IsBytes"
              click omnipy.shared.protocols.typing.IsItemSequence href "" "omnipy.shared.protocols.typing.IsItemSequence"
            

Protocol for bytes model content concatenation.

METHOD DESCRIPTION
capitalize
center
count
decode
endswith
expandtabs
find
fromhex
hex
index
isalnum
isalpha
isascii
isdigit
islower
isspace
istitle
isupper
join
ljust
lower
lstrip
maketrans
partition
removeprefix
removesuffix
replace
rfind
rindex
rjust
rpartition
rsplit
rstrip
split
splitlines
startswith
strip
swapcase
title
translate
upper
zfill
Source code in src/omnipy/shared/protocols/content.py
class IsBytesContent(IsBytes, Protocol):
    """Protocol for bytes model content concatenation."""
    def __add__(self, value: IsBytes, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __radd__(self, value: IsBytes, /) -> Self:
        raise AssumedToBeImplementedException

    def __iadd__(self, value: IsBytes, /) -> Self:
        raise AssumedToBeImplementedException

capitalize

capitalize() -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def capitalize(self) -> Self: raise AssumedToBeImplementedException

center

center(width: SupportsIndex, fillchar: bytes = b' ') -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def center(self, width: SupportsIndex, fillchar: bytes = b' ', /) -> Self: raise AssumedToBeImplementedException

count

count(
    sub: ReadableBuffer | SupportsIndex,
    start: SupportsIndex | None = None,
    end: SupportsIndex | None = None,
) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def count(
    self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = None, end: SupportsIndex | None = None, /
) -> int: raise AssumedToBeImplementedException

decode

decode(encoding: str = 'utf-8', errors: str = 'strict') -> str
Source code in src/omnipy/shared/protocols/builtins.py
def decode(self, encoding: str = 'utf-8', errors: str = 'strict') -> str: raise AssumedToBeImplementedException

endswith

endswith(
    suffix: ReadableBuffer | tuple[ReadableBuffer, ...],
    start: SupportsIndex | None = None,
    end: SupportsIndex | None = None,
) -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def endswith(
    self,
    suffix: ReadableBuffer | tuple[ReadableBuffer, ...],
    start: SupportsIndex | None = None,
    end: SupportsIndex | None = None,
    /,
    ) -> bool: raise AssumedToBeImplementedException

expandtabs

expandtabs(tabsize: SupportsIndex = 8) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def expandtabs(self, tabsize: SupportsIndex = 8) -> Self: raise AssumedToBeImplementedException

find

find(
    sub: ReadableBuffer | SupportsIndex,
    start: SupportsIndex | None = None,
    end: SupportsIndex | None = None,
) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def find(
    self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = None, end: SupportsIndex | None = None, /
) -> int: raise AssumedToBeImplementedException

fromhex classmethod

fromhex(string: str) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
@classmethod
def fromhex(cls, string: str, /) -> Self: raise AssumedToBeImplementedException

hex

hex(sep: str | bytes = '', bytes_per_sep: SupportsIndex = 1) -> str
Source code in src/omnipy/shared/protocols/builtins.py
def hex(self, sep: str | bytes = '', bytes_per_sep: SupportsIndex = 1) -> str: raise AssumedToBeImplementedException

index

index(
    sub: ReadableBuffer | SupportsIndex,
    start: SupportsIndex | None = None,
    end: SupportsIndex | None = None,
) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def index(
    self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = None, end: SupportsIndex | None = None, /
) -> int: raise AssumedToBeImplementedException

isalnum

isalnum() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isalnum(self) -> bool: raise AssumedToBeImplementedException

isalpha

isalpha() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isalpha(self) -> bool: raise AssumedToBeImplementedException

isascii

isascii() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isascii(self) -> bool: raise AssumedToBeImplementedException

isdigit

isdigit() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isdigit(self) -> bool: raise AssumedToBeImplementedException

islower

islower() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def islower(self) -> bool: raise AssumedToBeImplementedException

isspace

isspace() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isspace(self) -> bool: raise AssumedToBeImplementedException

istitle

istitle() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def istitle(self) -> bool: raise AssumedToBeImplementedException

isupper

isupper() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isupper(self) -> bool: raise AssumedToBeImplementedException

join

join(iterable_of_bytes: Iterable[ReadableBuffer]) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def join(self, iterable_of_bytes: Iterable[ReadableBuffer], /) -> Self: raise AssumedToBeImplementedException

ljust

ljust(width: SupportsIndex, fillchar: bytes | bytearray = b' ') -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def ljust(self, width: SupportsIndex, fillchar: bytes | bytearray = b" ", /) -> Self: raise AssumedToBeImplementedException

lower

lower() -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def lower(self) -> Self: raise AssumedToBeImplementedException

lstrip

lstrip(bytes: ReadableBuffer | None = None) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def lstrip(self, bytes: ReadableBuffer | None = None, /) -> Self: raise AssumedToBeImplementedException

maketrans staticmethod

maketrans(frm: ReadableBuffer, to: ReadableBuffer) -> bytes
Source code in src/omnipy/shared/protocols/builtins.py
@staticmethod
def maketrans(frm: ReadableBuffer, to: ReadableBuffer, /) -> bytes: raise AssumedToBeImplementedException

partition

partition(sep: ReadableBuffer) -> tuple[Self, Self, Self]
Source code in src/omnipy/shared/protocols/builtins.py
def partition(self, sep: ReadableBuffer, /) -> tuple[Self, Self, Self]: raise AssumedToBeImplementedException

removeprefix

removeprefix(prefix: ReadableBuffer) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def removeprefix(self, prefix: ReadableBuffer, /) -> Self: raise AssumedToBeImplementedException

removesuffix

removesuffix(suffix: ReadableBuffer) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def removesuffix(self, suffix: ReadableBuffer, /) -> Self: raise AssumedToBeImplementedException

replace

replace(old: ReadableBuffer, new: ReadableBuffer, count: SupportsIndex = -1) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def replace(self, old: ReadableBuffer, new: ReadableBuffer, count: SupportsIndex = -1, /) -> Self: raise AssumedToBeImplementedException

rfind

rfind(
    sub: ReadableBuffer | SupportsIndex,
    start: SupportsIndex | None = None,
    end: SupportsIndex | None = None,
) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def rfind(
    self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = None, end: SupportsIndex | None = None, /
) -> int: raise AssumedToBeImplementedException

rindex

rindex(
    sub: ReadableBuffer | SupportsIndex,
    start: SupportsIndex | None = None,
    end: SupportsIndex | None = None,
) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def rindex(
    self, sub: ReadableBuffer | SupportsIndex, start: SupportsIndex | None = None, end: SupportsIndex | None = None, /
) -> int: raise AssumedToBeImplementedException

rjust

rjust(width: SupportsIndex, fillchar: bytes | bytearray = b' ') -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def rjust(self, width: SupportsIndex, fillchar: bytes | bytearray = b' ', /) -> Self: raise AssumedToBeImplementedException

rpartition

rpartition(sep: ReadableBuffer) -> tuple[Self, Self, Self]
Source code in src/omnipy/shared/protocols/builtins.py
def rpartition(self, sep: ReadableBuffer, /) -> tuple[Self, Self, Self]: raise AssumedToBeImplementedException

rsplit

rsplit(sep: ReadableBuffer | None = None, maxsplit: SupportsIndex = -1) -> list[Self]
Source code in src/omnipy/shared/protocols/builtins.py
def rsplit(self, sep: ReadableBuffer | None = None, maxsplit: SupportsIndex = -1) -> list[Self]: raise AssumedToBeImplementedException

rstrip

rstrip(bytes: ReadableBuffer | None = None) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def rstrip(self, bytes: ReadableBuffer | None = None, /) -> Self: raise AssumedToBeImplementedException

split

split(sep: ReadableBuffer | None = None, maxsplit: SupportsIndex = -1) -> list[Self]
Source code in src/omnipy/shared/protocols/builtins.py
def split(self, sep: ReadableBuffer | None = None, maxsplit: SupportsIndex = -1) -> list[Self]: raise AssumedToBeImplementedException

splitlines

splitlines(keepends: bool = False) -> list[Self]
Source code in src/omnipy/shared/protocols/builtins.py
def splitlines(self, keepends: bool = False) -> list[Self]: raise AssumedToBeImplementedException

startswith

startswith(
    prefix: ReadableBuffer | tuple[ReadableBuffer, ...],
    start: SupportsIndex | None = None,
    end: SupportsIndex | None = None,
) -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def startswith(
    self,
    prefix: ReadableBuffer | tuple[ReadableBuffer, ...],
    start: SupportsIndex | None = None,
    end: SupportsIndex | None = None,
    /,
) -> bool:
    raise AssumedToBeImplementedException

strip

strip(bytes: ReadableBuffer | None = None) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def strip(self, bytes: ReadableBuffer | None = None, /) -> Self: raise AssumedToBeImplementedException

swapcase

swapcase() -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def swapcase(self) -> Self: raise AssumedToBeImplementedException

title

title() -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def title(self) -> Self: raise AssumedToBeImplementedException

translate

translate(table: ReadableBuffer | None, /, delete: ReadableBuffer = b'') -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def translate(self, table: ReadableBuffer | None, /, delete: ReadableBuffer = b'') -> Self: raise AssumedToBeImplementedException

upper

upper() -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def upper(self) -> Self: raise AssumedToBeImplementedException

zfill

zfill(width: SupportsIndex) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def zfill(self, width: SupportsIndex, /) -> Self: raise AssumedToBeImplementedException

IsConcatenableItemSequenceLikeColumnContent

Bases: IsConcatenableItemSequenceLikeContent[_ValT], Protocol[_ValT]


              flowchart BT
              omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeColumnContent[IsConcatenableItemSequenceLikeColumnContent]
              omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeContent[IsConcatenableItemSequenceLikeContent]
              omnipy.shared.protocols.stdlib_ext.IsItemSequenceLike[IsItemSequenceLike]

                              omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeContent --> omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeColumnContent
                                omnipy.shared.protocols.stdlib_ext.IsItemSequenceLike --> omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeContent
                



              click omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeColumnContent href "" "omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeColumnContent"
              click omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeContent href "" "omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeContent"
              click omnipy.shared.protocols.stdlib_ext.IsItemSequenceLike href "" "omnipy.shared.protocols.stdlib_ext.IsItemSequenceLike"
            

Protocol for concatenable column content with padding helpers.

METHOD DESCRIPTION
default_value

Return the value used to pad missing cells in a column.

filled

Create a column prefilled with length copies of value.

Source code in src/omnipy/shared/protocols/content.py
class IsConcatenableItemSequenceLikeColumnContent(
        IsConcatenableItemSequenceLikeContent[_ValT],
        Protocol[_ValT],
):
    """Protocol for concatenable column content with padding helpers."""
    @classmethod
    def default_value(cls) -> _ValT:
        """Return the value used to pad missing cells in a column.

        Returns:
            _ValT: Default placeholder value for newly created cells.
        """
        ...  # Abstract method

    @classmethod
    def filled(cls, value: _ValT, length: int) -> Self:
        """Create a column prefilled with ``length`` copies of ``value``.

        Args:
            value: Value to repeat.
            length: Number of items to include.

        Returns:
            Self: Column instance filled with repeated values.
        """
        ...  # Abstract method

default_value classmethod

default_value() -> _ValT

Return the value used to pad missing cells in a column.

RETURNS DESCRIPTION
_ValT

Default placeholder value for newly created cells.

TYPE: _ValT

Source code in src/omnipy/shared/protocols/content.py
@classmethod
def default_value(cls) -> _ValT:
    """Return the value used to pad missing cells in a column.

    Returns:
        _ValT: Default placeholder value for newly created cells.
    """
    ...  # Abstract method

filled classmethod

filled(value: _ValT, length: int) -> Self

Create a column prefilled with length copies of value.

PARAMETER DESCRIPTION
value

Value to repeat.

TYPE: _ValT

length

Number of items to include.

TYPE: int

RETURNS DESCRIPTION
Self

Column instance filled with repeated values.

TYPE: Self

Source code in src/omnipy/shared/protocols/content.py
@classmethod
def filled(cls, value: _ValT, length: int) -> Self:
    """Create a column prefilled with ``length`` copies of ``value``.

    Args:
        value: Value to repeat.
        length: Number of items to include.

    Returns:
        Self: Column instance filled with repeated values.
    """
    ...  # Abstract method

IsConcatenableItemSequenceLikeContent

Bases: IsItemSequenceLike[_ValT], Protocol[_ValT]


              flowchart BT
              omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeContent[IsConcatenableItemSequenceLikeContent]
              omnipy.shared.protocols.stdlib_ext.IsItemSequenceLike[IsItemSequenceLike]

                              omnipy.shared.protocols.stdlib_ext.IsItemSequenceLike --> omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeContent
                


              click omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeContent href "" "omnipy.shared.protocols.content.IsConcatenableItemSequenceLikeContent"
              click omnipy.shared.protocols.stdlib_ext.IsItemSequenceLike href "" "omnipy.shared.protocols.stdlib_ext.IsItemSequenceLike"
            

Protocol for sequence-like content that supports concatenation operations.

Source code in src/omnipy/shared/protocols/content.py
class IsConcatenableItemSequenceLikeContent(IsItemSequenceLike[_ValT], Protocol[_ValT]):
    """Protocol for sequence-like content that supports concatenation operations."""
    def __add__(
        self,
        values: IsItemSequenceLike[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    def __radd__(
        self,
        values: IsItemSequenceLike[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    def __iadd__(
        self,
        values: IsItemSequenceLike[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

IsDictContent

Bases: IsDict[_KeyT, _ValT], Protocol[_KeyT, _ValT]


              flowchart BT
              omnipy.shared.protocols.content.IsDictContent[IsDictContent]
              omnipy.shared.protocols.builtins.IsDict[IsDict]
              omnipy.shared.protocols.typing.IsMutableMapping[IsMutableMapping]
              omnipy.shared.protocols.typing.IsMapping[IsMapping]

                              omnipy.shared.protocols.builtins.IsDict --> omnipy.shared.protocols.content.IsDictContent
                                omnipy.shared.protocols.typing.IsMutableMapping --> omnipy.shared.protocols.builtins.IsDict
                                omnipy.shared.protocols.typing.IsMapping --> omnipy.shared.protocols.typing.IsMutableMapping
                




              click omnipy.shared.protocols.content.IsDictContent href "" "omnipy.shared.protocols.content.IsDictContent"
              click omnipy.shared.protocols.builtins.IsDict href "" "omnipy.shared.protocols.builtins.IsDict"
              click omnipy.shared.protocols.typing.IsMutableMapping href "" "omnipy.shared.protocols.typing.IsMutableMapping"
              click omnipy.shared.protocols.typing.IsMapping href "" "omnipy.shared.protocols.typing.IsMapping"
            

Protocol for dict model content with dict-preserving merges.

METHOD DESCRIPTION
clear

D.clear() -> None. Remove all items from D.

fromkeys
get
items
keys
pop
popitem

D.popitem() -> (k, v), remove and return some (key, value) pair

setdefault

D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D

update

D.update([E, ]**F) -> None. Update D from mapping/iterable E and F.

values
Source code in src/omnipy/shared/protocols/content.py
class IsDictContent(IsDict[_KeyT, _ValT], Protocol[_KeyT, _ValT]):
    """Protocol for dict model content with dict-preserving merges."""
    @override
    @classmethod
    def fromkeys(  # type: ignore [override]
        cls,
        iterable: Iterable[_KeyT],
        value: _ValT | None = None,
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def __or__(self, value: SupportsKeysAndGetItem[_KeyT, _ValT], /) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def __or__(self, value: Iterable[tuple[_KeyT, _ValT]], /) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __or__(  # pyright: ignore[reportIncompatibleMethodOverride]
        self,
        value: SupportsKeysAndGetItem[_KeyT, _ValT] | Iterable[tuple[_KeyT, _ValT]],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def __ror__(self, value: SupportsKeysAndGetItem[_KeyT, _ValT], /) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def __ror__(self, value: Iterable[tuple[_KeyT, _ValT]], /) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __ror__(  # pyright: ignore[reportIncompatibleMethodOverride]
        self,
        value: SupportsKeysAndGetItem[_KeyT, _ValT] | Iterable[tuple[_KeyT, _ValT]],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

clear

clear() -> None

D.clear() -> None. Remove all items from D.

Source code in src/omnipy/shared/protocols/typing.py
def clear(self) -> None:
    """
    D.clear() -> None.  Remove all items from D.
    """
    raise AssumedToBeImplementedException

fromkeys classmethod

fromkeys(iterable: Iterable[_KeyT], value: _ValT | None = None) -> Self
Source code in src/omnipy/shared/protocols/content.py
@override
@classmethod
def fromkeys(  # type: ignore [override]
    cls,
    iterable: Iterable[_KeyT],
    value: _ValT | None = None,
    /,
) -> Self:
    raise AssumedToBeImplementedException

get

get(key: _KT, default: None = None) -> _VT | None
get(key: _KT, default: _VT) -> _VT
get(key: _KT, default: _T) -> _VT | _T
Source code in src/omnipy/shared/protocols/builtins.py
def get(self, key: _KT, default: None | _VT | _T = None, /) -> _VT | _T | None: raise AssumedToBeImplementedException

items

items() -> IsDictItems[_KT, _VT]
Source code in src/omnipy/shared/protocols/builtins.py
def items(self) -> IsDictItems[_KT, _VT]: raise AssumedToBeImplementedException

keys

keys() -> IsDictKeys[_KT, _VT]
Source code in src/omnipy/shared/protocols/builtins.py
def keys(self) -> IsDictKeys[_KT, _VT]: raise AssumedToBeImplementedException

pop

pop(key: _KT) -> _VT
pop(key: _KT, default: _VT) -> _VT
pop(key: _KT, default: _T) -> _VT | _T
Source code in src/omnipy/shared/protocols/builtins.py
def pop(self, key: _KT, default: None | _VT | _T = None, /) -> _VT | _T | None: raise AssumedToBeImplementedException

popitem

popitem() -> tuple[_KT, _VT]

D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.

Source code in src/omnipy/shared/protocols/typing.py
def popitem(self) -> tuple[_KT, _VT]:
    """
    D.popitem() -> (k, v), remove and return some (key, value) pair
       as a 2-tuple; but raise KeyError if D is empty.
    """
    raise AssumedToBeImplementedException

setdefault

setdefault(key: _KT, default: _VT) -> _VT

D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D

Source code in src/omnipy/shared/protocols/typing.py
def setdefault(self, key: _KT, default: _VT, /) -> _VT:
    """
    D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
    """
    raise AssumedToBeImplementedException

update

update(m: SupportsKeysAndGetItem[_KT, _VT]) -> None
update(m: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None
update(m: Iterable[tuple[_KT, _VT]]) -> None
update(m: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None
update(**kwargs: _VT) -> None

D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

Source code in src/omnipy/shared/protocols/typing.py
def update(
    self,
    m: (SupportsKeysAndGetItem[_KT, _VT] | SupportsKeysAndGetItem[str, _VT]
        | Iterable[tuple[_KT, _VT]] | Iterable[tuple[str, _VT]] | None) = None,
    /,
    **kwargs: _VT,
) -> None:
    """
    D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
    If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
    If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
    In either case, this is followed by: for k, v in F.items(): D[k] = v
    """
    raise AssumedToBeImplementedException

values

values() -> IsDictValues[_KT, _VT]
Source code in src/omnipy/shared/protocols/builtins.py
def values(self) -> IsDictValues[_KT, _VT]: raise AssumedToBeImplementedException

IsDictOfConcatenableItemSequenceLikeColumnContent

Bases: IsDictContent[str, _ConcatColumnModelT | IsItemSequenceLike[_ValT] | Generator[_ValT, None, None]], Protocol[_ConcatColumnModelT, _ValT]


              flowchart BT
              omnipy.shared.protocols.content.IsDictOfConcatenableItemSequenceLikeColumnContent[IsDictOfConcatenableItemSequenceLikeColumnContent]
              omnipy.shared.protocols.content.IsDictContent[IsDictContent]
              omnipy.shared.protocols.builtins.IsDict[IsDict]
              omnipy.shared.protocols.typing.IsMutableMapping[IsMutableMapping]
              omnipy.shared.protocols.typing.IsMapping[IsMapping]

                              omnipy.shared.protocols.content.IsDictContent --> omnipy.shared.protocols.content.IsDictOfConcatenableItemSequenceLikeColumnContent
                                omnipy.shared.protocols.builtins.IsDict --> omnipy.shared.protocols.content.IsDictContent
                                omnipy.shared.protocols.typing.IsMutableMapping --> omnipy.shared.protocols.builtins.IsDict
                                omnipy.shared.protocols.typing.IsMapping --> omnipy.shared.protocols.typing.IsMutableMapping
                





              click omnipy.shared.protocols.content.IsDictOfConcatenableItemSequenceLikeColumnContent href "" "omnipy.shared.protocols.content.IsDictOfConcatenableItemSequenceLikeColumnContent"
              click omnipy.shared.protocols.content.IsDictContent href "" "omnipy.shared.protocols.content.IsDictContent"
              click omnipy.shared.protocols.builtins.IsDict href "" "omnipy.shared.protocols.builtins.IsDict"
              click omnipy.shared.protocols.typing.IsMutableMapping href "" "omnipy.shared.protocols.typing.IsMutableMapping"
              click omnipy.shared.protocols.typing.IsMapping href "" "omnipy.shared.protocols.typing.IsMapping"
            

Protocol for mappings from column names to concatenable column content.

METHOD DESCRIPTION
clear

D.clear() -> None. Remove all items from D.

fromkeys
get
items
keys
pop
popitem

D.popitem() -> (k, v), remove and return some (key, value) pair

setdefault

D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D

update

D.update([E, ]**F) -> None. Update D from mapping/iterable E and F.

values
Source code in src/omnipy/shared/protocols/content.py
class IsDictOfConcatenableItemSequenceLikeColumnContent(
        IsDictContent[str,
                      _ConcatColumnModelT | IsItemSequenceLike[_ValT]
                      | Generator[_ValT, None, None]],
        Protocol[_ConcatColumnModelT, _ValT],
):
    """Protocol for mappings from column names to concatenable column content."""
    @override
    def __getitem__(self, key: str, /) -> _ConcatColumnModelT:
        raise AssumedToBeImplementedException

clear

clear() -> None

D.clear() -> None. Remove all items from D.

Source code in src/omnipy/shared/protocols/typing.py
def clear(self) -> None:
    """
    D.clear() -> None.  Remove all items from D.
    """
    raise AssumedToBeImplementedException

fromkeys classmethod

fromkeys(iterable: Iterable[_KeyT], value: _ValT | None = None) -> Self
Source code in src/omnipy/shared/protocols/content.py
@override
@classmethod
def fromkeys(  # type: ignore [override]
    cls,
    iterable: Iterable[_KeyT],
    value: _ValT | None = None,
    /,
) -> Self:
    raise AssumedToBeImplementedException

get

get(key: _KT, default: None = None) -> _VT | None
get(key: _KT, default: _VT) -> _VT
get(key: _KT, default: _T) -> _VT | _T
Source code in src/omnipy/shared/protocols/builtins.py
def get(self, key: _KT, default: None | _VT | _T = None, /) -> _VT | _T | None: raise AssumedToBeImplementedException

items

items() -> IsDictItems[_KT, _VT]
Source code in src/omnipy/shared/protocols/builtins.py
def items(self) -> IsDictItems[_KT, _VT]: raise AssumedToBeImplementedException

keys

keys() -> IsDictKeys[_KT, _VT]
Source code in src/omnipy/shared/protocols/builtins.py
def keys(self) -> IsDictKeys[_KT, _VT]: raise AssumedToBeImplementedException

pop

pop(key: _KT) -> _VT
pop(key: _KT, default: _VT) -> _VT
pop(key: _KT, default: _T) -> _VT | _T
Source code in src/omnipy/shared/protocols/builtins.py
def pop(self, key: _KT, default: None | _VT | _T = None, /) -> _VT | _T | None: raise AssumedToBeImplementedException

popitem

popitem() -> tuple[_KT, _VT]

D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.

Source code in src/omnipy/shared/protocols/typing.py
def popitem(self) -> tuple[_KT, _VT]:
    """
    D.popitem() -> (k, v), remove and return some (key, value) pair
       as a 2-tuple; but raise KeyError if D is empty.
    """
    raise AssumedToBeImplementedException

setdefault

setdefault(key: _KT, default: _VT) -> _VT

D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D

Source code in src/omnipy/shared/protocols/typing.py
def setdefault(self, key: _KT, default: _VT, /) -> _VT:
    """
    D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
    """
    raise AssumedToBeImplementedException

update

update(m: SupportsKeysAndGetItem[_KT, _VT]) -> None
update(m: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None
update(m: Iterable[tuple[_KT, _VT]]) -> None
update(m: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None
update(**kwargs: _VT) -> None

D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

Source code in src/omnipy/shared/protocols/typing.py
def update(
    self,
    m: (SupportsKeysAndGetItem[_KT, _VT] | SupportsKeysAndGetItem[str, _VT]
        | Iterable[tuple[_KT, _VT]] | Iterable[tuple[str, _VT]] | None) = None,
    /,
    **kwargs: _VT,
) -> None:
    """
    D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
    If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
    If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
    In either case, this is followed by: for k, v in F.items(): D[k] = v
    """
    raise AssumedToBeImplementedException

values

values() -> IsDictValues[_KT, _VT]
Source code in src/omnipy/shared/protocols/builtins.py
def values(self) -> IsDictValues[_KT, _VT]: raise AssumedToBeImplementedException

IsDictOfDictsContent

Bases: IsDictContent[_KeyT, _ValMappingT | SupportsKeysAndGetItem[_NestedKeyT, _NestedValT] | Iterable[tuple[_NestedKeyT, _NestedValT]]], Protocol[_KeyT, _ValMappingT, _NestedKeyT, _NestedValT]


              flowchart BT
              omnipy.shared.protocols.content.IsDictOfDictsContent[IsDictOfDictsContent]
              omnipy.shared.protocols.content.IsDictContent[IsDictContent]
              omnipy.shared.protocols.builtins.IsDict[IsDict]
              omnipy.shared.protocols.typing.IsMutableMapping[IsMutableMapping]
              omnipy.shared.protocols.typing.IsMapping[IsMapping]

                              omnipy.shared.protocols.content.IsDictContent --> omnipy.shared.protocols.content.IsDictOfDictsContent
                                omnipy.shared.protocols.builtins.IsDict --> omnipy.shared.protocols.content.IsDictContent
                                omnipy.shared.protocols.typing.IsMutableMapping --> omnipy.shared.protocols.builtins.IsDict
                                omnipy.shared.protocols.typing.IsMapping --> omnipy.shared.protocols.typing.IsMutableMapping
                





              click omnipy.shared.protocols.content.IsDictOfDictsContent href "" "omnipy.shared.protocols.content.IsDictOfDictsContent"
              click omnipy.shared.protocols.content.IsDictContent href "" "omnipy.shared.protocols.content.IsDictContent"
              click omnipy.shared.protocols.builtins.IsDict href "" "omnipy.shared.protocols.builtins.IsDict"
              click omnipy.shared.protocols.typing.IsMutableMapping href "" "omnipy.shared.protocols.typing.IsMutableMapping"
              click omnipy.shared.protocols.typing.IsMapping href "" "omnipy.shared.protocols.typing.IsMapping"
            

Protocol for dict content whose values are mapping-like values.

METHOD DESCRIPTION
clear

D.clear() -> None. Remove all items from D.

fromkeys
get
items
keys
pop
popitem

D.popitem() -> (k, v), remove and return some (key, value) pair

setdefault

D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D

update

D.update([E, ]**F) -> None. Update D from mapping/iterable E and F.

values
Source code in src/omnipy/shared/protocols/content.py
class IsDictOfDictsContent(IsDictContent[_KeyT,
                                         (_ValMappingT
                                          | SupportsKeysAndGetItem[_NestedKeyT, _NestedValT]
                                          | Iterable[tuple[_NestedKeyT, _NestedValT]])],
                           Protocol[_KeyT, _ValMappingT, _NestedKeyT, _NestedValT]):
    """Protocol for dict content whose values are mapping-like values."""
    @override
    def __getitem__(self, key: _KeyT, /) -> _ValMappingT:
        raise AssumedToBeImplementedException

clear

clear() -> None

D.clear() -> None. Remove all items from D.

Source code in src/omnipy/shared/protocols/typing.py
def clear(self) -> None:
    """
    D.clear() -> None.  Remove all items from D.
    """
    raise AssumedToBeImplementedException

fromkeys classmethod

fromkeys(iterable: Iterable[_KeyT], value: _ValT | None = None) -> Self
Source code in src/omnipy/shared/protocols/content.py
@override
@classmethod
def fromkeys(  # type: ignore [override]
    cls,
    iterable: Iterable[_KeyT],
    value: _ValT | None = None,
    /,
) -> Self:
    raise AssumedToBeImplementedException

get

get(key: _KT, default: None = None) -> _VT | None
get(key: _KT, default: _VT) -> _VT
get(key: _KT, default: _T) -> _VT | _T
Source code in src/omnipy/shared/protocols/builtins.py
def get(self, key: _KT, default: None | _VT | _T = None, /) -> _VT | _T | None: raise AssumedToBeImplementedException

items

items() -> IsDictItems[_KT, _VT]
Source code in src/omnipy/shared/protocols/builtins.py
def items(self) -> IsDictItems[_KT, _VT]: raise AssumedToBeImplementedException

keys

keys() -> IsDictKeys[_KT, _VT]
Source code in src/omnipy/shared/protocols/builtins.py
def keys(self) -> IsDictKeys[_KT, _VT]: raise AssumedToBeImplementedException

pop

pop(key: _KT) -> _VT
pop(key: _KT, default: _VT) -> _VT
pop(key: _KT, default: _T) -> _VT | _T
Source code in src/omnipy/shared/protocols/builtins.py
def pop(self, key: _KT, default: None | _VT | _T = None, /) -> _VT | _T | None: raise AssumedToBeImplementedException

popitem

popitem() -> tuple[_KT, _VT]

D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.

Source code in src/omnipy/shared/protocols/typing.py
def popitem(self) -> tuple[_KT, _VT]:
    """
    D.popitem() -> (k, v), remove and return some (key, value) pair
       as a 2-tuple; but raise KeyError if D is empty.
    """
    raise AssumedToBeImplementedException

setdefault

setdefault(key: _KT, default: _VT) -> _VT

D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D

Source code in src/omnipy/shared/protocols/typing.py
def setdefault(self, key: _KT, default: _VT, /) -> _VT:
    """
    D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
    """
    raise AssumedToBeImplementedException

update

update(m: SupportsKeysAndGetItem[_KT, _VT]) -> None
update(m: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None
update(m: Iterable[tuple[_KT, _VT]]) -> None
update(m: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None
update(**kwargs: _VT) -> None

D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

Source code in src/omnipy/shared/protocols/typing.py
def update(
    self,
    m: (SupportsKeysAndGetItem[_KT, _VT] | SupportsKeysAndGetItem[str, _VT]
        | Iterable[tuple[_KT, _VT]] | Iterable[tuple[str, _VT]] | None) = None,
    /,
    **kwargs: _VT,
) -> None:
    """
    D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
    If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
    If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
    In either case, this is followed by: for k, v in F.items(): D[k] = v
    """
    raise AssumedToBeImplementedException

values

values() -> IsDictValues[_KT, _VT]
Source code in src/omnipy/shared/protocols/builtins.py
def values(self) -> IsDictValues[_KT, _VT]: raise AssumedToBeImplementedException

IsDictOfListsContent

Bases: IsDictContent[_KeyT, _ValSeqT | IsItemSequence[_NestedValT] | Generator[_NestedValT]], Protocol[_KeyT, _ValSeqT, _NestedValT]


              flowchart BT
              omnipy.shared.protocols.content.IsDictOfListsContent[IsDictOfListsContent]
              omnipy.shared.protocols.content.IsDictContent[IsDictContent]
              omnipy.shared.protocols.builtins.IsDict[IsDict]
              omnipy.shared.protocols.typing.IsMutableMapping[IsMutableMapping]
              omnipy.shared.protocols.typing.IsMapping[IsMapping]

                              omnipy.shared.protocols.content.IsDictContent --> omnipy.shared.protocols.content.IsDictOfListsContent
                                omnipy.shared.protocols.builtins.IsDict --> omnipy.shared.protocols.content.IsDictContent
                                omnipy.shared.protocols.typing.IsMutableMapping --> omnipy.shared.protocols.builtins.IsDict
                                omnipy.shared.protocols.typing.IsMapping --> omnipy.shared.protocols.typing.IsMutableMapping
                





              click omnipy.shared.protocols.content.IsDictOfListsContent href "" "omnipy.shared.protocols.content.IsDictOfListsContent"
              click omnipy.shared.protocols.content.IsDictContent href "" "omnipy.shared.protocols.content.IsDictContent"
              click omnipy.shared.protocols.builtins.IsDict href "" "omnipy.shared.protocols.builtins.IsDict"
              click omnipy.shared.protocols.typing.IsMutableMapping href "" "omnipy.shared.protocols.typing.IsMutableMapping"
              click omnipy.shared.protocols.typing.IsMapping href "" "omnipy.shared.protocols.typing.IsMapping"
            
METHOD DESCRIPTION
clear

D.clear() -> None. Remove all items from D.

fromkeys
get
items
keys
pop
popitem

D.popitem() -> (k, v), remove and return some (key, value) pair

setdefault

D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D

update

D.update([E, ]**F) -> None. Update D from mapping/iterable E and F.

values
Source code in src/omnipy/shared/protocols/content.py
class IsDictOfListsContent(IsDictContent[_KeyT,
                                         _ValSeqT | IsItemSequence[_NestedValT]
                                         | Generator[_NestedValT]],
                           Protocol[_KeyT, _ValSeqT, _NestedValT]):
    @override
    def __getitem__(self, key: _KeyT, /) -> _ValSeqT:
        raise AssumedToBeImplementedException

clear

clear() -> None

D.clear() -> None. Remove all items from D.

Source code in src/omnipy/shared/protocols/typing.py
def clear(self) -> None:
    """
    D.clear() -> None.  Remove all items from D.
    """
    raise AssumedToBeImplementedException

fromkeys classmethod

fromkeys(iterable: Iterable[_KeyT], value: _ValT | None = None) -> Self
Source code in src/omnipy/shared/protocols/content.py
@override
@classmethod
def fromkeys(  # type: ignore [override]
    cls,
    iterable: Iterable[_KeyT],
    value: _ValT | None = None,
    /,
) -> Self:
    raise AssumedToBeImplementedException

get

get(key: _KT, default: None = None) -> _VT | None
get(key: _KT, default: _VT) -> _VT
get(key: _KT, default: _T) -> _VT | _T
Source code in src/omnipy/shared/protocols/builtins.py
def get(self, key: _KT, default: None | _VT | _T = None, /) -> _VT | _T | None: raise AssumedToBeImplementedException

items

items() -> IsDictItems[_KT, _VT]
Source code in src/omnipy/shared/protocols/builtins.py
def items(self) -> IsDictItems[_KT, _VT]: raise AssumedToBeImplementedException

keys

keys() -> IsDictKeys[_KT, _VT]
Source code in src/omnipy/shared/protocols/builtins.py
def keys(self) -> IsDictKeys[_KT, _VT]: raise AssumedToBeImplementedException

pop

pop(key: _KT) -> _VT
pop(key: _KT, default: _VT) -> _VT
pop(key: _KT, default: _T) -> _VT | _T
Source code in src/omnipy/shared/protocols/builtins.py
def pop(self, key: _KT, default: None | _VT | _T = None, /) -> _VT | _T | None: raise AssumedToBeImplementedException

popitem

popitem() -> tuple[_KT, _VT]

D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.

Source code in src/omnipy/shared/protocols/typing.py
def popitem(self) -> tuple[_KT, _VT]:
    """
    D.popitem() -> (k, v), remove and return some (key, value) pair
       as a 2-tuple; but raise KeyError if D is empty.
    """
    raise AssumedToBeImplementedException

setdefault

setdefault(key: _KT, default: _VT) -> _VT

D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D

Source code in src/omnipy/shared/protocols/typing.py
def setdefault(self, key: _KT, default: _VT, /) -> _VT:
    """
    D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
    """
    raise AssumedToBeImplementedException

update

update(m: SupportsKeysAndGetItem[_KT, _VT]) -> None
update(m: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None
update(m: Iterable[tuple[_KT, _VT]]) -> None
update(m: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None
update(**kwargs: _VT) -> None

D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

Source code in src/omnipy/shared/protocols/typing.py
def update(
    self,
    m: (SupportsKeysAndGetItem[_KT, _VT] | SupportsKeysAndGetItem[str, _VT]
        | Iterable[tuple[_KT, _VT]] | Iterable[tuple[str, _VT]] | None) = None,
    /,
    **kwargs: _VT,
) -> None:
    """
    D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
    If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
    If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
    In either case, this is followed by: for k, v in F.items(): D[k] = v
    """
    raise AssumedToBeImplementedException

values

values() -> IsDictValues[_KT, _VT]
Source code in src/omnipy/shared/protocols/builtins.py
def values(self) -> IsDictValues[_KT, _VT]: raise AssumedToBeImplementedException

IsFloatContent

Bases: IsFloat, Protocol


              flowchart BT
              omnipy.shared.protocols.content.IsFloatContent[IsFloatContent]
              omnipy.shared.protocols.builtins.IsFloat[IsFloat]

                              omnipy.shared.protocols.builtins.IsFloat --> omnipy.shared.protocols.content.IsFloatContent
                


              click omnipy.shared.protocols.content.IsFloatContent href "" "omnipy.shared.protocols.content.IsFloatContent"
              click omnipy.shared.protocols.builtins.IsFloat href "" "omnipy.shared.protocols.builtins.IsFloat"
            

Protocol for float-like model content operations.

METHOD DESCRIPTION
as_integer_ratio
conjugate
from_number
fromhex
hex
is_integer
ATTRIBUTE DESCRIPTION
imag

TYPE: float

real

TYPE: float

Source code in src/omnipy/shared/protocols/content.py
class IsFloatContent(IsFloat, Protocol):
    """Protocol for float-like model content operations."""
    def __add__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __sub__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __mul__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __floordiv__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __truediv__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __mod__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __divmod__(self, value: ConvertibleToFloat, /) -> tuple[float, float]:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def __pow__(self, value: ConvertibleToFloat, mod: None = None, /) -> Any:
        raise AssumedToBeImplementedException

    @overload
    def __pow__(self, value: ConvertibleToInt, mod: None = None, /) -> Self:
        raise AssumedToBeImplementedException

    # positive __value -> float; negative __value -> complex
    # return type must be Any as `float | complex` causes too many false-positive errors

    def __pow__(self, value: ConvertibleToFloat | ConvertibleToInt, mod: None = None, /) -> Any:
        raise AssumedToBeImplementedException

    def __radd__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __iadd__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rsub__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rmul__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rfloordiv__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rtruediv__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rmod__(self, value: ConvertibleToFloat, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rdivmod__(self, value: ConvertibleToFloat, /) -> tuple[float, float]:
        raise AssumedToBeImplementedException

    def __rpow__(self, value: ConvertibleToInt | ConvertibleToFloat, mod: None = None, /) -> Any:
        raise AssumedToBeImplementedException

imag property

imag: float

real property

real: float

as_integer_ratio

as_integer_ratio() -> tuple[int, int]
Source code in src/omnipy/shared/protocols/builtins.py
def as_integer_ratio(self) -> tuple[int, int]: raise AssumedToBeImplementedException

conjugate

conjugate() -> float
Source code in src/omnipy/shared/protocols/builtins.py
def conjugate(self) -> float: raise AssumedToBeImplementedException

from_number classmethod

from_number(number: float | SupportsIndex | SupportsFloat) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
@classmethod
def from_number(cls, number: float | SupportsIndex | SupportsFloat, /) -> Self: raise AssumedToBeImplementedException

fromhex classmethod

fromhex(string: str) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
@classmethod
def fromhex(cls, string: str, /) -> Self: raise AssumedToBeImplementedException

hex

hex() -> str
Source code in src/omnipy/shared/protocols/builtins.py
def hex(self) -> str: raise AssumedToBeImplementedException

is_integer

is_integer() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def is_integer(self) -> bool: raise AssumedToBeImplementedException

IsIntContent

Bases: IsInt, Protocol


              flowchart BT
              omnipy.shared.protocols.content.IsIntContent[IsIntContent]
              omnipy.shared.protocols.builtins.IsInt[IsInt]

                              omnipy.shared.protocols.builtins.IsInt --> omnipy.shared.protocols.content.IsIntContent
                


              click omnipy.shared.protocols.content.IsIntContent href "" "omnipy.shared.protocols.content.IsIntContent"
              click omnipy.shared.protocols.builtins.IsInt href "" "omnipy.shared.protocols.builtins.IsInt"
            

Protocol for integer-like model content operations.

METHOD DESCRIPTION
as_integer_ratio
bit_count
bit_length
conjugate
from_bytes
is_integer
to_bytes
ATTRIBUTE DESCRIPTION
denominator

TYPE: Literal[1]

imag

TYPE: Literal[0]

numerator

TYPE: int

real

TYPE: int

Source code in src/omnipy/shared/protocols/content.py
class IsIntContent(IsInt, Protocol):
    """Protocol for integer-like model content operations."""
    def __add__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __sub__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __mul__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __floordiv__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __truediv__(self, value: ConvertibleToInt, /) -> float:
        raise AssumedToBeImplementedException

    def __mod__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __divmod__(self, value: ConvertibleToInt, /) -> tuple[int, int]:
        raise AssumedToBeImplementedException

    def __radd__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __iadd__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rsub__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rmul__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rfloordiv__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rtruediv__(self, value: ConvertibleToInt, /) -> float:
        raise AssumedToBeImplementedException

    def __rmod__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rdivmod__(self, value: ConvertibleToInt, /) -> tuple[int, int]:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def __pow__(self, x: Literal[0], /) -> Literal[1]:
        raise AssumedToBeImplementedException

    @overload
    def __pow__(self, value: Literal[0], mod: None, /) -> Literal[1]:
        raise AssumedToBeImplementedException

    @overload
    def __pow__(self, value: _PositiveInteger, mod: None = None, /) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def __pow__(self, value: _NegativeInteger, mod: None = None, /) -> float:
        raise AssumedToBeImplementedException

    # positive __value -> int; negative __value -> float
    # return type must be Any as `int | float` causes too many false-positive errors
    @overload
    def __pow__(self, value: ConvertibleToInt, mod: None = None, /) -> Any:
        raise AssumedToBeImplementedException

    @overload
    def __pow__(self, value: ConvertibleToInt, mod: ConvertibleToInt, /) -> Self:
        raise AssumedToBeImplementedException

    def __pow__(  # pyright: ignore[reportIncompatibleMethodOverride]
            self,
            value: ConvertibleToInt,
            mod: ConvertibleToInt | None = None,
            /) -> Self | float:
        raise AssumedToBeImplementedException

    def __rpow__(self, value: ConvertibleToInt, mod: ConvertibleToInt | None = None, /) -> Any:
        raise AssumedToBeImplementedException

    def __and__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __or__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __xor__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __lshift__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rshift__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rand__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __ror__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rxor__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rlshift__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    def __rrshift__(self, value: ConvertibleToInt, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

denominator property

denominator: Literal[1]

imag property

imag: Literal[0]

numerator property

numerator: int

real property

real: int

as_integer_ratio

as_integer_ratio() -> tuple[int, Literal[1]]
Source code in src/omnipy/shared/protocols/builtins.py
def as_integer_ratio(self) -> tuple[int, Literal[1]]: raise AssumedToBeImplementedException

bit_count

bit_count() -> int
Source code in src/omnipy/shared/protocols/builtins.py
def bit_count(self) -> int: raise AssumedToBeImplementedException

bit_length

bit_length() -> int
Source code in src/omnipy/shared/protocols/builtins.py
def bit_length(self) -> int: raise AssumedToBeImplementedException

conjugate

conjugate() -> int
Source code in src/omnipy/shared/protocols/builtins.py
def conjugate(self) -> int: raise AssumedToBeImplementedException

from_bytes classmethod

from_bytes(
    bytes: Iterable[SupportsIndex] | SupportsBytes | ReadableBuffer,
    byteorder: Literal["little", "big"],
    *,
    signed: bool = False,
) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
@classmethod
def from_bytes(
    cls,
    bytes: Iterable[SupportsIndex] | SupportsBytes | ReadableBuffer,
    byteorder: Literal["little", "big"],
    *, 
    signed: bool = False,
) -> Self: raise AssumedToBeImplementedException

is_integer

is_integer() -> Literal[True]
Source code in src/omnipy/shared/protocols/builtins.py
def is_integer(self) -> Literal[True]: raise AssumedToBeImplementedException

to_bytes

to_bytes(
    length: SupportsIndex, byteorder: Literal["little", "big"], *, signed: bool = False
) -> bytes
Source code in src/omnipy/shared/protocols/builtins.py
def to_bytes(self, length: SupportsIndex, byteorder: Literal["little", "big"], *, signed: bool = False) -> bytes: raise AssumedToBeImplementedException

IsListContent

Bases: IsList[_ValT], Protocol[_ValT]


              flowchart BT
              omnipy.shared.protocols.content.IsListContent[IsListContent]
              omnipy.shared.protocols.builtins.IsList[IsList]
              omnipy.shared.protocols.typing.IsMutableSequence[IsMutableSequence]
              omnipy.shared.protocols.typing.IsItemSequence[IsItemSequence]

                              omnipy.shared.protocols.builtins.IsList --> omnipy.shared.protocols.content.IsListContent
                                omnipy.shared.protocols.typing.IsMutableSequence --> omnipy.shared.protocols.builtins.IsList
                                omnipy.shared.protocols.typing.IsItemSequence --> omnipy.shared.protocols.typing.IsMutableSequence
                




              click omnipy.shared.protocols.content.IsListContent href "" "omnipy.shared.protocols.content.IsListContent"
              click omnipy.shared.protocols.builtins.IsList href "" "omnipy.shared.protocols.builtins.IsList"
              click omnipy.shared.protocols.typing.IsMutableSequence href "" "omnipy.shared.protocols.typing.IsMutableSequence"
              click omnipy.shared.protocols.typing.IsItemSequence href "" "omnipy.shared.protocols.typing.IsItemSequence"
            

Protocol for list model content with list-preserving operations.

METHOD DESCRIPTION
append
clear

S.clear() -> None -- remove all items from S

count
extend
index
insert
pop
remove
reverse

S.reverse() -- reverse IN PLACE

sort
Source code in src/omnipy/shared/protocols/content.py
class IsListContent(IsList[_ValT], Protocol[_ValT]):
    """Protocol for list model content with list-preserving operations."""
    @override
    def __add__(  # type: ignore [override]
        self,
        values: IsItemSequence[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __radd__(  # type: ignore [override]
        self,
        values: IsItemSequence[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __iadd__(  # type: ignore [override]
        self,
        values: IsItemSequence[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def __getitem__(self, i: SupportsIndex, /) -> _ValT:
        raise AssumedToBeImplementedException

    @overload
    def __getitem__(self, s: slice, /) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def __getitem__(self, s: slice | SupportsIndex, /) -> Self | _ValT:
        raise AssumedToBeImplementedException

    @override
    def __getitem__(  # pyright: ignore[reportIncompatibleMethodOverride]
        self,
        index: SupportsIndex | slice,
        /,
    ) -> Self | _ValT:
        raise AssumedToBeImplementedException

    @override
    def __mul__(self, value: SupportsIndex, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    @override
    def __rmul__(self, value: SupportsIndex, /) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

append

append(object: _T) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def append(self, object: _T, /) -> None: raise AssumedToBeImplementedException

clear

clear() -> None

S.clear() -> None -- remove all items from S

Source code in src/omnipy/shared/protocols/typing.py
def clear(self) -> None:
    """
    S.clear() -> None -- remove all items from S
    """
    raise AssumedToBeImplementedException

count

count(value: _T) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def count(self, value: _T, /) -> int: raise AssumedToBeImplementedException

extend

extend(iterable: Iterable[_T]) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def extend(self, iterable: Iterable[_T], /) -> None: raise AssumedToBeImplementedException

index

index(value: _T, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def index(self, value: _T, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int: raise AssumedToBeImplementedException

insert

insert(index: SupportsIndex, object: _T) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def insert(self, index: SupportsIndex, object: _T, /) -> None: raise AssumedToBeImplementedException

pop

pop(index: SupportsIndex = -1) -> _T
Source code in src/omnipy/shared/protocols/builtins.py
def pop(self, index: SupportsIndex = -1, /) -> _T: raise AssumedToBeImplementedException

remove

remove(value: _T) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def remove(self, value: _T, /) -> None: raise AssumedToBeImplementedException

reverse

reverse() -> None

S.reverse() -- reverse IN PLACE

Source code in src/omnipy/shared/protocols/typing.py
def reverse(self) -> None:
    """
    S.reverse() -- reverse *IN PLACE*
    """
    raise AssumedToBeImplementedException

sort

sort(*, key: None = None, reverse: bool = False) -> None
sort(*, key: Callable[[_T], SupportsRichComparison], reverse: bool = False) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def sort(self: IsList[_T] | IsList[SupportsRichComparisonT], *, key: Callable[[_T], SupportsRichComparison] | None = None, reverse: bool = False) -> None: raise AssumedToBeImplementedException

IsListOfDictsContent

Bases: IsListContent[_ValMappingT | SupportsKeysAndGetItem[_NestedKeyT, _NestedValT] | Iterable[tuple[_NestedKeyT, _NestedValT]]], Protocol[_ValMappingT, _NestedKeyT, _NestedValT]


              flowchart BT
              omnipy.shared.protocols.content.IsListOfDictsContent[IsListOfDictsContent]
              omnipy.shared.protocols.content.IsListContent[IsListContent]
              omnipy.shared.protocols.builtins.IsList[IsList]
              omnipy.shared.protocols.typing.IsMutableSequence[IsMutableSequence]
              omnipy.shared.protocols.typing.IsItemSequence[IsItemSequence]

                              omnipy.shared.protocols.content.IsListContent --> omnipy.shared.protocols.content.IsListOfDictsContent
                                omnipy.shared.protocols.builtins.IsList --> omnipy.shared.protocols.content.IsListContent
                                omnipy.shared.protocols.typing.IsMutableSequence --> omnipy.shared.protocols.builtins.IsList
                                omnipy.shared.protocols.typing.IsItemSequence --> omnipy.shared.protocols.typing.IsMutableSequence
                





              click omnipy.shared.protocols.content.IsListOfDictsContent href "" "omnipy.shared.protocols.content.IsListOfDictsContent"
              click omnipy.shared.protocols.content.IsListContent href "" "omnipy.shared.protocols.content.IsListContent"
              click omnipy.shared.protocols.builtins.IsList href "" "omnipy.shared.protocols.builtins.IsList"
              click omnipy.shared.protocols.typing.IsMutableSequence href "" "omnipy.shared.protocols.typing.IsMutableSequence"
              click omnipy.shared.protocols.typing.IsItemSequence href "" "omnipy.shared.protocols.typing.IsItemSequence"
            

Protocol for list content whose items are mapping-like values.

METHOD DESCRIPTION
append
clear

S.clear() -> None -- remove all items from S

count
extend
index
insert
pop
remove
reverse

S.reverse() -- reverse IN PLACE

sort
Source code in src/omnipy/shared/protocols/content.py
class IsListOfDictsContent(IsListContent[(_ValMappingT
                                          | SupportsKeysAndGetItem[_NestedKeyT, _NestedValT]
                                          | Iterable[tuple[_NestedKeyT, _NestedValT]])],
                           Protocol[_ValMappingT, _NestedKeyT, _NestedValT]):
    """Protocol for list content whose items are mapping-like values."""
    @overload  # type: ignore [override]
    def __getitem__(self, index: SupportsIndex, /) -> _ValMappingT:
        raise AssumedToBeImplementedException

    @overload
    def __getitem__(self, index: slice, /) -> IsListContent[_ValMappingT]:
        raise AssumedToBeImplementedException

    @override
    def __getitem__(  # pyright: ignore[reportIncompatibleMethodOverride]
        self,
        index: SupportsIndex | slice,
        /,
    ) -> _ValMappingT | IsListContent[_ValMappingT]:
        raise AssumedToBeImplementedException

    @override
    def __mul__(  # type: ignore [override]
            self, value: SupportsIndex, /) -> IsListContent[_ValMappingT]:
        raise AssumedToBeImplementedException

    @override
    def __rmul__(  # type: ignore [override]
            self, value: SupportsIndex, /) -> IsListContent[_ValMappingT]:
        raise AssumedToBeImplementedException

append

append(object: _T) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def append(self, object: _T, /) -> None: raise AssumedToBeImplementedException

clear

clear() -> None

S.clear() -> None -- remove all items from S

Source code in src/omnipy/shared/protocols/typing.py
def clear(self) -> None:
    """
    S.clear() -> None -- remove all items from S
    """
    raise AssumedToBeImplementedException

count

count(value: _T) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def count(self, value: _T, /) -> int: raise AssumedToBeImplementedException

extend

extend(iterable: Iterable[_T]) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def extend(self, iterable: Iterable[_T], /) -> None: raise AssumedToBeImplementedException

index

index(value: _T, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def index(self, value: _T, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int: raise AssumedToBeImplementedException

insert

insert(index: SupportsIndex, object: _T) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def insert(self, index: SupportsIndex, object: _T, /) -> None: raise AssumedToBeImplementedException

pop

pop(index: SupportsIndex = -1) -> _T
Source code in src/omnipy/shared/protocols/builtins.py
def pop(self, index: SupportsIndex = -1, /) -> _T: raise AssumedToBeImplementedException

remove

remove(value: _T) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def remove(self, value: _T, /) -> None: raise AssumedToBeImplementedException

reverse

reverse() -> None

S.reverse() -- reverse IN PLACE

Source code in src/omnipy/shared/protocols/typing.py
def reverse(self) -> None:
    """
    S.reverse() -- reverse *IN PLACE*
    """
    raise AssumedToBeImplementedException

sort

sort(*, key: None = None, reverse: bool = False) -> None
sort(*, key: Callable[[_T], SupportsRichComparison], reverse: bool = False) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def sort(self: IsList[_T] | IsList[SupportsRichComparisonT], *, key: Callable[[_T], SupportsRichComparison] | None = None, reverse: bool = False) -> None: raise AssumedToBeImplementedException

IsListOfListsContent

Bases: IsListContent[_ValSeqT | IsItemSequence[_NestedValT] | Generator[_NestedValT]], Protocol[_ValSeqT, _NestedValT]


              flowchart BT
              omnipy.shared.protocols.content.IsListOfListsContent[IsListOfListsContent]
              omnipy.shared.protocols.content.IsListContent[IsListContent]
              omnipy.shared.protocols.builtins.IsList[IsList]
              omnipy.shared.protocols.typing.IsMutableSequence[IsMutableSequence]
              omnipy.shared.protocols.typing.IsItemSequence[IsItemSequence]

                              omnipy.shared.protocols.content.IsListContent --> omnipy.shared.protocols.content.IsListOfListsContent
                                omnipy.shared.protocols.builtins.IsList --> omnipy.shared.protocols.content.IsListContent
                                omnipy.shared.protocols.typing.IsMutableSequence --> omnipy.shared.protocols.builtins.IsList
                                omnipy.shared.protocols.typing.IsItemSequence --> omnipy.shared.protocols.typing.IsMutableSequence
                





              click omnipy.shared.protocols.content.IsListOfListsContent href "" "omnipy.shared.protocols.content.IsListOfListsContent"
              click omnipy.shared.protocols.content.IsListContent href "" "omnipy.shared.protocols.content.IsListContent"
              click omnipy.shared.protocols.builtins.IsList href "" "omnipy.shared.protocols.builtins.IsList"
              click omnipy.shared.protocols.typing.IsMutableSequence href "" "omnipy.shared.protocols.typing.IsMutableSequence"
              click omnipy.shared.protocols.typing.IsItemSequence href "" "omnipy.shared.protocols.typing.IsItemSequence"
            
METHOD DESCRIPTION
append
clear

S.clear() -> None -- remove all items from S

count
extend
index
insert
pop
remove
reverse

S.reverse() -- reverse IN PLACE

sort
Source code in src/omnipy/shared/protocols/content.py
class IsListOfListsContent(IsListContent[_ValSeqT | IsItemSequence[_NestedValT]
                                         | Generator[_NestedValT]],
                           Protocol[_ValSeqT, _NestedValT]):
    @overload  # type: ignore [override]
    def __getitem__(self, index: SupportsIndex, /) -> _ValSeqT:
        raise AssumedToBeImplementedException

    @overload
    def __getitem__(
        self,
        index: slice,
        /,
    ) -> IsListContent[_ValSeqT]:
        raise AssumedToBeImplementedException

    @override
    def __getitem__(  # pyright: ignore[reportIncompatibleMethodOverride]
            self, index: SupportsIndex | slice, /) -> _ValSeqT | IsListContent[_ValSeqT]:
        raise AssumedToBeImplementedException

    @override
    def __mul__(  # type: ignore [override]
            self, value: SupportsIndex, /) -> IsListContent[_ValSeqT]:
        raise AssumedToBeImplementedException

    @override
    def __rmul__(  # type: ignore [override]
            self, value: SupportsIndex, /) -> IsListContent[_ValSeqT]:
        raise AssumedToBeImplementedException

append

append(object: _T) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def append(self, object: _T, /) -> None: raise AssumedToBeImplementedException

clear

clear() -> None

S.clear() -> None -- remove all items from S

Source code in src/omnipy/shared/protocols/typing.py
def clear(self) -> None:
    """
    S.clear() -> None -- remove all items from S
    """
    raise AssumedToBeImplementedException

count

count(value: _T) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def count(self, value: _T, /) -> int: raise AssumedToBeImplementedException

extend

extend(iterable: Iterable[_T]) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def extend(self, iterable: Iterable[_T], /) -> None: raise AssumedToBeImplementedException

index

index(value: _T, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def index(self, value: _T, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int: raise AssumedToBeImplementedException

insert

insert(index: SupportsIndex, object: _T) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def insert(self, index: SupportsIndex, object: _T, /) -> None: raise AssumedToBeImplementedException

pop

pop(index: SupportsIndex = -1) -> _T
Source code in src/omnipy/shared/protocols/builtins.py
def pop(self, index: SupportsIndex = -1, /) -> _T: raise AssumedToBeImplementedException

remove

remove(value: _T) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def remove(self, value: _T, /) -> None: raise AssumedToBeImplementedException

reverse

reverse() -> None

S.reverse() -- reverse IN PLACE

Source code in src/omnipy/shared/protocols/typing.py
def reverse(self) -> None:
    """
    S.reverse() -- reverse *IN PLACE*
    """
    raise AssumedToBeImplementedException

sort

sort(*, key: None = None, reverse: bool = False) -> None
sort(*, key: Callable[[_T], SupportsRichComparison], reverse: bool = False) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def sort(self: IsList[_T] | IsList[SupportsRichComparisonT], *, key: Callable[[_T], SupportsRichComparison] | None = None, reverse: bool = False) -> None: raise AssumedToBeImplementedException

IsPairTupleContent

Bases: IsHashable, IsTuple[_ValT | _SecondValT], Protocol[_ValT, _SecondValT]


              flowchart BT
              omnipy.shared.protocols.content.IsPairTupleContent[IsPairTupleContent]
              omnipy.shared.protocols.typing.IsHashable[IsHashable]
              omnipy.shared.protocols.builtins.IsTuple[IsTuple]
              omnipy.shared.protocols.typing.IsItemSequence[IsItemSequence]

                              omnipy.shared.protocols.typing.IsHashable --> omnipy.shared.protocols.content.IsPairTupleContent
                
                omnipy.shared.protocols.builtins.IsTuple --> omnipy.shared.protocols.content.IsPairTupleContent
                                omnipy.shared.protocols.typing.IsItemSequence --> omnipy.shared.protocols.builtins.IsTuple
                



              click omnipy.shared.protocols.content.IsPairTupleContent href "" "omnipy.shared.protocols.content.IsPairTupleContent"
              click omnipy.shared.protocols.typing.IsHashable href "" "omnipy.shared.protocols.typing.IsHashable"
              click omnipy.shared.protocols.builtins.IsTuple href "" "omnipy.shared.protocols.builtins.IsTuple"
              click omnipy.shared.protocols.typing.IsItemSequence href "" "omnipy.shared.protocols.typing.IsItemSequence"
            

Protocol for paired-type tuples as Model content, e.g. Model[tuple[int, str]]

IsPairTupleContent is a protocol with the same interface as the builtin class tuple, with exactly two elements (e.g. tuple[int, str]). As it is meant to annotate Omnipy Models for static typing, it does not support + and * operators (other than for empty tuples and multiplying by 1), as these operations would cause validation to fail.

METHOD DESCRIPTION
count
index
Source code in src/omnipy/shared/protocols/content.py
class IsPairTupleContent(IsHashable, IsTuple[_ValT | _SecondValT], Protocol[_ValT, _SecondValT]):
    """Protocol for paired-type tuples as Model content, e.g. `Model[tuple[int, str]]`

    IsPairTupleContent is a protocol with the same interface as the builtin class
    tuple, with exactly two elements (e.g. tuple[int, str]). As it is meant
    to annotate Omnipy Models for static typing, it does not support `+`
    and `*` operators (other than for empty tuples and multiplying by 1),
    as these operations would cause validation to fail.
    """
    @override
    def __add__(  # type: ignore [override]
            self, value: tuple[()], /) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __radd__(  # type: ignore [override]
            self, value: tuple[()], /) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __iadd__(  # type: ignore [override]
            self, value: tuple[()], /) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __mul__(  # type: ignore [override]
            self, value: Literal[1], /) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __rmul__(  # type: ignore [override]
            self, value: Literal[1], /) -> Self:
        raise AssumedToBeImplementedException

count

count(value: Any) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def count(self, value: Any, /) -> int: raise AssumedToBeImplementedException

index

index(value: Any, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def index(self, value: Any, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int: raise AssumedToBeImplementedException

IsSameTypeTupleContent

Bases: IsHashable, IsTuple[_ValT], Protocol[_ValT]


              flowchart BT
              omnipy.shared.protocols.content.IsSameTypeTupleContent[IsSameTypeTupleContent]
              omnipy.shared.protocols.typing.IsHashable[IsHashable]
              omnipy.shared.protocols.builtins.IsTuple[IsTuple]
              omnipy.shared.protocols.typing.IsItemSequence[IsItemSequence]

                              omnipy.shared.protocols.typing.IsHashable --> omnipy.shared.protocols.content.IsSameTypeTupleContent
                
                omnipy.shared.protocols.builtins.IsTuple --> omnipy.shared.protocols.content.IsSameTypeTupleContent
                                omnipy.shared.protocols.typing.IsItemSequence --> omnipy.shared.protocols.builtins.IsTuple
                



              click omnipy.shared.protocols.content.IsSameTypeTupleContent href "" "omnipy.shared.protocols.content.IsSameTypeTupleContent"
              click omnipy.shared.protocols.typing.IsHashable href "" "omnipy.shared.protocols.typing.IsHashable"
              click omnipy.shared.protocols.builtins.IsTuple href "" "omnipy.shared.protocols.builtins.IsTuple"
              click omnipy.shared.protocols.typing.IsItemSequence href "" "omnipy.shared.protocols.typing.IsItemSequence"
            

Protocol for single-type tuples as Model content, e.g. Model[tuple[int, ...]]

IsSameTypeTupleContent has the same interface as the builtin class tuple, but where all elements are of the same type (e.g. tuple[int, ...]). As it is meant to annotate Omnipy Models for static typing, it supports broader interoperability with other iterables of the same element type.

METHOD DESCRIPTION
count
index
Source code in src/omnipy/shared/protocols/content.py
class IsSameTypeTupleContent(IsHashable, IsTuple[_ValT], Protocol[_ValT]):
    """Protocol for single-type tuples as Model content, e.g. `Model[tuple[int, ...]]`

    IsSameTypeTupleContent has the same interface as the builtin class
    `tuple`, but where all elements are of the same type (e.g. `tuple[int,
    ...]`). As it is meant to annotate Omnipy Models for static typing, it
    supports broader interoperability with other iterables of the same
    element type.
    """
    @override
    def __add__(  # type: ignore [override]
        self,
        value: IsItemSequence[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __radd__(  # type: ignore [override]
        self,
        value: IsItemSequence[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __iadd__(  # type: ignore [override]
        self,
        value: IsItemSequence[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

count

count(value: Any) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def count(self, value: Any, /) -> int: raise AssumedToBeImplementedException

index

index(value: Any, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def index(self, value: Any, start: SupportsIndex = 0, stop: SupportsIndex = sys.maxsize, /) -> int: raise AssumedToBeImplementedException

IsSetContent

Bases: IsSet[_ValT], Protocol[_ValT]


              flowchart BT
              omnipy.shared.protocols.content.IsSetContent[IsSetContent]
              omnipy.shared.protocols.builtins.IsSet[IsSet]
              omnipy.shared.protocols.typing.IsMutableSet[IsMutableSet]
              omnipy.shared.protocols.typing.IsAbstractSet[IsAbstractSet]

                              omnipy.shared.protocols.builtins.IsSet --> omnipy.shared.protocols.content.IsSetContent
                                omnipy.shared.protocols.typing.IsMutableSet --> omnipy.shared.protocols.builtins.IsSet
                                omnipy.shared.protocols.typing.IsAbstractSet --> omnipy.shared.protocols.typing.IsMutableSet
                




              click omnipy.shared.protocols.content.IsSetContent href "" "omnipy.shared.protocols.content.IsSetContent"
              click omnipy.shared.protocols.builtins.IsSet href "" "omnipy.shared.protocols.builtins.IsSet"
              click omnipy.shared.protocols.typing.IsMutableSet href "" "omnipy.shared.protocols.typing.IsMutableSet"
              click omnipy.shared.protocols.typing.IsAbstractSet href "" "omnipy.shared.protocols.typing.IsAbstractSet"
            

Protocol for set model content with set-preserving operations.

METHOD DESCRIPTION
add
clear
difference
difference_update
discard
intersection
intersection_update
isdisjoint
issubset
issuperset
pop
remove
symmetric_difference
symmetric_difference_update
union
update
Source code in src/omnipy/shared/protocols/content.py
class IsSetContent(IsSet[_ValT], Protocol[_ValT]):
    """Protocol for set model content with set-preserving operations."""
    @override
    def difference(self, *s: Iterable[object]) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    @override
    def difference_update(self, *s: Iterable[object]) -> None:
        raise AssumedToBeImplementedException

    @override
    def intersection(self, *s: Iterable[object]) -> Self:  # type: ignore [override]
        raise AssumedToBeImplementedException

    @override
    def intersection_update(self, *s: Iterable[object]) -> None:
        raise AssumedToBeImplementedException

    @overload
    def symmetric_difference(  # pyright: ignore[reportOverlappingOverload]
            self,
            value: Iterable[_ValT],
            /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def symmetric_difference(self, value: Iterable[_OtherT], /) -> set[_ValT | _OtherT]:
        raise AssumedToBeImplementedException

    @override
    def symmetric_difference(self, value: Iterable[object], /) -> Self | set[_ValT | _OtherT]:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def union(  # pyright: ignore[reportOverlappingOverload]
            self,
            value: Iterable[_ValT],
            /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def union(self, value: Iterable[_OtherT], /) -> set[_ValT | _OtherT]:
        raise AssumedToBeImplementedException

    @override
    def union(  # pyright: ignore[reportIncompatibleMethodOverride]
        self,
        value: Iterable[object],
        /,
    ) -> Self | set[_ValT | _OtherT]:
        raise AssumedToBeImplementedException

    @override
    def __and__(  # type: ignore [override]
        self,
        value: IsAbstractSet[object] | IsItemSequence[object] | Generator[object],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __iand__(  # type: ignore [override]
        self,
        value: IsAbstractSet[object] | IsItemSequence[object] | Generator[object],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def __or__(
        self,
        value: IsAbstractSet[_ValT] | IsItemSequence[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def __or__(self, value: IsAbstractSet[_OtherT], /) -> set[_ValT | _OtherT]:
        raise AssumedToBeImplementedException

    @override
    def __or__(
        self,
        value: IsAbstractSet[object] | IsItemSequence[_ValT] | Generator[_ValT],
        /,
    ) -> Self | set[_ValT | _OtherT]:
        raise AssumedToBeImplementedException

    @override
    def __ior__(  # type: ignore [override]
        self,
        value: IsAbstractSet[_ValT] | IsItemSequence[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __sub__(  # type: ignore [override]
        self,
        value: (IsAbstractSet[_ValT | None] | IsItemSequence[_ValT | None]
                | Generator[_ValT | None]),
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @override
    def __isub__(  # type: ignore [override]
        self,
        value: IsAbstractSet[object] | IsItemSequence[object] | Generator[object],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @overload  # type: ignore [override]
    def __xor__(
        self,
        value: IsAbstractSet[_ValT] | IsItemSequence[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

    @overload
    def __xor__(self, value: IsAbstractSet[_OtherT], /) -> set[_ValT | _OtherT]:
        raise AssumedToBeImplementedException

    @override
    def __xor__(
        self,
        value: IsAbstractSet[object] | IsItemSequence[_ValT] | Generator[_ValT],
        /,
    ) -> Self | set[_ValT | _OtherT]:
        raise AssumedToBeImplementedException

    @override
    def __ixor__(  # type: ignore [override]
        self,
        value: IsAbstractSet[_ValT] | IsItemSequence[_ValT] | Generator[_ValT],
        /,
    ) -> Self:
        raise AssumedToBeImplementedException

add

add(element: _T) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def add(self, element: _T, /) -> None: raise AssumedToBeImplementedException

clear

clear() -> None
Source code in src/omnipy/shared/protocols/typing.py
def clear(self) -> None: raise AssumedToBeImplementedException

difference

difference(*s: Iterable[object]) -> Self
Source code in src/omnipy/shared/protocols/content.py
@override
def difference(self, *s: Iterable[object]) -> Self:  # type: ignore [override]
    raise AssumedToBeImplementedException

difference_update

difference_update(*s: Iterable[object]) -> None
Source code in src/omnipy/shared/protocols/content.py
@override
def difference_update(self, *s: Iterable[object]) -> None:
    raise AssumedToBeImplementedException

discard

discard(element: object) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def discard(self, element: object, /) -> None: raise AssumedToBeImplementedException

intersection

intersection(*s: Iterable[object]) -> Self
Source code in src/omnipy/shared/protocols/content.py
@override
def intersection(self, *s: Iterable[object]) -> Self:  # type: ignore [override]
    raise AssumedToBeImplementedException

intersection_update

intersection_update(*s: Iterable[object]) -> None
Source code in src/omnipy/shared/protocols/content.py
@override
def intersection_update(self, *s: Iterable[object]) -> None:
    raise AssumedToBeImplementedException

isdisjoint

isdisjoint(s: Iterable[object]) -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isdisjoint(self, s: Iterable[object], /) -> bool: raise AssumedToBeImplementedException

issubset

issubset(s: Iterable[object]) -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def issubset(self, s: Iterable[object], /) -> bool: raise AssumedToBeImplementedException

issuperset

issuperset(s: Iterable[object]) -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def issuperset(self, s: Iterable[object], /) -> bool: raise AssumedToBeImplementedException

pop

pop() -> _T
Source code in src/omnipy/shared/protocols/typing.py
def pop(self) -> _T: raise AssumedToBeImplementedException

remove

remove(element: _T) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def remove(self, element: _T, /) -> None: raise AssumedToBeImplementedException

symmetric_difference

symmetric_difference(value: Iterable[_ValT]) -> Self
symmetric_difference(value: Iterable[_OtherT]) -> set[_ValT | _OtherT]
Source code in src/omnipy/shared/protocols/content.py
@override
def symmetric_difference(self, value: Iterable[object], /) -> Self | set[_ValT | _OtherT]:
    raise AssumedToBeImplementedException

symmetric_difference_update

symmetric_difference_update(s: Iterable[_T]) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def symmetric_difference_update(self, s: Iterable[_T], /) -> None: raise AssumedToBeImplementedException

union

union(value: Iterable[_ValT]) -> Self
union(value: Iterable[_OtherT]) -> set[_ValT | _OtherT]
Source code in src/omnipy/shared/protocols/content.py
@override
def union(  # pyright: ignore[reportIncompatibleMethodOverride]
    self,
    value: Iterable[object],
    /,
) -> Self | set[_ValT | _OtherT]:
    raise AssumedToBeImplementedException

update

update(*s: Iterable[_T]) -> None
Source code in src/omnipy/shared/protocols/builtins.py
def update(self, *s: Iterable[_T]) -> None: raise AssumedToBeImplementedException

IsStrContent

Bases: IsStr, Protocol


              flowchart BT
              omnipy.shared.protocols.content.IsStrContent[IsStrContent]
              omnipy.shared.protocols.builtins.IsStr[IsStr]
              omnipy.shared.protocols.typing.IsItemSequence[IsItemSequence]

                              omnipy.shared.protocols.builtins.IsStr --> omnipy.shared.protocols.content.IsStrContent
                                omnipy.shared.protocols.typing.IsItemSequence --> omnipy.shared.protocols.builtins.IsStr
                



              click omnipy.shared.protocols.content.IsStrContent href "" "omnipy.shared.protocols.content.IsStrContent"
              click omnipy.shared.protocols.builtins.IsStr href "" "omnipy.shared.protocols.builtins.IsStr"
              click omnipy.shared.protocols.typing.IsItemSequence href "" "omnipy.shared.protocols.typing.IsItemSequence"
            

Protocol for string model content concatenation.

METHOD DESCRIPTION
capitalize
casefold
center
count
encode
endswith
expandtabs
find
format
format_map
index
isalnum
isalpha
isascii
isdecimal
isdigit
isidentifier
islower
isnumeric
isprintable
isspace
istitle
isupper
join
ljust
lower
lstrip
maketrans
partition
removeprefix
removesuffix
replace
rfind
rindex
rjust
rpartition
rsplit
rstrip
split
splitlines
startswith
strip
swapcase
title
translate
upper
zfill
Source code in src/omnipy/shared/protocols/content.py
class IsStrContent(IsStr, Protocol):
    """Protocol for string model content concatenation."""
    def __add__(self, value: IsStr, /) -> Self:
        raise AssumedToBeImplementedException

    def __radd__(self, value: IsStr, /) -> Self:
        raise AssumedToBeImplementedException

    def __iadd__(self, value: IsStr, /) -> Self:
        raise AssumedToBeImplementedException

capitalize

capitalize() -> LiteralString
capitalize() -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def capitalize(self) -> Self | LiteralString: raise AssumedToBeImplementedException

casefold

casefold() -> LiteralString
casefold() -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def casefold(self) -> Self | LiteralString: raise AssumedToBeImplementedException

center

center(width: SupportsIndex, fillchar: LiteralString = ' ') -> LiteralString
center(width: SupportsIndex, fillchar: str = ' ') -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def center(self, width: SupportsIndex, fillchar: str | LiteralString = ' ', /) -> Self | LiteralString: raise AssumedToBeImplementedException

count

count(sub: str, start: SupportsIndex | None = None, end: SupportsIndex | None = None) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def count(self, sub: str, start: SupportsIndex | None = None, end: SupportsIndex | None = None, /) -> int: raise AssumedToBeImplementedException

encode

encode(encoding: str = 'utf-8', errors: str = 'strict') -> bytes
Source code in src/omnipy/shared/protocols/builtins.py
def encode(self, encoding: str = "utf-8", errors: str = "strict") -> bytes: raise AssumedToBeImplementedException

endswith

endswith(
    suffix: str | tuple[str, ...],
    start: SupportsIndex | None = None,
    end: SupportsIndex | None = None,
) -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def endswith(
    self, suffix: str | tuple[str, ...], start: SupportsIndex | None = None, end: SupportsIndex | None = None, /
) -> bool: raise AssumedToBeImplementedException

expandtabs

expandtabs(tabsize: SupportsIndex = 8) -> LiteralString
expandtabs(tabsize: SupportsIndex = 8) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def expandtabs(self, tabsize: SupportsIndex = 8) -> Self | LiteralString: raise AssumedToBeImplementedException

find

find(sub: str, start: SupportsIndex | None = None, end: SupportsIndex | None = None) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def find(self, sub: str, start: SupportsIndex | None = None, end: SupportsIndex | None = None, /) -> int: raise AssumedToBeImplementedException

format

format(*args: LiteralString, **kwargs: LiteralString) -> LiteralString
format(*args: object, **kwargs: object) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def format(self, *args: object | LiteralString, **kwargs: object | LiteralString) -> Self | LiteralString: raise AssumedToBeImplementedException

format_map

format_map(mapping: _FormatMapMapping) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def format_map(self, mapping: _FormatMapMapping, /) -> Self: raise AssumedToBeImplementedException

index

index(sub: str, start: SupportsIndex | None = None, end: SupportsIndex | None = None) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def index(self, sub: str, start: SupportsIndex | None = None, end: SupportsIndex | None = None, /) -> int: raise AssumedToBeImplementedException

isalnum

isalnum() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isalnum(self) -> bool: raise AssumedToBeImplementedException

isalpha

isalpha() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isalpha(self) -> bool: raise AssumedToBeImplementedException

isascii

isascii() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isascii(self) -> bool: raise AssumedToBeImplementedException

isdecimal

isdecimal() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isdecimal(self) -> bool: raise AssumedToBeImplementedException

isdigit

isdigit() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isdigit(self) -> bool: raise AssumedToBeImplementedException

isidentifier

isidentifier() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isidentifier(self) -> bool: raise AssumedToBeImplementedException

islower

islower() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def islower(self) -> bool: raise AssumedToBeImplementedException

isnumeric

isnumeric() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isnumeric(self) -> bool: raise AssumedToBeImplementedException

isprintable

isprintable() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isprintable(self) -> bool: raise AssumedToBeImplementedException

isspace

isspace() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isspace(self) -> bool: raise AssumedToBeImplementedException

istitle

istitle() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def istitle(self) -> bool: raise AssumedToBeImplementedException

isupper

isupper() -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def isupper(self) -> bool: raise AssumedToBeImplementedException

join

join(iterable: Iterable[LiteralString]) -> LiteralString
join(iterable: Iterable[str]) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def join(self, iterable: Iterable[str] | Iterable[LiteralString], /) -> Self | LiteralString: raise AssumedToBeImplementedException

ljust

ljust(width: SupportsIndex, fillchar: LiteralString = ' ') -> LiteralString
ljust(width: SupportsIndex, fillchar: str = ' ') -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def ljust(self, width: SupportsIndex, fillchar: str | LiteralString = ' ', /) -> Self | LiteralString: raise AssumedToBeImplementedException

lower

lower() -> LiteralString
lower() -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def lower(self) -> Self | LiteralString: raise AssumedToBeImplementedException

lstrip

lstrip(chars: LiteralString | None = None) -> LiteralString
lstrip(chars: str | None = None) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def lstrip(self, chars: str | LiteralString | None = None, /) -> Self | LiteralString: raise AssumedToBeImplementedException

maketrans staticmethod

maketrans(
    x: dict[int, _T]
    | dict[str, _T]
    | dict[str | int, _T]
    | frozendict[int, _T]
    | frozendict[str, _T]
    | frozendict[str | int, _T],
) -> dict[int, _T]
maketrans(x: dict[int, _T] | dict[str, _T] | dict[str | int, _T]) -> dict[int, _T]
maketrans(x: str, y: str) -> dict[int, int]
maketrans(x: str, y: str, z: str) -> dict[int, int | None]
Source code in src/omnipy/shared/protocols/builtins.py
@staticmethod
def maketrans(x: str | dict[int, _T] | dict[str, _T] | dict[str | int, _T], y: str | None = None, z: str | None = None, /) -> dict[int, _T] | dict[int, int] | dict[int, int | None]: raise AssumedToBeImplementedException

partition

partition(sep: LiteralString) -> tuple[LiteralString, LiteralString, LiteralString]
partition(sep: str) -> tuple[Self, Self, Self]
Source code in src/omnipy/shared/protocols/builtins.py
def partition(self, sep: str | LiteralString, /) -> tuple[Self, Self, Self] | tuple[LiteralString, LiteralString, LiteralString]: raise AssumedToBeImplementedException

removeprefix

removeprefix(prefix: LiteralString) -> LiteralString
removeprefix(prefix: str) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def removeprefix(self, prefix: str | LiteralString, /) -> Self | LiteralString: raise AssumedToBeImplementedException

removesuffix

removesuffix(suffix: LiteralString) -> LiteralString
removesuffix(suffix: str) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def removesuffix(self, suffix: str | LiteralString, /) -> Self | LiteralString: raise AssumedToBeImplementedException

replace

replace(old: LiteralString, new: LiteralString, count: SupportsIndex = -1) -> LiteralString
replace(old: str, new: str, count: SupportsIndex = -1) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def replace(self, old: str | LiteralString, new: str | LiteralString, count: SupportsIndex = -1, /) -> Self | LiteralString: raise AssumedToBeImplementedException

rfind

rfind(sub: str, start: SupportsIndex | None = None, end: SupportsIndex | None = None) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def rfind(self, sub: str, start: SupportsIndex | None = None, end: SupportsIndex | None = None, /) -> int: raise AssumedToBeImplementedException

rindex

rindex(sub: str, start: SupportsIndex | None = None, end: SupportsIndex | None = None) -> int
Source code in src/omnipy/shared/protocols/builtins.py
def rindex(self, sub: str, start: SupportsIndex | None = None, end: SupportsIndex | None = None, /) -> int: raise AssumedToBeImplementedException

rjust

rjust(width: SupportsIndex, fillchar: LiteralString = ' ') -> LiteralString
rjust(width: SupportsIndex, fillchar: str = ' ') -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def rjust(self, width: SupportsIndex, fillchar: str | LiteralString = " ", /) -> Self | LiteralString: raise AssumedToBeImplementedException

rpartition

rpartition(sep: LiteralString) -> tuple[LiteralString, LiteralString, LiteralString]
rpartition(sep: str) -> tuple[Self, Self, Self]
Source code in src/omnipy/shared/protocols/builtins.py
def rpartition(self, sep: str | LiteralString, /) -> tuple[Self, Self, Self] | tuple[LiteralString, LiteralString, LiteralString]: raise AssumedToBeImplementedException

rsplit

rsplit(sep: LiteralString | None = None, maxsplit: SupportsIndex = -1) -> list[LiteralString]
rsplit(sep: str | None = None, maxsplit: SupportsIndex = -1) -> list[Self]
Source code in src/omnipy/shared/protocols/builtins.py
def rsplit(self, sep: str | LiteralString | None = None, maxsplit: SupportsIndex = -1) -> list[Self] | list[LiteralString]: raise AssumedToBeImplementedException

rstrip

rstrip(chars: LiteralString | None = None) -> LiteralString
rstrip(chars: str | None = None) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def rstrip(self, chars: str | None = None, /) -> Self | LiteralString: raise AssumedToBeImplementedException

split

split(sep: LiteralString | None = None, maxsplit: SupportsIndex = -1) -> list[LiteralString]
split(sep: str | None = None, maxsplit: SupportsIndex = -1) -> list[Self]
Source code in src/omnipy/shared/protocols/builtins.py
def split(self, sep: str | LiteralString | None = None, maxsplit: SupportsIndex = -1) -> list[Self] | list[LiteralString]: raise AssumedToBeImplementedException

splitlines

splitlines(keepends: bool = False) -> list[LiteralString]
splitlines(keepends: bool = False) -> list[Self]
Source code in src/omnipy/shared/protocols/builtins.py
def splitlines(self, keepends: bool = False) -> list[Self] | list[LiteralString]: raise AssumedToBeImplementedException

startswith

startswith(
    prefix: str | tuple[str, ...],
    start: SupportsIndex | None = None,
    end: SupportsIndex | None = None,
) -> bool
Source code in src/omnipy/shared/protocols/builtins.py
def startswith(
    self, prefix: str | tuple[str, ...], start: SupportsIndex | None = None, end: SupportsIndex | None = None, /
) -> bool: raise AssumedToBeImplementedException

strip

strip(chars: LiteralString | None = None) -> LiteralString
strip(chars: str | None = None) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def strip(self, chars: str | LiteralString | None = None, /) -> Self | LiteralString: raise AssumedToBeImplementedException

swapcase

swapcase() -> LiteralString
swapcase() -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def swapcase(self) -> Self | LiteralString: raise AssumedToBeImplementedException

title

title() -> LiteralString
title() -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def title(self) -> Self | LiteralString: raise AssumedToBeImplementedException

translate

translate(table: _TranslateTable) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def translate(self, table: _TranslateTable, /) -> Self: raise AssumedToBeImplementedException

upper

upper() -> LiteralString
upper() -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def upper(self) -> Self | LiteralString: raise AssumedToBeImplementedException

zfill

zfill(width: SupportsIndex) -> LiteralString
zfill(width: SupportsIndex) -> Self
Source code in src/omnipy/shared/protocols/builtins.py
def zfill(self, width: SupportsIndex, /) -> Self | LiteralString: raise AssumedToBeImplementedException