This page looks best with JavaScript enabled

Python - Zip App module

 ·   ·  β˜• 1 min read

    Python ZIPAPP module

    The following example shows how the 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.

    $ python -m zipapp myapp -m "myapp:main"
    $ python myapp.pyz
    

    The same can be done using the create_archive() function:

    import zipapp
    zipapp.create_archive('myapp', 'myapp.pyz')
    
    

    Ohidur Rahman Bappy
    WRITTEN BY
    Ohidur Rahman Bappy
    πŸ“šLearner 🐍 Developer