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

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

Sources

Project details


Release history Release notifications | RSS feed

This version

1.0.2

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for public-1.0.2.tar.gz
Algorithm Hash digest
SHA256 86e6fabc9742eac81fea6c5a52f65ecdf51414b2638e02f2c73bc3c64011201c
MD5 cec5c2fba695d49242671ad16f65d946
BLAKE2b-256 61ac07923bf05f6630fe9c44cf8c29643f87a86458ef38cb336e0c671c0db4e0

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