<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sn3llius</title>
    <description>The latest articles on DEV Community by Sn3llius (@sn3llius).</description>
    <link>https://dev.to/sn3llius</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1503917%2F455b41eb-6489-4c67-bb6d-29cd9c4fc784.png</url>
      <title>DEV Community: Sn3llius</title>
      <link>https://dev.to/sn3llius</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sn3llius"/>
    <language>en</language>
    <item>
      <title>Difoosion, a Simple Web-Interface for Stable Diffusion Models</title>
      <dc:creator>Sn3llius</dc:creator>
      <pubDate>Sun, 16 Jun 2024 13:46:40 +0000</pubDate>
      <link>https://dev.to/sn3llius/difoosion-a-simple-web-interface-for-stable-diffusion-models-dd2</link>
      <guid>https://dev.to/sn3llius/difoosion-a-simple-web-interface-for-stable-diffusion-models-dd2</guid>
      <description>&lt;p&gt;With Stable Diffusion 3 freshly released, I thought it would be nice to make a simple Web-Interface for it. About a month ago me and a couple friends released a library for making websites with Python, and this just seemed like too good of an opportunity to pass up.&lt;/p&gt;

&lt;p&gt;The interface includes support for the classic SD1, SDXL and the new SD3. Inference is done using the &lt;code&gt;diffusers&lt;/code&gt; library from Huggingface, and the interface is built with &lt;a href="https://rio.dev/?s=t5s" rel="noopener noreferrer"&gt;Rio&lt;/a&gt;. Given how new SD3 is in &lt;code&gt;diffusers&lt;/code&gt;, you'll spot the odd issue here and there, but I'm sure that'll improve now with thousands of people using it.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabqipjgdo5dfl2n69cnu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabqipjgdo5dfl2n69cnu.jpg" alt="Web interface build with Rio"&gt;&lt;/a&gt;&lt;br&gt;
This is a simple Web-Interface for Stable Diffusion, based on our new Rio framework. We’ve gotten a lot of requests for larger sample projects, so given the highly anticipated release of Stable Diffusion 3 I figured this would be a great example. With all of that out of the way, let’s get started! Install at least one model from the list below to begin using Difoosion.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;This makes use of Stable Diffusion, which is a sizable AI model. While it can technically run on the CPU, an nvidia GPU with at least 8GB of VRAM is highly recommended.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Get Started
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Clone this repository
&lt;/h4&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git clone git@gitlab.com:Vivern/difoosion.git 


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  2. Install the project and its dependencies (Use a venv if you like)
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;cd &lt;/span&gt;difoosion
python &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This will download some large packages like &lt;code&gt;diffusers&lt;/code&gt; and &lt;code&gt;torch&lt;/code&gt;. Give it a few minutes to complete.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Run the interface
&lt;/h4&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

python &lt;span class="nt"&gt;-m&lt;/span&gt; rio run &lt;span class="nt"&gt;--release&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;After a few seconds this will display a URL in the console. Open this URL in your browser to start using the interface.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Install Models
&lt;/h4&gt;

&lt;p&gt;When you first connect you won’t have any models installed yet. The site will automatically offer you to download one of the built-in ones.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;code&gt;diffusers&lt;/code&gt; doesn't seem to offer any way to track the download progress of models. That's why you won't be able to see how far the download has progressed in the interface. Check the terminal to see updates.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Get cracking!
&lt;/h4&gt;

&lt;p&gt;Type a prompt of what you’d like to see, click “Generate” and wait for your masterpiece to be created :)&lt;/p&gt;

&lt;h3&gt;
  
  
  Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;All models are run with the &lt;a href="https://pypi.org/project/diffusers/" rel="noopener noreferrer"&gt;diffusers library from huggingface&lt;/a&gt;. There is a thin wrapper around the library to workaround some issues and make it easier to use.&lt;/li&gt;
&lt;li&gt;The web interface is built with &lt;a href="https://rio.dev/?s=t5s" rel="noopener noreferrer"&gt;Rio&lt;/a&gt;, a new web framework that is designed to be 100% Python, and as easy to use as possible. I’m one of the Rio developers and this project was meant to both test Rio out in a bigger project, as well as be a showcase &amp;amp; reference to other Rio developers.&lt;/li&gt;
&lt;li&gt;Dependencies are managed with &lt;a href="https://rye.astral.sh/" rel="noopener noreferrer"&gt;rye&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Caveats
&lt;/h3&gt;

&lt;p&gt;Stable Diffusion 3 is still very new, and support in &lt;code&gt;diffusers&lt;/code&gt; immature. This has led to a couple known problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generating non-square images can lead to errors from pytorch. Stick to aspect ratios of 1:1 for now&lt;/li&gt;
&lt;li&gt;Freeing up memory is very unreliable. One some of my devices the model keeps gobbling up more and more RAM as time goes on, while on others it seems to free up just fine. Keep a close eye on your memory usage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Sources
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Rio:&lt;/strong&gt; &lt;a href="https://github.com/rio-labs/rio" rel="noopener noreferrer"&gt;https://github.com/rio-labs/rio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can find installation instructions in the project’s README:&lt;/strong&gt; &lt;a href="https://gitlab.com/mad-moo/difoosion" rel="noopener noreferrer"&gt;https://gitlab.com/mad-moo/difoosion&lt;/a&gt; &lt;/p&gt;

</description>
      <category>python</category>
      <category>datascience</category>
      <category>coding</category>
      <category>developer</category>
    </item>
    <item>
      <title>A quick comparison: Streamlit, Dash, Reflex and Rio</title>
      <dc:creator>Sn3llius</dc:creator>
      <pubDate>Thu, 30 May 2024 11:41:20 +0000</pubDate>
      <link>https://dev.to/sn3llius/a-quick-comparison-streamlit-dash-reflex-and-rio-57gf</link>
      <guid>https://dev.to/sn3llius/a-quick-comparison-streamlit-dash-reflex-and-rio-57gf</guid>
      <description>&lt;p&gt;Many data scientists lack a background in computer science or software engineering. Even those who do may not enjoy developing web applications or front-end user interfaces to showcase their work. Additionally, those who occasionally appreciate “pure” software engineering might be reluctant to allocate significant portions of their data science budget to perfecting CSS directives for optimizing button and chart appearances across various devices. Ultimately, a data science project is centered around a data-driven question, and it’s generally advisable to minimize ancillary costs, especially during early stages, demos, and proofs of concept.&lt;/p&gt;

&lt;p&gt;In this article, we will examine three major frameworks, along with a newly introduced one in this category: Rio, Reflex, Streamlit, and the older, more established Dash from Plotly. We believe these four frameworks span the simplicity-flexibility spectrum and can address the majority of use cases in data science projects. Our focus is on Python, as it is the most widely used programming language in the data science community. Rio, Reflex, Streamlit, and Dash are all native to Python, with Dash also supporting R and Julia.&lt;/p&gt;

&lt;h2&gt;
  
  
  Streamlit
&lt;/h2&gt;

&lt;p&gt;Streamlit stands out for its simplicity, enabling the creation of appealing web applications atop a data science or machine learning backend with just a few lines of code. This simplicity is achieved through its unique UI model that bypasses explicit event handling or functional programming, which are common in other UI frameworks. Instead, Streamlit employs a linear-flow, imperative execution model for the UI code. Each UI widget corresponds to a variable in the Python code, and any change in the state or value of the widget triggers the re-execution of the code from the point where the widget is defined. This linear execution model makes it straightforward to add a web UI to a computation backend, often as simple as replacing parameter definitions with Streamlit widget definitions.&lt;/p&gt;

&lt;p&gt;Streamlit supports a wide range of widgets, including sliders, buttons, and text inputs, which can be easily used to build interactive and dynamic web applications. Developers can also leverage its built-in support for displaying data frames, charts, and images directly from their Python code, enhancing the presentation of data and results.&lt;/p&gt;

&lt;p&gt;Streamlit’s active community provide extensive resources, including documentation, tutorials, and community-contributed projects. This support network helps developers quickly get up to speed and build effective applications. Furthermore, Streamlit Cloud offers a platform for deploying and sharing applications with others, making collaboration and distribution effortless.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Streamlit is accessible to anyone who understands Python, with almost no need for HTML or CSS knowledge.&lt;/li&gt;
&lt;li&gt;It offers a broad range of UI components, covering nearly every common element such as checkboxes, sliders, collapsible sidebars, radio buttons, file uploads, progress bars, and more. These components are very user-friendly.&lt;/li&gt;
&lt;li&gt;It supports various interactive visualization libraries like Matplotlib and Vega-Altair.&lt;/li&gt;
&lt;li&gt;It supports live/ hot reloading&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Although not difficult, Streamlit requires some time to learn its specific syntax.&lt;/li&gt;
&lt;li&gt;Streamlit has limited flexibility. It is Python-based, offers a limited set of widgets, and does not integrate with Python Notebooks.&lt;/li&gt;
&lt;li&gt;There’s no built-in state management; whenever there’s a state change, the entire script restarts. While caching can alleviate this, it complicates Streamlit’s otherwise straightforward approach.&lt;/li&gt;
&lt;li&gt;Insufficient type annotation support.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Plotly Dash
&lt;/h2&gt;

&lt;p&gt;Dash operates on top of the Python web framework Flask, the web UI library React.js, and the JavaScript plotting library Plotly.js. It is available for both Python and R, making it accessible to a wide range of developers and data scientists.&lt;/p&gt;

&lt;p&gt;Dash employs a dual business model, offering its open-source software via pip under an MIT license with no limitations. The open-source version is fully featured and includes everything needed to create web-based dashboards. For enterprises needing more advanced features, Plotly provides Dash Enterprise, which includes enhanced security, scalability, and deployment options, as well as premium support and additional components tailored for business needs.&lt;/p&gt;

&lt;p&gt;While a Dash app can achieve full responsiveness like any other web application, it requires significant effort from the developer to implement, as responsiveness is not provided out of the box. This flexibility allows developers to create highly customized and interactive applications, but it also means that a solid understanding of web development principles is beneficial.&lt;/p&gt;

&lt;p&gt;Dash is versatile and can be used in various domains such as data exploration, data analysis, modeling, visualization, instrument control, and reporting. It supports a wide range of interactive elements like sliders, dropdowns, and graphs, which can be easily linked to create dynamic and responsive user interfaces. Additionally, Dash’s integration with Plotly’s powerful plotting capabilities allows for the creation of complex and informative visualizations with minimal code.&lt;/p&gt;

&lt;p&gt;For those looking to extend the capabilities of their Dash applications, there is a vibrant community and extensive documentation available, along with numerous tutorials and examples provided by Plotly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dash applications are reactive.&lt;/li&gt;
&lt;li&gt;Dash is more customizable than Streamlit. Also, Dash offers better performance.&lt;/li&gt;
&lt;li&gt;Comes with a lot of dev tools like: Callback graph, Code reloading, hot reloading, component validation and more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dash is more focused on the enterprise market and doesn’t include all of it’s available features in the open source version like: features such as authentication, CI/CD, technical support and so on.&lt;/li&gt;
&lt;li&gt;Dash is more verbose than Rio, Reflex or Streamlit; you have to write more code to create simple web applications compared to other frameworks.&lt;/li&gt;
&lt;li&gt;You need to know HTML and CSS to get most out of it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reflex
&lt;/h2&gt;

&lt;p&gt;One of Reflex’s key advantages is that it enables developers to write their entire web app — including frontend, backend, and deployment — using only Python. This eliminates the need to learn and any JavaScript, HTML, CSS, but it is usefull for debugging. With Reflex, knowing Python is sufficient to build complete, professional web apps, ranging from basic sites to complex, interactive applications.&lt;/p&gt;

&lt;p&gt;Reflex employs a declarative, state-driven model that will be familiar to React developers, but it implements this model entirely in Python, without any JavaScript. Developers can build their entire frontend UI using only Python components, assembling them to create interactive layouts, with JavaScript being compiled in the background.&lt;/p&gt;

&lt;p&gt;Variables are automatically synchronized across the frontend and backend. When a reactive variable is updated on the backend, the change is instantly pushed to the frontend via a WebSocket connection, ensuring the UI is always in sync with the latest server state. Reflex utilizes Uvicorn for its operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Offers database ORM with automatic migrations&lt;/li&gt;
&lt;li&gt;Provides user authentication and secure session management&lt;/li&gt;
&lt;li&gt;Supports asynchronous background tasks&lt;/li&gt;
&lt;li&gt;Manages state, including component state&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No production-ready release yet, so breaking changes might occur&lt;/li&gt;
&lt;li&gt;Requires compiling to JavaScript, making debugging more challenging&lt;/li&gt;
&lt;li&gt;Lacks live/hot reloading, causing delays when compiling changes and updating the browser&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Rio
&lt;/h2&gt;

&lt;p&gt;Rio is an innovative new GUI framework that allows the creation of modern web apps with just a few lines of Python. This is achieved by adhering to the core principles of Python, known for its simplicity and conciseness. Rio embodies this philosophy, eliminating the need to learn additional languages like HTML, CSS, or JavaScript. All UI, logic, components, and layout are managed entirely in Python. Additionally, there is no division between front-end and back-end, as Rio seamlessly handles all communication.&lt;/p&gt;

&lt;p&gt;Rio leverages FastAPI to manage API requests and uses Uvicorn for serving web applications. On the front end, theire stack includes TypeScript, CSS, and HTML, ensuring a responsive and dynamic user experience. Websockets were employed to enable real-time client-server communication. For the backend, Python was the primary language, handling the core logic and also functioning as the interface for user interactions. Rio includes over 50 beautifully handcrafted components right out of the box. Furthermore, a community repository is planned where users can create and share their own components, ensuring the right component is always available for the next app.&lt;/p&gt;

&lt;p&gt;These components are combined using a React-style declarative approach, making code more readable and easier to maintain. Attributes can be bound between components using Vue-style bindings, resulting in concise and understandable code.&lt;/p&gt;

&lt;p&gt;Finally, Rio apps can run both locally and on the web without any changes to the codebase, with the only difference being how the app is started.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rio manages both the front-end and back-end seamlessly, making them virtually invisible to the user.&lt;/li&gt;
&lt;li&gt;Rio utilizes modern Python features, including type annotations and asynchronous programming. This ensures code remains clean and maintainable, and aids your code editor in providing code completions and type checking.&lt;/li&gt;
&lt;li&gt;As Rio runs on Python, you can directly connect to the running process with a debugger, simplifying the process of identifying and fixing bugs in your code.&lt;/li&gt;
&lt;li&gt;Rio has its own layout system, so there’s no need for HTML, CSS or JavaScript.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unable to create custom fundamental components in HTML/CSS/JavaScript at this time.&lt;/li&gt;
&lt;li&gt;No production-ready release yet, so breaking changes may occur.&lt;/li&gt;
&lt;li&gt;Rio has a smaller community than some of the other packages, making it harder to find resources about it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Choosing the right framework for building web applications in python depends on the specific requirements and context of your project, including your familiarity with different programming languages, the complexity of the application, and the need for customization or enterprise features. Here’s a brief summary of which framework works best for which domain:&lt;/p&gt;

&lt;h3&gt;
  
  
  Streamlit
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Best For:&lt;/strong&gt; Rapid prototyping for very small data science, and machine learning applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strengths:&lt;/strong&gt; Extremely simple and intuitive for Python developers, quick to set up, ideal for creating interactive data visualizations and dashboards without needing extensive knowledge of web development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt; Limited flexibility, not suitable for highly customized or a little bit more complex applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Plotly Dash
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Best For:&lt;/strong&gt; Enterprise-level applications, data visualization, and projects requiring high customization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strengths:&lt;/strong&gt; Highly customizable, supports complex interactive visualizations, reactive applications, extensive documentation and community support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt; Requires knowledge of HTML, CSS, and JavaScript for advanced features, more verbose and requires more effort for simple applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reflex
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Best For:&lt;/strong&gt; Full-stack web applications where developers prefer to work solely with Python.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strengths:&lt;/strong&gt; Enables writing frontend and backend entirely in Python, state-driven model familiar to React developers, supports asynchronous tasks and secure session management.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt; Not yet production-ready, potential for breaking changes, debugging can be challenging due to JavaScript compilation and a lack of good dev tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rio
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Best For:&lt;/strong&gt; Developers seeking to build modern full-stack web apps with a strong preference for Python-only development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strengths:&lt;/strong&gt; Manages both front-end and back-end in Python, eliminates the need for CSS/JavaScript, utilizes modern Python features, easy debugging and supports asynchronous tasks and secure session management.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt; Limited ability to create custom components with HTML/CSS/JavaScript, not yet production-ready, smaller community.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recommendations by Domain
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Small Projects:&lt;/strong&gt; Streamlit is ideal for its simplicity and ease of use, making it perfect for data scientists who want to create interactive applications quickly like PoCs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enterprise and Highly Customized Dashboard Applications:&lt;/strong&gt; Plotly Dash offers the customization and advanced features necessary for enterprise-level applications and complex data visualizations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full-Stack Python Web Development:&lt;/strong&gt; Reflex and Rio are excellent choices for developers who want to build full-stack applications without leaving the Python ecosystem. Reflex is more mature with features like ORM and user authentication, while Rio, though new, emphasizes simplicity, seamless Python integration, and aims to deliver big changes in performance and customization.&lt;/p&gt;

&lt;p&gt;By selecting the appropriate framework based on your project’s needs and your own development skills, you can efficiently create robust and interactive web applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://streamlit.io/"&gt;https://streamlit.io/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dash.plotly.com/"&gt;https://dash.plotly.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dash.plotly.com/devtools"&gt;https://dash.plotly.com/devtools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://reflex.dev/"&gt;https://reflex.dev/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://reflex.dev/blog/2024-03-21-reflex-architecture/"&gt;https://reflex.dev/blog/2024-03-21-reflex-architecture/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://rio.dev/"&gt;https://rio.dev/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rio-labs/rio"&gt;https://github.com/rio-labs/rio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>opensource</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Rio: WebApps in pure Python. No JavaScript, HTML and CSS needed!</title>
      <dc:creator>Sn3llius</dc:creator>
      <pubDate>Sun, 19 May 2024 09:37:32 +0000</pubDate>
      <link>https://dev.to/sn3llius/rio-webapps-in-pure-python-no-javascript-html-and-css-needed-hhh</link>
      <guid>https://dev.to/sn3llius/rio-webapps-in-pure-python-no-javascript-html-and-css-needed-hhh</guid>
      <description>&lt;p&gt;Hi everyone! We're excited to announce that our reactive web UI framework is now public. This project has been in the works for quite some time, and we're excited to share it with you. Feel free to check it out and share your feedback!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://rio.dev/?src=dev"&gt;Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rio-labs/rio"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rio-labs/rio/assets/41641225/44279406-0c2d-47e2-98b5-4582722054b2"&gt;Demo Video&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What My Project Does
&lt;/h2&gt;

&lt;p&gt;Rio is a brand new GUI framework designed to let you create modern web apps with just a few lines of Python. Our goal is to simplify web and app development, allowing you to focus on what matters most instead of getting stuck on complicated user interface details.&lt;/p&gt;

&lt;p&gt;We achieve this by adhering to the core principles of Python that we all know and love. Python is meant to be simple and concise, and Rio embodies this philosophy. There's no need to learn additional languages like HTML, CSS, or JavaScript, as all UI, logic, components, and even layout are managed entirely in Python. Moreover, there's no separation between front-end and back-end; Rio transparently handles all communication for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Showcase
&lt;/h2&gt;

&lt;p&gt;Rio doesn't just serve HTML templates like you might be used to from frameworks like Flask. In Rio you define components as simple dataclasses with a React/Flutter style build method. Rio continuously watches your attributes for changes and updates the UI as necessary.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;clicks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_on_press&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;clicks&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;rio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;rio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Column&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;rio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Click me&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;on_press&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_on_press&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="n"&gt;rio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;You clicked the button &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;clicks&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; time(s)&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;rio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;App&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;MyComponent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run_in_browser&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice how there is no need for any explicit HTTP requests. In fact there isn't even a distinction between frontend and backend. Rio handles all communication transparently for you. Unlike ancient libraries like tkinter, Rio ships with over 50 builtin components in Google's Material Design. Moreover the same exact codebase can be used for both local apps and websites.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full-Stack Web Development:&lt;/strong&gt; Rio handles front-end and backend for you. In fact, you won't even notice they exist. Create your UI, and Rio will take care of the rest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python Native:&lt;/strong&gt; Rio apps are written in 100% Python, meaning you don't need to write a single line of CSS or JavaScript.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modern Python:&lt;/strong&gt; We embrace modern Python features, such as type annotations and asynchrony. This keeps your code clean and maintainable, and helps your code editor help you out with code completions and type checking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python Debugger Compatible:&lt;/strong&gt; Since Rio runs on Python, you can connect directly to the running process with a debugger. This makes it easy to identify and fix bugs in your code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Declarative Interface:&lt;/strong&gt; Rio apps are built using reusable components, inspired by react, flutter &amp;amp; vue. They're declaratively combined to create modular and maintainable UIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batteries included:&lt;/strong&gt; Over 50 builtin components based on Google's Material Design&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Target Audience
&lt;/h2&gt;

&lt;p&gt;Rio is perfect for developers who want to create web apps without spending time learning new languages. It’s also ideal for those who want to build modern, professional-looking apps without stressing over the details&lt;/p&gt;

&lt;h2&gt;
  
  
  We Want Your Feedback!
&lt;/h2&gt;

&lt;p&gt;We welcome your thoughts and questions in the comments! If you like the project, &lt;strong&gt;please give us a star on &lt;a href="https://github.com/rio-labs/rio"&gt;GitHub&lt;/a&gt;&lt;/strong&gt; to show your support and help us continue improving it.&lt;/p&gt;

</description>
      <category>python</category>
      <category>datascience</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
