defineif-0.1.0
توضیحات
attr: defineif.__description__
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | defineif-0.1.0 |
| نام | defineif |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Hakan Çelik |
| ایمیل نویسنده | hakancelikdev@gmail.com |
| آدرس صفحه اصلی | https://defineif.hakancelik.dev/ |
| آدرس اینترنتی | https://pypi.org/project/defineif/ |
| مجوز | GPL-3.0 |
# Define If
**If the condition is true, define the method.**
[](https://results.pre-commit.ci/latest/github/hakancelikdev/defineif/main)
[](https://github.com/hakancelikdev/defineif/actions/workflows/tests.yml)
[](https://github.com/hakancelikdev/defineif/actions/workflows/docs.yml)
[](https://github.com/hakancelikdev/defineif/actions/workflows/pypi.yml)
[](https://pypi.org/project/defineif/)

[](https://pepy.tech/project/defineif)
[](https://github.com/hakancelikdev/defineif/blob/main/LICENSE)
[](https://github.com/hakancelikdev/defineif/fork)
[](https://github.com/hakancelikdev/defineif/issues)
[](https://github.com/hakancelikdev/defineif/stargazers)
[](https://codecov.io/gh/hakancelikdev/defineif)
[](https://github.com/hakancelikdev/defineif/graphs/contributors)
[](https://github.com/hakancelikdev/defineif/commits/main)
For more information see: https://defineif.hakancelik.dev/
## How to install ?
```
pip install defineif
```
## How to use it ?
```python
import os
from defineif import DefineIf
class Klass(DefineIf):
@staticmethod
@DefineIf(os.name == 'nt')
def get_platform():
return 'Windows'
@staticmethod
@DefineIf(os.name == 'posix')
def get_platform():
return 'Linux'
platform = Klass.get_platform()
print(platform)
```
نیازمندی
| مقدار | نام |
|---|---|
| ==1.3.0 | mkdocs |
| ==8.3.6 | mkdocs-material |
| ==0.2.5 | mkdocs-markdownextradata-plugin |
| ==0.5.0 | mkdocs-minify-plugin |
| ==1.0.1 | mkdocs-git-revision-date-localized-plugin |
| ==6.2.4 | pytest |
| ==2.12.1 | pytest-cov |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl defineif-0.1.0:
pip install defineif-0.1.0.whl
نصب پکیج tar.gz defineif-0.1.0:
pip install defineif-0.1.0.tar.gz