Skip to main content

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

Project description

Install

[sudo] pip install public

Usage

>>> from public import public

>>> @public # decorator

>>> public(*objects) # function

Example

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

Examples/

Feedback github_issues gitter github_follow

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for public-0.0.35.tar.gz
Algorithm Hash digest
SHA256 16509a866111b1a582bdd70ef643b6cc191103637cc231ae17e79959d6591722
MD5 76ffe48580527029c320a897a47fd8a6
BLAKE2b-256 d5df1019a4424d0e373c264eb15341fea1124d23c44fa5b808a1e8ff6512389d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page