Skip to main content

2 posts tagged with "init"

init tag description

View All Tags

How to Use `__init__.py` in Python Packages: Role, Patterns, and Best Practices

· 6 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

While the existence of __init__.py makes a directory a package, how you fill that file separates a messy script from a professional library. In 2026, the goal of a well-crafted __init__.py is to provide a "Clean Facade"-hiding the messy internal plumbing of your project while offering a polished interface to the user.

Here are the industry-standard best practices for utilizing this file effectively.

Whats the point of __init__.py on Vercel

· 5 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

The imports working perfectly fine locally, but failed after deploying on Vercel. The error I've experiencing is common when deploying Python applications with a specific file structure. My local environment likely handles imports differently than Vercel's serverless environment(because of the folder structure), which can cause import errors. The solution is to ensure that my project structure is recognized as a Python package