export-0.2.0
توضیحات
Control module exports
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | export-0.2.0 |
| نام | export |
| نسخه کتابخانه | 0.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Tom Bulled |
| ایمیل نویسنده | 26026015+tombulled@users.noreply.github.com |
| آدرس صفحه اصلی | https://github.com/tombulled/export |
| آدرس اینترنتی | https://pypi.org/project/export/ |
| مجوز | MIT |
# export
Control module exports
## About
This library dynamically generates an `__all__` attribute for modules
## Usage
### Private by Default
*Does* export objects marked **public**, *doesn't* export everything else
```python
# lib.py
import export
export.init(default=export.PRIVATE)
@export.public
def foo():
pass
def bar():
pass
def baz():
pass
```
```python
>>> import lib
>>>
>>> lib.__all__
['foo']
```
### Public by Default
*Doesn't* export objects marked **private**, *does* export everything else
```python
# lib.py
import export
export.init(default=export.PUBLIC)
def foo():
pass
@export.private
def bar():
pass
@export.private
def baz():
pass
```
```python
>>> import lib
>>>
>>> lib.__all__
['export', 'foo']
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl export-0.2.0:
pip install export-0.2.0.whl
نصب پکیج tar.gz export-0.2.0:
pip install export-0.2.0.tar.gz