katso
# lib/am.py
from dataclasses import dataclass
from typing import Optional
import katso
with katso:
from lib import am, bm
assert isinstance(bm.B, str)
@dataclass(kw_only=True)
class A:
a: int
b: Optional[bm.B] = None
@property
def _b(self: am.A) -> bm.B:
assert isinstance(self, am.A)
assert isinstance(bm.B, type)
return bm.B(a=self, b=str(self.a))
# lib/bm.py
from dataclasses import dataclass
from typing import Optional
import katso
with katso:
from lib import am
@dataclass(kw_only=True)
class B:
a: Optional[am.A] = None
b: str
# bin/cm.py
from dataclasses import dataclass
from lib import am, bm
@dataclass
class C:
a: am.A
b: bm.B
def __post_init__(self):
self.a.b = self.b
self.b.a = self.a
# def __init__
# class C
c = C(am.A(a=42), bm.B(b='spam'))
assert str(c) == "C(a=A(a=42, b=B(a=..., b='spam')), b=B(a=A(a=42, b=...), b='spam'))"
assert isinstance(am.A(a=42)._b, bm.B)
assert str(am.A(a=42)._b) == "B(a=A(a=42, b=None), b='42')"
Metadata
Release files for katso 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| katso-0.6.1.tar.gz | 3.9 kB | Without provenance | Details for katso-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| katso-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for katso-0.6.1-py3-none-any.whl |
Total release size: 8.0 kB
Release files / katso-0.6.1.tar.gz
| Download URL | katso-0.6.1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f7c63bb0aa6de2945d599e0f2488c52e7bc2a50a0eb6239e49aa3bea8c7a653
|
|
BLAKE2b-256 checksum How to use checksums |
923d091626874789a39ecc72c0178a90918c10edf7a2f043a50cbe89b5c238c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.0
|
Release files / katso-0.6.1-py3-none-any.whl
| Download URL | katso-0.6.1-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80d9ceae5fbdeb79c12080469303232c8dd9beceda16c7eba561bae646248045
|
|
BLAKE2b-256 checksum How to use checksums |
5d0cb5f48321c4c3af6077c3f51e171574d176462ba78423043895640c92cda9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.0
|
Security for katso 0.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.