Skip to main content

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

Project description

Installation

$ [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 __doc__
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-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-2019.3.22.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

public-2019.3.22-py2.py3-none-any.whl (135.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file public-2019.3.22.tar.gz.

File metadata

  • Download URL: public-2019.3.22.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for public-2019.3.22.tar.gz
Algorithm Hash digest
SHA256 5e7612316a29c1d6ff4445f120278184389e307d8fa8d98715d47ce71db1e39c
MD5 1e6b1e8e806a285eca5600b955e52b78
BLAKE2b-256 17b073181eb49b3e667843d8830d6fdc5760c8e8673226255127cfd6c24a9da2

See more details on using hashes here.

File details

Details for the file public-2019.3.22-py2.py3-none-any.whl.

File metadata

  • Download URL: public-2019.3.22-py2.py3-none-any.whl
  • Upload date:
  • Size: 135.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for public-2019.3.22-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5f62a1f5a4511b96413c01d473f0663282ab17041da4d0815b4937ad9f24e8ec
MD5 57db2d1e7dbd1284aa2b0eb9e8592739
BLAKE2b-256 2ea4b59e107878d2a251fd586dcc4f4af457b08116fb1625c90a76416a294cb2

See more details on using hashes here.

Supported by

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