zipapp.create_archive()
zipapp.create_archive() is a Python function in the Zipapp Module category. Creates an executable Python zip application from a directory. The syntax is zipapp.create_archive(source, target=None, interpreter=None, main=None, filter=None, compressed=False). Returns: None. A typical example: import zipapp
zipapp.create_archive("myapp", "myapp.pyz", main="myapp:main")
# Now run: python myapp.pyz. A close sibling is zipapp.get_interpreter(), which returns the interpreter specified in the ZIP app's shebang line. More about this category: Creating executable Python zip apps — create_archive, get_interpreter. Related Zipapp Module entries: zipapp.get_interpreter(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try zipapp.create_archive() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.