Skip to main content

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

Project description

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

https://api.codacy.com/project/badge/Grade/535736e5a8d148369e9bc237238b3831 https://www.codefactor.io/repository/github/looking-for-a-job/public.py/badge 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://bettercodehub.com/edge/badge/looking-for-a-job/public.py?branch=master https://sonarcloud.io/api/project_badges/measure?project=public.py&metric=code_smells

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

https://img.shields.io/github/issues/looking-for-a-job/public.py.svg https://img.shields.io/github/stars/looking-for-a-job/public.py.svg?style=social&label=Stars https://img.shields.io/github/issues/looking-for-a-job/public.py.svg

Project details


Release history Release notifications | RSS feed

This version

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

public-1.0.0.tar.gz (2.7 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for public-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4570cbeaef13118dbd97a4921f21e5f2eb6dc8b63706c1e095724b6245e9c57e
MD5 0b48f6d796ef5587b9b378e7c5f1c1fd
BLAKE2b-256 e4858b6557975859fd48b041b47253bf4af316eda016e799b6f21902e007c3e8

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