The @entry decorator
Tired of the traditional python if __name__ == '__main__': pattern? Try @entry instead!
@entry is designed to be a simple decorator for declaring main functions in python. In the backend, the same module name check is performed, but it keeps your code a little cleaner.
Usage
Simple example:
from atentry import entry
@entry
def main():
print("Hello, world!")
Using a return value:
from atentry import entry
@entry
def main() -> int:
print("Hello, world!")
return 128 # Program exit code
Installation
Loading this library in your project is as simple as:
# Using Poetry
poetry add atentry
# Using PiP
python3 -m pip install atentry
Metadata
Release files for atentry 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| atentry-1.0.0.tar.gz | 14.4 kB | Without provenance | Details for atentry-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| atentry-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for atentry-1.0.0-py3-none-any.whl |
Total release size: 29.0 kB
Release files / atentry-1.0.0.tar.gz
| Download URL | atentry-1.0.0.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
618752421850bd57e6555b62c00b438892de42be66372aaf09012ff11563f4e7
|
|
BLAKE2b-256 checksum How to use checksums |
003267d9c944f7f6d4052c39b50a792b2f8c800ccdecaf557d61671eb67db5f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.4 Linux/5.17.4-200.fc35.x86_64
|
Release files / atentry-1.0.0-py3-none-any.whl
| Download URL | atentry-1.0.0-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b239616a1229a0fe8e2e636db8ef1a4b6ae3352af92747884f564225b4adb3da
|
|
BLAKE2b-256 checksum How to use checksums |
0bc60806f8eb7585fcd235593903998581ed34223fe9c570e3eafd598b4e9ff1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.4 Linux/5.17.4-200.fc35.x86_64
|
Security for atentry 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.