design-patterns-WS-1.0.0
توضیحات
A small python module containing decorators for implementing design patterns
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | design-patterns-WS-1.0.0 |
| نام | design-patterns-WS |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Wassaf Shahzad |
| ایمیل نویسنده | wassafshahzad@gmail.com |
| آدرس صفحه اصلی | https://github.com/wassafshahzad/DesignPatterns.git |
| آدرس اینترنتی | https://pypi.org/project/design-patterns-WS/ |
| مجوز | - |
# Introduction:
This is a small python module to design a singleton class python (will add more later on).I have been using python for 2 years and fell in love with it and I would really love to give something (even as small as this module) to the community. If you like it give it a start,hate it tell me why I will try to fix it and you could help too.
## Design Patterns Supported
> Singleton
# Example
```python
from design_patterns import singleton
@singleton
class HelloWorld:
def __init__(self):
self.name = "one instance"
h = HelloWorld()
r = HelloWorld()
if __name__ == "__main__":
print(r == h)
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.3 | Python |
نحوه نصب
نصب پکیج whl design-patterns-WS-1.0.0:
pip install design-patterns-WS-1.0.0.whl
نصب پکیج tar.gz design-patterns-WS-1.0.0:
pip install design-patterns-WS-1.0.0.tar.gz