Skip to main content

namedspace

The namedspace factory generates a simple class that encapsulates a namespace and provides various means to access it.

It is inspired by namedtuple (and shamelessly copies some of the namedtuple code), and was motivated by my realization that I was often abusing namedtuple, using a namedtuple as a base class for numerous simple custom classes that I was writing.

In these cases, it was the named attribute access and immutability of the namedtuple that was desirable, and the sequence behavior was not needed. In fact, when properties were used to override the returned value of a named attribute, the values available from the underlying tuple would not match. Fixing this behavior in a sub-class proved much more difficult than expected, which was especially frustrating since this was behavior that wasn’t needed anyway.

So, namedspace was born. Orginally, I called it “namespace” (without the ‘d’), but there was already a namespace project on PyPi, and calling it “namedspace” gives a nod to its namedtuple ancestry.

Enjoy!

–Warren A. Smith

Metadata

Release files for namedspace 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for namedspace 1.0.1
File Size Uploaded Provenance Actions
namedspace-1.0.1.tar.gz 81.4 kB Without provenance Details for namedspace-1.0.1.tar.gz

Release files / namedspace-1.0.1.tar.gz

Download URL namedspace-1.0.1.tar.gz
Size 81.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bb16fdd4ea2cb4c066070450c13856b6ee6407e37864a9a84cfb844f9f34df92
BLAKE2b-256 checksum
How to use checksums
fa72c3182356734950240beb162860e44f9cbdbede3b947c45db7b3876674d7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for namedspace 1.0.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page