Unifying frontend and backend into one Pythonic experience for sleek, interactive web apps.
Project description
StreamJam 🎵
Unifying frontend and backend into one Pythonic experience for sleek, interactive web apps.
Overview
StreamJam allows developers to craft both the frontend and backend of web applications using just Python. Inspired by the reactivity of Svelte and the real-time capabilities of Phoenix LiveView, StreamJam offers a streamlined approach to web development.
Features
- Reactive Components: Write dynamic, interactive components using Python.
- Unified Development: No need to juggle between frontend and backend languages. Everything's in Python!
- Elegant Syntax: Inspired by modern frameworks like Svelte, StreamJam keeps your codebase clean and concise.
Installation
pip install streamjam
Example: Countdown Timer
Here's a simple countdown timer using StreamJam:
Filename: Timer.pie
from streamjam import pie
template = """
<div class="countdown-timer">
<h1>{title}</h1>
<p>Time left: {time_left} seconds</p>
<button onclick={start}>Start</button>
<button onclick={stop}>Stop</button>
</div>
"""
class Component:
title: pie[str] = "New Timer"
time_left: pie[int] = 10
interval = None # not a pie
def start(self):
self.interval = setInterval(self.tick, 1000)
def tick(self):
if self.time_left > 0:
self.time_left -= 1 # changes will be sent to the client
else:
self.stop()
def stop(self):
clearInterval(self.interval)
self.interval = None
style = """
.countdown-timer {
font-family: Arial, sans-serif;
text-align: center;
background-color: #f5f5f5;
padding: 20px;
border-radius: 8px;
}
"""
Documentation
Visit our official documentation for detailed guides, API references, and more.
Contributing
Contributions are always welcome! Please see our contributing guidelines for more details.
License
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file StreamJam-0.0.1.tar.gz.
File metadata
- Download URL: StreamJam-0.0.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a44b0d141e1f30af91e256e2b5798907aade54802a644e1752ab048c5300c0a
|
|
| MD5 |
611ca70d1dca8a45384ae09f0e40c83f
|
|
| BLAKE2b-256 |
b9c26907d394c8d8d62754d2e014117824ba1dba39de4a728997ce20a8e60716
|
File details
Details for the file StreamJam-0.0.1-py3-none-any.whl.
File metadata
- Download URL: StreamJam-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d84f84192e434a68c6ab87fed9e886907d4f2188cea4294c7284b60dfe12ddc1
|
|
| MD5 |
cd05cd620e8eb196f7cd7c2c714420a2
|
|
| BLAKE2b-256 |
6a8b74d6f3e72044de094ae6437c06f91b64160f4b1b428991acc82bf098b0b5
|