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. |
IsSameTypeTupleContent |
Protocol for single-type tuples as Model content, e.g. |
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:
|
imag |
TYPE:
|
numerator |
TYPE:
|
real |
TYPE:
|
Source code in src/omnipy/shared/protocols/content.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | |
as_integer_ratio
Source code in src/omnipy/shared/protocols/builtins.py
bit_count
Source code in src/omnipy/shared/protocols/builtins.py
bit_length
Source code in src/omnipy/shared/protocols/builtins.py
conjugate
Source code in src/omnipy/shared/protocols/builtins.py
from_bytes
classmethod
is_integer
Source code in src/omnipy/shared/protocols/builtins.py
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.
Source code in src/omnipy/shared/protocols/content.py
capitalize
Source code in src/omnipy/shared/protocols/builtins.py
center
Source code in src/omnipy/shared/protocols/builtins.py
count
decode
Source code in src/omnipy/shared/protocols/builtins.py
endswith
expandtabs
Source code in src/omnipy/shared/protocols/builtins.py
find
fromhex
classmethod
hex
Source code in src/omnipy/shared/protocols/builtins.py
index
isalnum
Source code in src/omnipy/shared/protocols/builtins.py
isalpha
Source code in src/omnipy/shared/protocols/builtins.py
isascii
Source code in src/omnipy/shared/protocols/builtins.py
isdigit
Source code in src/omnipy/shared/protocols/builtins.py
islower
Source code in src/omnipy/shared/protocols/builtins.py
isspace
Source code in src/omnipy/shared/protocols/builtins.py
istitle
Source code in src/omnipy/shared/protocols/builtins.py
isupper
Source code in src/omnipy/shared/protocols/builtins.py
join
Source code in src/omnipy/shared/protocols/builtins.py
ljust
Source code in src/omnipy/shared/protocols/builtins.py
lower
Source code in src/omnipy/shared/protocols/builtins.py
lstrip
Source code in src/omnipy/shared/protocols/builtins.py
maketrans
staticmethod
partition
Source code in src/omnipy/shared/protocols/builtins.py
removeprefix
Source code in src/omnipy/shared/protocols/builtins.py
removesuffix
Source code in src/omnipy/shared/protocols/builtins.py
replace
Source code in src/omnipy/shared/protocols/builtins.py
rfind
rindex
rjust
Source code in src/omnipy/shared/protocols/builtins.py
rpartition
Source code in src/omnipy/shared/protocols/builtins.py
rsplit
Source code in src/omnipy/shared/protocols/builtins.py
rstrip
Source code in src/omnipy/shared/protocols/builtins.py
split
Source code in src/omnipy/shared/protocols/builtins.py
splitlines
Source code in src/omnipy/shared/protocols/builtins.py
startswith
strip
Source code in src/omnipy/shared/protocols/builtins.py
swapcase
Source code in src/omnipy/shared/protocols/builtins.py
title
Source code in src/omnipy/shared/protocols/builtins.py
translate
Source code in src/omnipy/shared/protocols/builtins.py
upper
Source code in src/omnipy/shared/protocols/builtins.py
zfill
Source code in src/omnipy/shared/protocols/builtins.py
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 |
Source code in src/omnipy/shared/protocols/content.py
default_value
classmethod
Return the value used to pad missing cells in a column.
| RETURNS | DESCRIPTION |
|---|---|
_ValT
|
Default placeholder value for newly created cells.
TYPE:
|
filled
classmethod
Create a column prefilled with length copies of value.
| PARAMETER | DESCRIPTION |
|---|---|
value
|
Value to repeat.
TYPE:
|
length
|
Number of items to include.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Self
|
Column instance filled with repeated values.
TYPE:
|
Source code in src/omnipy/shared/protocols/content.py
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.
-
Reference
Code reference
omnipy
shared
protocols
contentIsConcatenableItemSequenceLikeColumnContent
Source code in src/omnipy/shared/protocols/content.py
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
clear
fromkeys
classmethod
get
Source code in src/omnipy/shared/protocols/builtins.py
items
Source code in src/omnipy/shared/protocols/builtins.py
keys
Source code in src/omnipy/shared/protocols/builtins.py
pop
Source code in src/omnipy/shared/protocols/builtins.py
popitem
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
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. 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
values
Source code in src/omnipy/shared/protocols/builtins.py
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
clear
fromkeys
classmethod
get
Source code in src/omnipy/shared/protocols/builtins.py
items
Source code in src/omnipy/shared/protocols/builtins.py
keys
Source code in src/omnipy/shared/protocols/builtins.py
pop
Source code in src/omnipy/shared/protocols/builtins.py
popitem
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
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. 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
values
Source code in src/omnipy/shared/protocols/builtins.py
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
clear
fromkeys
classmethod
get
Source code in src/omnipy/shared/protocols/builtins.py
items
Source code in src/omnipy/shared/protocols/builtins.py
keys
Source code in src/omnipy/shared/protocols/builtins.py
pop
Source code in src/omnipy/shared/protocols/builtins.py
popitem
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
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. 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
values
Source code in src/omnipy/shared/protocols/builtins.py
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
clear
fromkeys
classmethod
get
Source code in src/omnipy/shared/protocols/builtins.py
items
Source code in src/omnipy/shared/protocols/builtins.py
keys
Source code in src/omnipy/shared/protocols/builtins.py
pop
Source code in src/omnipy/shared/protocols/builtins.py
popitem
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
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. 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
values
Source code in src/omnipy/shared/protocols/builtins.py
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:
|
real |
TYPE:
|
Source code in src/omnipy/shared/protocols/content.py
as_integer_ratio
Source code in src/omnipy/shared/protocols/builtins.py
conjugate
Source code in src/omnipy/shared/protocols/builtins.py
from_number
classmethod
fromhex
classmethod
hex
Source code in src/omnipy/shared/protocols/builtins.py
is_integer
Source code in src/omnipy/shared/protocols/builtins.py
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:
|
imag |
TYPE:
|
numerator |
TYPE:
|
real |
TYPE:
|
Source code in src/omnipy/shared/protocols/content.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
as_integer_ratio
Source code in src/omnipy/shared/protocols/builtins.py
bit_count
Source code in src/omnipy/shared/protocols/builtins.py
bit_length
Source code in src/omnipy/shared/protocols/builtins.py
conjugate
Source code in src/omnipy/shared/protocols/builtins.py
from_bytes
classmethod
is_integer
Source code in src/omnipy/shared/protocols/builtins.py
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
append
Source code in src/omnipy/shared/protocols/builtins.py
clear
count
Source code in src/omnipy/shared/protocols/builtins.py
extend
Source code in src/omnipy/shared/protocols/builtins.py
index
Source code in src/omnipy/shared/protocols/builtins.py
insert
Source code in src/omnipy/shared/protocols/builtins.py
pop
Source code in src/omnipy/shared/protocols/builtins.py
remove
Source code in src/omnipy/shared/protocols/builtins.py
reverse
sort
Source code in src/omnipy/shared/protocols/builtins.py
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
append
Source code in src/omnipy/shared/protocols/builtins.py
clear
count
Source code in src/omnipy/shared/protocols/builtins.py
extend
Source code in src/omnipy/shared/protocols/builtins.py
index
Source code in src/omnipy/shared/protocols/builtins.py
insert
Source code in src/omnipy/shared/protocols/builtins.py
pop
Source code in src/omnipy/shared/protocols/builtins.py
remove
Source code in src/omnipy/shared/protocols/builtins.py
reverse
sort
Source code in src/omnipy/shared/protocols/builtins.py
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
append
Source code in src/omnipy/shared/protocols/builtins.py
clear
count
Source code in src/omnipy/shared/protocols/builtins.py
extend
Source code in src/omnipy/shared/protocols/builtins.py
index
Source code in src/omnipy/shared/protocols/builtins.py
insert
Source code in src/omnipy/shared/protocols/builtins.py
pop
Source code in src/omnipy/shared/protocols/builtins.py
remove
Source code in src/omnipy/shared/protocols/builtins.py
reverse
sort
Source code in src/omnipy/shared/protocols/builtins.py
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
count
Source code in src/omnipy/shared/protocols/builtins.py
index
Source code in src/omnipy/shared/protocols/builtins.py
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
count
Source code in src/omnipy/shared/protocols/builtins.py
index
Source code in src/omnipy/shared/protocols/builtins.py
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.
Source code in src/omnipy/shared/protocols/content.py
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | |
add
Source code in src/omnipy/shared/protocols/builtins.py
clear
Source code in src/omnipy/shared/protocols/typing.py
difference
difference_update
discard
Source code in src/omnipy/shared/protocols/builtins.py
intersection
intersection_update
isdisjoint
Source code in src/omnipy/shared/protocols/builtins.py
issubset
Source code in src/omnipy/shared/protocols/builtins.py
issuperset
Source code in src/omnipy/shared/protocols/builtins.py
pop
Source code in src/omnipy/shared/protocols/typing.py
remove
Source code in src/omnipy/shared/protocols/builtins.py
symmetric_difference
symmetric_difference_update
Source code in src/omnipy/shared/protocols/builtins.py
union
update
Source code in src/omnipy/shared/protocols/builtins.py
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.
Source code in src/omnipy/shared/protocols/content.py
capitalize
Source code in src/omnipy/shared/protocols/builtins.py
casefold
Source code in src/omnipy/shared/protocols/builtins.py
center
Source code in src/omnipy/shared/protocols/builtins.py
count
Source code in src/omnipy/shared/protocols/builtins.py
encode
Source code in src/omnipy/shared/protocols/builtins.py
endswith
expandtabs
Source code in src/omnipy/shared/protocols/builtins.py
find
Source code in src/omnipy/shared/protocols/builtins.py
format
Source code in src/omnipy/shared/protocols/builtins.py
format_map
Source code in src/omnipy/shared/protocols/builtins.py
index
Source code in src/omnipy/shared/protocols/builtins.py
isalnum
Source code in src/omnipy/shared/protocols/builtins.py
isalpha
Source code in src/omnipy/shared/protocols/builtins.py
isascii
Source code in src/omnipy/shared/protocols/builtins.py
isdecimal
Source code in src/omnipy/shared/protocols/builtins.py
isdigit
Source code in src/omnipy/shared/protocols/builtins.py
isidentifier
Source code in src/omnipy/shared/protocols/builtins.py
islower
Source code in src/omnipy/shared/protocols/builtins.py
isnumeric
Source code in src/omnipy/shared/protocols/builtins.py
isprintable
Source code in src/omnipy/shared/protocols/builtins.py
isspace
Source code in src/omnipy/shared/protocols/builtins.py
istitle
Source code in src/omnipy/shared/protocols/builtins.py
isupper
Source code in src/omnipy/shared/protocols/builtins.py
join
Source code in src/omnipy/shared/protocols/builtins.py
ljust
Source code in src/omnipy/shared/protocols/builtins.py
lower
Source code in src/omnipy/shared/protocols/builtins.py
lstrip
Source code in src/omnipy/shared/protocols/builtins.py
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]