/usr/share/doc/python3-docs/html/_sources/library
Edit: /usr/share/doc/python3-docs/html/_sources/library/zipapp.rst.txt (17392B)
:mod:`zipapp` --- Manage executable python zip archives
=======================================================
.. module:: zipapp
:synopsis: Manage executable python zip archives
.. versionadded:: 3.5
**Source code:** :source:`Lib/zipapp.py`
.. index::
single: Executable Zip Files
--------------
This module provides tools to manage the creation of zip files containing
Python code, which can be :ref:`executed directly by the Python interpreter
`. The module provides both a
:ref:`zipapp-command-line-interface` and a :ref:`zipapp-python-api`.
Basic Example
-------------
The following example shows how the :ref:`zipapp-command-line-interface`
can be used to create an executable archive from a directory containing
Python code. When run, the archive will execute the ``main`` function from
the module ``myapp`` in the archive.
.. code-block:: shell-session
$ python -m zipapp myapp -m "myapp:main"
$ python myapp.pyz