Skip to main content

@public decorator and public(*objects) function for add object names to __all__

Project description

https://img.shields.io/pypi/v/public.svg https://img.shields.io/pypi/pyversions/public.svg https://img.shields.io/pypi/dm/public.svg

Install

github.com: pip install git+git://github.com/russianidiot/public.py.git

pypi.python.org: pip install public

download: [ -e requirements.txt ] && pip install -r requirements.txt; python setup.py install

Usage

@public decorator

from public import *

@public
def func(): pass

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

@public
class CLS:

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

public(*objects) function

from public import *

public("name")

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

public("name1","name2")

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

Feedback

github_issues - Github Issues

gitter - Chat with me (english/russian)

russianidiot.github.io/python/ - my Python packages

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for public-0.0.21.tar.gz
Algorithm Hash digest
SHA256 748f484cea754805828a121dfd1d66afb374519c9a6237c9ad74202595fa877b
MD5 1c95a5df4665bdf72e6743c0e8a968d8
BLAKE2b-256 6f200d606a22f9ac7e184d8453035f82edee5358ebb1ec0e75dc080e4ed67c0e

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