bagof.hints
Reusable typing hints for Python projects.
Unpacked modules
Unpacked modules have all their symbols imported into the root module.
For example, JSON can be accessed via
bagof.hints.json.JSON or bagof.hints.JSON.
Lazy modules
Lazy modules (numpy, cupy, dask)
are not imported by default. Importing them (or accessing them as
bagof.hints.<name>) does not import the corresponding array library
either: it is only imported (if installed) when one of their attributes
that needs it is accessed, e.g. bagof.hints.numpy.ndarray. They stay
importable when that library is absent.
Modules:
| Name | Description |
|---|---|
array |
Library-agnostic protocols for array-like objects. |
builtin |
Builtin types (such as builtin subsets of
|
collections |
Protocols that are compatible with
|
flexi |
Flexible "type-like" aliases for use in converters. |
json |
Types related to JSON (de)serialization. |
strings |
String-like objects. |
typevars |
Reusable TypeVars. |
unpackable |
Objects unpackable into keyword arguments. |
numpy |
Hints for |
cupy |
Hints for |
dask |
Hints for [ |