Radiant Framework
Project description
Radiant Framework
A Brython Framework for Web Apps development.
Overview
Radiant Framework is a novel web framework designed to leverage the capabilities of Brython, a browser-based Python implementation. This innovative approach allows developers to write web applications entirely in Python, bypassing the conventional requirements of HTML, CSS, or JavaScript for frontend development.
Key Features
Python-Centric Development
- Unified Language Usage: Write your entire web application using Python, ensuring a consistent and streamlined coding experience.
- Brython Integration: Utilizes Brython for executing Python code in the browser, enabling a seamless transition of server-side code to client-side execution.
Server and Browser Compatibility
- Dual Environment Execution: Radiant enables the same application code to run both on the server and in the browser, maximizing code reusability and efficiency.
- Tornado Web Server: On the server-side, Radiant harnesses the Tornado web server to deploy applications, known for its scalability and non-blocking network I/O capabilities.
Resource Management
- Static File Handling: Simplifies the management of static files (images, stylesheets, etc.), by setting up a local path for their serving, facilitating their inclusion in the application.
Runtime Configuration
- Dynamic HTML Templates: Radiant offers a custom HTML template system, configurable at runtime, to dynamically import server-side scripts into the browser environment.
Benefits
- Streamlined Development Process: By unifying the development language and environment, Radiant significantly reduces the complexity and learning curve associated with traditional web development.
- Code Efficiency: Eliminates the need for writing separate frontend and backend code, leading to more maintainable and concise codebases.
- Focus on Quality: Developers can concentrate on crafting high-quality Python code, without the distractions of dealing with various web technologies.
Installation
To install Radiant, you can use pip
, the Python package manager. Simply run the following command in your terminal:
pip install radiant-framework
Bare minimum
To help you get started with Radiant, let's walk through a bare minimum example. This example will demonstrate how to create a simple web page that displays some text. We'll utilize the Radiant framework to craft the page and run it on a local server. This is an excellent way to familiarize yourself with how Radiant functions and to begin exploring its capabilities.
Prerequisites
Before proceeding, ensure that you have Radiant installed on your system. If you haven't installed Radiant yet, please refer to the Installation section for guidance.
Creating a Simple Web Page
The following script illustrates a basic application using Radiant. This script will set up a simple web page displaying a heading.
from radiant.framework.server import RadiantAPI
from browser import document, html
class BareMinimum(RadiantAPI):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
document.select_one('body') <= html.H1('Radiant-Framework')
if __name__ == '__main__':
BareMinimum()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file radiant_framework-0.1a26.tar.gz
.
File metadata
- Download URL: radiant_framework-0.1a26.tar.gz
- Upload date:
- Size: 37.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd1db518a1f0fd11f143d0687d757f4a6f33f76e4d3f941a4e801874133cec66 |
|
MD5 | 5e4f88ed75918139c160f1ea3d03b1e4 |
|
BLAKE2b-256 | d217d632027cb003fe2121eb1b7a8e03f784b520ce326c657f17693b189c54f4 |
File details
Details for the file radiant_framework-0.1a26-py3-none-any.whl
.
File metadata
- Download URL: radiant_framework-0.1a26-py3-none-any.whl
- Upload date:
- Size: 39.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ed9e8924ec85d3077c83cda4e1c178ef4299b155f8366469428f043085e89bd |
|
MD5 | 3b817a6f40f543ff3a8d3e9066cde43f |
|
BLAKE2b-256 | 0a10a7ad8802c83b3003e464719aeb0fc33ca93e7edf53219c9e4261d813f5db |