Skip to main content

replace '__all__' with '@public.add' decorator

Project description

Install

$ [sudo] pip install public

Features

  • replace __all__ with @public.add decorator

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

public-2018.11.20-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2Python 3

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

Hashes for public-2018.11.20.tar.gz
Algorithm Hash digest
SHA256 4f104163de000e4d430c03a91ac8918a8d615e2452007ee7108dcc4e5caa2f6c
MD5 b1774d8c82d661799f86b7a1d14a7062
BLAKE2b-256 8816d2e370a0b5681ef316409c15cc0e7a1412e4c2507fdace6b60e81d316963

See more details on using hashes here.

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

Hashes for public-2018.11.20-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b2250d4aca6719b66090402400de22777a37b0d2e9ac3ff74dc3f348725090fa
MD5 2916669250202dfce2f63107d7e77855
BLAKE2b-256 36c86dbeeeeb5ae9d897873df6bcdf4141cf8f160fa1e75a8a62d53535ddd19f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page