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 https://img.shields.io/pypi/v/public.svg

https://api.codacy.com/project/badge/Grade/535736e5a8d148369e9bc237238b3831 https://codeclimate.com/github/looking-for-a-job/public.py/badges/gpa.svg https://img.shields.io/scrutinizer/g/looking-for-a-job/public.py.svg https://sonarcloud.io/api/project_badges/measure?project=public.py&metric=code_smells https://sonarcloud.io/api/project_badges/measure?project=public.py&metric=reliability_rating

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']

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for public-0.0.66.tar.gz
Algorithm Hash digest
SHA256 21548b1e4ada53b8399be8d888dd89d2b858ea8654aa8c2e1b37712700a9f834
MD5 70f23b2e9fd8fb39be2ce1350ea45936
BLAKE2b-256 10967dea9bc8dfde700c1fe4bf99e10541354ba595f20df9c2dac29fdd209e5e

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