Skip to main content

@public decorator, public(*objects) function - add objects names to __all__

Project description

https://img.shields.io/badge/language-python-blue.svg https://img.shields.io/pypi/pyversions/public.svg

codacy.com landscape.io codeclimate.com scrutinizer-ci.com

Install

[sudo] pip install public

Usage

# @public decorator
>>> from public import public

>>> @public
        def func(): pass

>>> print(__all__)
['func']

>>> @public
>>> class CLS: pass

>>> print(__all__)
['CLS',func']

# public(*objects) function
>>> from public import public

>>> public("name")

>>> print(__all__)
['name']

>>> public("name1","name2")

>>> print(__all__)
['name','name1','name2']

Examples/

Sources:

Feedback github_issues gitter github_follow


russianidiot.github.io/python/ - Python packages

russianidiot.github.io/cli/ - command line scripts

README.rst - generated with readmemako.py (python+ mako templates) and .README dotfiles

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-0.0.25.tar.gz (8.0 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: public-0.0.25.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for public-0.0.25.tar.gz
Algorithm Hash digest
SHA256 d620223764982b9969852539d7ed6247985f6941a43adb108e82c0aa34be1160
MD5 e9c7f3a623b0a61677e4f99eab1c0839
BLAKE2b-256 22d94f88919bbf51d07362226df1ed50a7402128f14fc394818f051215c84b1f

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