attribmanager-1.0
توضیحات
A simple pythonic module to lock (make read-only) and hide class attributes
| ویژگی | مقدار |
|---|---|
| سیستم عامل | Microsoft |
| نام فایل | attribmanager-1.0 |
| نام | attribmanager |
| نسخه کتابخانه | 1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jude BC |
| ایمیل نویسنده | jude.version1.0@gmail.com |
| آدرس صفحه اصلی | https://github.com/judev1/attribmanager |
| آدرس اینترنتی | https://pypi.org/project/attribmanager/ |
| مجوز | BSD 2-clause |
# attribmanager
##### A simple pythonic module to lock (make read-only) and hide class attributes
## Installation
`pip install attribmanager`
## Usage
```
import attribmanger
class example(attribmanger.manage):
def __init__(self):
self.mylist = ["item 1", "item2"]
self.lock("mylist")
# mylist is read only and cannot be edited now, changing it
# will raise an error,
self.myvar = "foo"
self.hide("myvar")
# myvar will not show up anywhere, and cannot be edited
self.unhide("myvar")
# Hiding an object without being able to unhide it would be
# the same as deleting it, that's why you can unhide it
```
نحوه نصب
نصب پکیج whl attribmanager-1.0:
pip install attribmanager-1.0.whl
نصب پکیج tar.gz attribmanager-1.0:
pip install attribmanager-1.0.tar.gz