Py3esourcezip
Bundling your source code into a ZIP format offers several advantages: Portability
To make a ZIP file executable as a script, it must contain a __main__.py file at the top level. 3. Resource Management in Python 3 py3esourcezip
If you are looking for how to access "resources" (non-code files like images or config) inside a package or ZIP, Python 3 has evolved significantly: Bundling your source code into a ZIP format
loader = Py3EResourceLoader("/opt/app/data/resources.py3e.zip") email_template = loader.read_text("templates/email/welcome.html") config_manifest = json.loads(loader.read_text("metadata/manifest.json")) py3esourcezip