privates.py
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.
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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file privates_py-0.2.0.tar.gz.
File metadata
- Download URL: privates_py-0.2.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a42fe492255146ae12954206f175d69aaefc78848d71424caffd94345d8cb71
|
|
| MD5 |
e8175d9934886416d77c26cffecc9f68
|
|
| BLAKE2b-256 |
97008425694320baa8cf0d62f5d2f20d439c83252951bdc14e0f0261c8802b9f
|
File details
Details for the file privates_py-0.2.0-py3-none-any.whl.
File metadata
- Download URL: privates_py-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f969db1a91b837289b6914452e6aec81d6d60a09707a2c339ab0ae9fe5ec2ab
|
|
| MD5 |
9bd05bc310b20d3ea309929f1f2090d6
|
|
| BLAKE2b-256 |
876c97b076de50c5d3cd9c46cf37c65a798c15e9022f7a4af91419c005f8e8d7
|