dev-python/autoprop (gentoo)

Search

Package Information

Description:
Properties are a feature in python that allow accessor functions (i.e. getters and setters) to masquerade as regular attributes. This makes it possible to provide transparent APIs for classes that need to cache results, lazily load data, maintain invariants, or react in any other way to attribute access. Unfortunately, making a property requires an annoying amount of boilerplate code. There are a few ways to do it, but the most common and most succinct requires you to decorate two functions (with two different decorators) and to type the name of the attribute three times. The autoprop module simplifies this process by searching your class for accessor methods and adding properties corresponding to any such methods it finds.
Homepage:
https://github.com/kalekundert/autoprop/ https://pypi.org/project/autoprop/
License:
MIT

Versions

Version EAPI Keywords Slot
4.1.0 8 ~amd64 ~arm64 0

Metadata

Description

Maintainers

Upstream

Raw Metadata XML
<pkgmetadata>
	<maintainer type="project">
		<email>3dprint@gentoo.org</email>
		<name>Gentoo 3D Printer Project</name>
	</maintainer>
	<maintainer type="project">
		<email>python@gentoo.org</email>
		<name>Python</name>
	</maintainer>
	<longdescription>
		Properties are a feature in python that allow accessor functions (i.e. getters and setters) to masquerade as
		regular attributes. This makes it possible to provide transparent APIs for classes that need to cache results,
		lazily load data, maintain invariants, or react in any other way to attribute access.

		Unfortunately, making a property requires an annoying amount of boilerplate code. There are a few ways to
		do it, but the most common and most succinct requires you to decorate two functions
		(with two different decorators) and to type the name of the attribute three times.

		The autoprop module simplifies this process by searching your class for accessor methods and adding properties
		corresponding to any such methods it finds.
	</longdescription>
	<stabilize-allarches></stabilize-allarches>
	<upstream>
		<bugs-to>https://github.com/kalekundert/autoprop/issues</bugs-to>
		<remote-id type="github">kalekundert/autoprop</remote-id>
		<remote-id type="pypi">autoprop</remote-id>
	</upstream>
</pkgmetadata>

Lint Warnings

Manifest

Type File Size Versions
Unmatched Entries
Type File Size
DIST autoprop-4.1.0.tar.gz 20254 bytes