replace '__all__' with '@public.add' decorator
Project description
Install
$ [sudo] pip install public
Features
- replace
__all__with@public.adddecorator
before
__all__ = ["func"]
def func():
after
import public
@public.add
def func():
Functions
| function | description |
|---|---|
public.add(*objects) |
add objects to __all__ |
public.public(*objects) |
add objects to __all__. deprecated |
public.test(module) |
test module __all__ |
Examples
>>> import public
>>> @public.add
def func(): pass
>>> @public.add
class Cls: pass
>>> __all__
['Cls','func']
>>> public.add("name")
>>> public.add(*["name1","name2"])
>>> __all__
['Cls','func','name','name1','name2']
Links
readme-md - README.md generator
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
public-2018.11.20.tar.gz
(2.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file public-2018.11.20.tar.gz.
File metadata
- Download URL: public-2018.11.20.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f104163de000e4d430c03a91ac8918a8d615e2452007ee7108dcc4e5caa2f6c
|
|
| MD5 |
b1774d8c82d661799f86b7a1d14a7062
|
|
| BLAKE2b-256 |
8816d2e370a0b5681ef316409c15cc0e7a1412e4c2507fdace6b60e81d316963
|
File details
Details for the file public-2018.11.20-py2.py3-none-any.whl.
File metadata
- Download URL: public-2018.11.20-py2.py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2250d4aca6719b66090402400de22777a37b0d2e9ac3ff74dc3f348725090fa
|
|
| MD5 |
2916669250202dfce2f63107d7e77855
|
|
| BLAKE2b-256 |
36c86dbeeeeb5ae9d897873df6bcdf4141cf8f160fa1e75a8a62d53535ddd19f
|