Skip to main content

Stop others from touching your privates.

Project description

privates.py

PyPI - Version Tests Build


Installation

Linux/macOS

python3 -m pip install -U privates.py

Windows

py -3 -m pip install -U privates.py

Example

from privates import private

@private
class Hello:
    __readonly__ = "bar",

    def __init__(self):
        self.bar = "hello world!"

hello = Hello()
print(hello.bar)  # hello world!
hello.bar = "goodbye, world :("  # AccessError

License

privates.py is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

privates_py-0.2.0.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

privates_py-0.2.0-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page