Plain is a Python web framework focused on simplicity and productivity for building web applications and APIs. It embraces a "batteries-included" approach, offering built-in features like routing, templating, database access (using SQLite by default), form handling, and security measures against common vulnerabilities. Designed for a straightforward developer experience, Plain emphasizes minimal configuration and intuitive APIs, promoting rapid development and easy maintenance. It aims to provide a lightweight yet powerful foundation for projects ranging from small utilities to larger web products.
Plain is a new Python web framework specifically designed for building web applications and online products, prioritizing simplicity, explicitness, and performance. It eschews the "magic" often found in larger frameworks, opting instead for a straightforward and transparent approach that gives developers greater control over their code and application behavior.
The framework emphasizes a "no-nonsense" philosophy, minimizing boilerplate code and focusing on core web development principles. It encourages developers to write clean, understandable Python code without relying heavily on framework-specific abstractions. This explicit nature simplifies debugging and maintenance, making it easier to understand how the application functions at every level.
Performance is another key focus. Plain leverages the speed and efficiency of ASGI (Asynchronous Server Gateway Interface) and allows developers to write asynchronous code, enabling the handling of concurrent requests efficiently. This translates to faster response times and better resource utilization, especially beneficial for applications with high traffic or complex computations.
The framework boasts a minimal learning curve, making it accessible to both experienced Python developers and those new to web development. Its limited API surface and focus on standard Python constructs reduce the time required to become proficient.
Plain aims to provide just the essential building blocks for web development, avoiding the inclusion of features that might not be necessary for every project. This lean approach results in a smaller framework footprint and minimizes potential dependencies, which simplifies deployment and reduces the risk of conflicts. While minimalistic, Plain still offers essential features for building robust applications, including routing, request handling, template rendering, and support for static files. It also allows for seamless integration with other Python libraries and tools, enabling developers to extend its functionality as needed.
In essence, Plain offers a refreshing alternative to complex web frameworks, focusing on providing a solid foundation for building performant and maintainable web applications with Python, while prioritizing developer understanding and control through simplicity and explicitness. It is aimed at developers who appreciate a streamlined and transparent approach, allowing them to focus on their product's logic rather than wrestling with framework complexities.
Summary of Comments ( 129 )
https://news.ycombinator.com/item?id=43512589
HN commenters generally expressed interest in Plain, praising its simplicity and focus on serving HTML. Several appreciated the "batteries included" approach for common tasks like forms and authentication, contrasting it favorably with Django's complexity. Some questioned the performance implications of generating HTML with Python, and others desired more details on the templating language. A few commenters noted the similarity to other Python frameworks like Flask or Pyramid, prompting discussion about Plain's unique selling points and potential niche. There was also some skepticism about the project's longevity given the prevalence of existing frameworks. However, the overall sentiment was positive, with many looking forward to trying it out.
The Hacker News thread for "Plain – a web framework for building products with Python" contains a moderate number of comments, generally expressing interest and skepticism about the framework. Several recurring themes emerge from the discussion.
A number of commenters question the need for another Python web framework, given the existing mature options like Django, Flask, and Pyramid. They express doubt that Plain offers enough compelling advantages to justify switching or adopting it for new projects. Some wonder about its long-term viability and community support compared to established frameworks.
Several commenters appreciate Plain's focus on simplicity and minimalism. They find the "no magic" approach appealing and see potential for easier understanding and debugging. The emphasis on HTML over templating languages resonates with some who prefer a more direct approach to web development.
Performance is a topic of discussion, with some commenters inquiring about benchmarks and comparisons to other frameworks. There's a general acknowledgment that a simple framework could be faster, but skepticism about whether Plain actually achieves significant performance gains.
Some comments focus on specific features or limitations of Plain. For instance, the lack of an ORM is mentioned both as a positive (allowing for greater flexibility in database interactions) and a negative (requiring more boilerplate code). The reliance on function decorators for routing and other functionality is also discussed, with mixed opinions on its clarity and usability.
Several commenters express a desire to see more real-world examples and use cases of Plain to better evaluate its practicality. They are curious about how it scales and handles complex applications.
There is some discussion around the developer experience and the learning curve associated with Plain. While some appreciate its simplicity, others wonder if it might be too barebones for larger projects or teams.
Overall, the comments reflect a cautious but curious attitude towards Plain. While acknowledging its potential benefits, many commenters remain unconvinced that it offers a substantial improvement over existing solutions. The discussion highlights the importance of community adoption, performance benchmarks, and real-world examples in establishing the viability of a new web framework.