abcattrs
Abstract class attributes for ABCs.
Examples
import abc
from abcattrs import abstractattrs, Abstract
@abstractattrs
class A(abc.ABC):
foo: Abstract[int]
# Abstract subclasses can add more required attributes.
class B(A, abc.ABC):
bar: Abstract[str]
class C(B):
# C must assign values to both of these attributes to not raise an error.
foo = 1
bar = "str"
# This raises an error.
class MissingBar(B):
foo = 1
# This raises an error.
class MissingFoo(B):
bar = "str"
The Abstract qualifier can be combined with other PEP 593 annotations.
from typing import Annotated
import abc
from abcattrs import abstractattrs, Abstract
@abstractattrs
class A(abc.ABC):
# Combine with other annotations
bar: Annotated[str, Abstract, "other info"]
Release files for abcattrs 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 | |
|---|---|---|---|
| abcattrs-0.6.1.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| abcattrs-0.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.4 kB
Release files / abcattrs-0.6.1.tar.gz
| Download URL | abcattrs-0.6.1.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b72e096890a704bce06ac16c6b7d49c25b30dff27a601d0fdd5d9984b78ec1a1
|
|
BLAKE2b-256 checksum How to use checksums |
6d97bfaf421cc15ea18f07dade4088a1a2c43f318bfdee62649cf5001bc60d8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2025.
Transparency logRelease files / abcattrs-0.6.1-py3-none-any.whl
| Download URL | abcattrs-0.6.1-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
595d19e9a5e622f2bfb05e8b139eec8d4068b439ed1f6c332620b1dba8741fe8
|
|
BLAKE2b-256 checksum How to use checksums |
7696ba2d0ed033a71d1bb7dbf7082c43e2254d1edf03b346787b99f0d051d7bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2025.
Transparency log