Skip to main content

No project description provided

Project description

main-entrypoint

A decorator to avoid if __name__ == "__main__":

from main_entrypoint import entrypoint

@entrypoint
def main():
    print("Hello World")
$ python my_script.py
Hello World

$ python -c "import my_script"
# no output

Installation

pip install main-entrypoint

Project details


Download files

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

Source Distribution

main-entrypoint-0.1.1.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

main_entrypoint-0.1.1-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

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