How Python Finds and Runs Installed App Module in OCI Containers

Have you ever wondered how Python finds your application code when running in a Docker container? If your source code lives in src/app/ during development, but Python can import app.main without any path manipulation in production, there’s some interesting machinery at work behind the scenes. Let’s explore how Python locates and executes installed code, using a real-world example: running a FastAPI application with python -m uvicorn app.main:app --host 0.0.0.0 --port 8080. ...

December 16, 2025 · 3 min · Kewin Rémy

Python Virtual Environments Behind The Scenes

Python virtual environments behind the scenes If you’ve been working with Python for a while, you’ve probably heard about virtual environments. Maybe you’ve even used them without fully understanding what’s happening behind the scenes. In this comprehensive guide, we’ll explore everything you need to know about Python virtual environments—from the basic concepts to the underlying mechanisms that make them work. What is a Python Virtual Environment? A Python virtual environment is an isolated Python installation that allows you to install packages and dependencies for a specific project without affecting your system’s global Python installation or other projects. Think of it as a separate, self-contained workspace for each of your Python projects. ...

September 18, 2025 · 6 min · Kewin Rémy