Skip to main content

Overview

Use the class Protected as a parent.

Installation

To install protectedclasses, you can use pip. Open your terminal and run:

pip install protectedclasses

Implementation

class Protected:
    def __setattr__(self, name, value):
        cls = type(self)
        if name.startswith("_"):
            super().__setattr__(name, value)
            return
        if isinstance(getattr(cls, name, None), property):
            super().__setattr__(name, value)
            return
        e = "%r object has no property %r"
        e %= (cls.__name__, name)
        raise AttributeError(e)

License

This project is licensed under the MIT License.

Credits

Thank you for using protectedclasses!

Metadata

Release files for protectedclasses 1.0.0

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

Source distribution (sdist)

Source distribution for protectedclasses 1.0.0
File Size Uploaded Provenance Actions
protectedclasses-1.0.0.tar.gz 3.7 kB Without provenance Details for protectedclasses-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for protectedclasses 1.0.0
File Interpreter ABI Platform Actions
protectedclasses-1.0.0-py3-none-any.whl Python 3 none any Details for protectedclasses-1.0.0-py3-none-any.whl

Total release size: 8.9 kB

Release files / protectedclasses-1.0.0.tar.gz

Download URL protectedclasses-1.0.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
092288b1f5c394f6395e03117eefdd6a557ffeeb20e8578c39151460a32eaf58
BLAKE2b-256 checksum
How to use checksums
e12d333aabb60467f7adab852c9cc9273a7c7f472dca299541cb867d178c049e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / protectedclasses-1.0.0-py3-none-any.whl

Download URL protectedclasses-1.0.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c66a780a41a8a21c38c899197ff31136d7ba65e7fbe862677e49e493d7dd48f6
BLAKE2b-256 checksum
How to use checksums
35ba88275ee5e84776b92a8cf24de1e41e5707e6ed30c0c8da1a6f8166007d3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for protectedclasses 1.0.0

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