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?style=plastic https://img.shields.io/pypi/pyversions/public.svg https://img.shields.io/pypi/v/public.svg

https://api.codacy.com/project/badge/Grade/ https://codeclimate.com/github/russianidiot/public.py/badges/gpa.svg https://landscape.io/github/russianidiot/public.py/master/landscape.svg?style=flat https://scrutinizer-ci.com/g/russianidiot/public.py/badges/quality-score.png?b=master

https://scrutinizer-ci.com/g/russianidiot/public.py/badges/build.png?b=master https://semaphoreci.com/api/v1/russianidiot/public-py/branches/master/badge.svg https://api.travis-ci.org/russianidiot/public.py.svg?branch=master https://app.wercker.com/status/f9a3b6fa3f83012adafea514154b8b37/s/master

Install

`[sudo] pip install public`

Usage

>>> from public import public

>>> @public # decorator

>>> public(*objects) # function

Examples

>>> @public
        def func(): pass

>>> @public
        class CLS: pass

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

# public(*objects) function
>>> public("name")
>>> public("name1","name2")

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

Feedback github_follow github_issues

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for public-0.0.41.tar.gz
Algorithm Hash digest
SHA256 e5d2618a825014248472098d4d4256d68370ec2ee97a7ca8706817e0e80992f4
MD5 a8115e1df662e52d452baffcc1ec5d7a
BLAKE2b-256 ac9067ffb8142fedcd763ef9a2adc67fc832ea15c596d51c5511eec10da2b97b

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