Catalog PyPI
Back to packageRELEASE DETAILS

2.0.2

PyPI

accumulate

Inheritance for iterable attributes.

Published31 Jul 2024
Direct dependencies0
Transitive dependenciesNot calculated

README

Version 2.0.2 documentation

accumulate

PyPI version

Inheritance for iterable attributes.

accumulate eases inheritance of iterable class attributes by accumulating values along the MRO, for example:

from accumulate import accumulate

class Base:
    fields = ["id"]
    metadata = {"read_only_field": ("id",)}

class User(Base):
    fields = accumulate(["name", "password"])
    metadata = accumulate(
        {
            "filter_fields": ("name",),
            "hidden_fields": ("password",),
        }
    )

assert User.fields == ["id", "name", "password"]
assert User.metadata == {
    "filter_fields": ("name",),
    "hidden_fields": ("password",),
    "read_only_field": ("id",),
}

Installation

Install using pip install -U accumulate.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

2 collected
accumulate-2.0.2-py3-none-any.whl

bdist_wheel · 4.17 KB · Python py3

Source file
accumulate-2.0.2.tar.gz

sdist · 5.15 KB · Python source

Source file

Repository

PENDING
jacobhayes/pymiscuous

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:02 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:e642f1b9e8beee63dd71e0c3ee9bdea127760ca6f37eba2f82f803738c23af6e

Other collected versions

View all collected versions →