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: 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.11.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

public-0.0.11-py2.7.egg (5.5 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for public-0.0.11.tar.gz
Algorithm Hash digest
SHA256 b080de11811df887bda825e2b5416f5aacc8f39434c00e2bc2944c1ad81d70fc
MD5 2636927e08ae8dd84c9baf15617feab9
BLAKE2b-256 b6d558a823c9d092e72a5a11b272b8c2bba683dd532d3aaf8d65b9a846b3d6c6

See more details on using hashes here.

File details

Details for the file public-0.0.11-py2.7.egg.

File metadata

  • Download URL: public-0.0.11-py2.7.egg
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for public-0.0.11-py2.7.egg
Algorithm Hash digest
SHA256 8a80e0941183fd5e0251a633a9a39d53c29f8632983229f3da63975c485512ee
MD5 57ae60e43bcce7acc0e8e40265344ab7
BLAKE2b-256 d31f37a2ef5bf33422f658c048f3a4062864ca0a1d09c29751f78cc55607f1b1

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