candy-wrapper-1.0.0
توضیحات
A "sticky" wrapper for any object, that allow other objects to be add as propeties, which can be access through the .key notation or [key] notation. To unrap the object just add () notation to the end of the function.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | candy-wrapper-1.0.0 |
| نام | candy-wrapper |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | daniel davee |
| ایمیل نویسنده | daniel.v.davee@gmail.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/candy-wrapper/ |
| مجوز | Apache 2.0 |
# Candy Wrapper
Candy Wrapper is a "sticky" wrapper for any object, which adds syntax surgar.
This wrapper wraps any object, and give the ability
to add attributes to the object like a dictionary,
much in the same way that pandas dataframs work.
## Installation
You can install candy_wrapper with pip:
```
pip install candy_wrapper
```
Or with poetry:
```
poetry add candy_wrapper
```
## Usage
```python
from candy.candy_wrapper import Wrapper
foo = SomeClass()
# Wrap an object
candy = Wrapper(foo)
# Add an attribute to the object
foo['bar'] = 42
# Access the attribute
print(foo.bar) # prints 42
# You can also use setattr
setattr(foo,'hey',420)
# And getattr
print(foo['hey']) # prints 420
```
نیازمندی
| مقدار | نام |
|---|---|
| >=4.0.0,<5.0.0 | pysimplelog |
| >=1.0.0,<2.0.0 | yes-or-no |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl candy-wrapper-1.0.0:
pip install candy-wrapper-1.0.0.whl
نصب پکیج tar.gz candy-wrapper-1.0.0:
pip install candy-wrapper-1.0.0.tar.gz