Python with Replit: A Journey in the Cloud
Can I use only Replit for all my Python development? It’s what I set out to find.
Follow along my journey to coding in Python on Chrome OS only with the tools and resources of Replit. I want to learn to live off the land in Replit; to develop, test, check into version control, run, document, deploy, and host Python code with Replit. I’ll share my experiences in Python with Replit, a blog post series documenting my ongoing efforts.
A Python REPL in Replit on my ASUS Chromebox 3. |
This is not a philosophical quest for cloud purity or a “use only brand X for 30 days” blog challenge. It’s rather the realization of how much my tools shape the way I work. When in Chrome, do as the chromies do.
I want Replit to be my main Python environment, figure out how to work around its limitations, and push the boundaries of what it can do.
I’m a hobby programmer and a Python beginner, not a professional developer. These constraints define the journey and frame my setup and tooling decisions.
Why use Replit on Chrome OS
Why do I want to use Replit on Chrome OS, anyway?
Because Replit is the platform that best matches my browser-based desktop setup and workflow. Replit is a development and collaboration environment fully in the cloud with dozens of programming languages and frameworks, including Python that’s among the best supported.
Understanding my motivations requires a step back. In 2015 I switched to Chrome OS as my only desktop operating system. Doing everything in a browser became second nature and shaped how I work on the desktop. Which means apps and resources outside of the browser, such as traditional desktop IDEs, create friction and impose tradeoffs.
Although Chrome OS seems “just a browser” (which is why it’s eating the world), the ability to run Android and Linux apps is also backed in. There are amazing astronomy Android apps I use on my Chrome OS devices, as well as great astronomy tools for Linux. What about Python IDEs for Android and Linux?
The only usable Android Python IDE, although an engineering marvel, has incompatibilities and limitations. Its major drawback is the IDE and Python code run and live only on a single device. When you’re used to accessing all your apps and data from the cloud, anything less is limiting.
On Crostini, the Chrome OS Linux container system, there's an ample choice of Python development tools such as PyCharm and VS Code. But these great environments don’t fit well into my browser-based cloud workflow. Again, the IDE and Python code on a device run and live there. Installation, maintenance, and data backups (Chrome OS can back up a full Linux image and is not granular enough) are additional burdens desktop IDEs require. Plus, traditional IDEs are overkill for my Python skills and where I’m aiming.
Why Replit is a good Python environment
Enter Replit.
Replit runs fully in the cloud. Firing it up is as simple as visiting a website from any desktop or mobile device with a browser and an Internet connection. And, most importantly for me, a web app like Replit is a first-class citizen on Chrome OS.
Replit has not always been that good at Python though.
Early versions of the platform offered basic features that were best for creating console programs. But Replit looked promising and already had a significant benefit for Python development. A REPL is a virtual environment in disguise: you don’t need to explicitly use virtual environment tools like venv, either from a shell or an IDE.
In early 2020, the Replit team must have strapped a rocket on the platform because they began cranking out new features and performance improvements on an almost weekly basis. These enhancements had a major positive impact also on Python. For example, now the default Python REPL can run most graphical apps out of the box, whereas earlier you needed specialized REPLs with a GUI framework or library built in such as Tkinter.
The new Replit helped me develop Spacestills, my first Python project. I’m continuing to experiment with Replit and work on new Python code. I can’t wait to share my experiences with you in the Python with Replit series.