<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Zipapp on cassiobotaro</title><link>https://cassiobotaro.dev/en/tags/zipapp/</link><description>Recent content in Zipapp on cassiobotaro</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 25 Jul 2026 13:06:19 -0300</lastBuildDate><atom:link href="https://cassiobotaro.dev/en/tags/zipapp/index.xml" rel="self" type="application/rss+xml"/><item><title>Running a .zip as a Python application</title><link>https://cassiobotaro.dev/en/posts/running-a-zip-with-python/</link><pubDate>Wed, 24 Jun 2026 00:00:00 +0000</pubDate><guid>https://cassiobotaro.dev/en/posts/running-a-zip-with-python/</guid><description>&lt;h2 id="the-problem"&gt;
 The problem
 &lt;a class="heading-link" href="#the-problem"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;You have a Python application spread across several files and you want to ship everything as a single file. What if you could package it into a &lt;code&gt;.zip&lt;/code&gt; and run it with &lt;code&gt;python app.zip&lt;/code&gt;?&lt;/p&gt;
&lt;h2 id="the-tip"&gt;
 The tip
 &lt;a class="heading-link" href="#the-tip"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;You can, and it is simpler than it looks. Python knows how to execute a &lt;code&gt;.zip&lt;/code&gt; directly, as long as there is a &lt;code&gt;__main__.py&lt;/code&gt; inside it. Let&amp;rsquo;s start from scratch.&lt;/p&gt;</description></item></channel></rss>