Home
The Blazing-Fast, Modern ASGI Python Web Framework.
JsWeb is a blazing-fast, lightweight ASGI Python web framework that combines traditional MVC architecture and modern API-first development into a single, unified technology. Build full-stack web apps and APIs together without switching frameworks.
✨ Key Features
- 🚀 Blazing Fast: Built on ASGI, JsWeb is designed for high concurrency and performance.
- 🔄 Zero-Config AJAX: Forms and navigation are automatically handled in the background, giving your app a Single Page Application (SPA) feel without writing JavaScript.
- 🛡️ Built-in Security: CSRF protection, secure session management, and password hashing are enabled by default.
- 🗄️ Database Ready: Integrated SQLAlchemy support with Alembic migrations makes database management a breeze.
- ⚙️ Admin Interface: A production-ready admin panel is generated automatically for your models.
- 🧩 Modular Design: Use Blueprints to organize your application into reusable components.
- 🎨 Jinja2 Templating: Powerful and familiar templating engine for rendering dynamic HTML.
- 🛠️ Powerful CLI: A comprehensive command-line tool for scaffolding, running, and managing your project.
⚡ Quick Start
Get up and running in seconds.
1. Install JsWeb
2. Create a Project
3. Run the Server
Visit http://127.0.0.1:8000 and you'll see your new app running!
📝 Example Code
Here is a simple example of a JsWeb application:
from jsweb import JsWebApp, render
import config
app = JsWebApp(config=config)
@app.route("/")
async def home(req):
return render(req, "index.html", {"message": "Hello from JsWeb!"})
@app.route("/api/data")
async def get_data(req):
return {"status": "success", "data": [1, 2, 3]}
📚 Documentation
This documentation is organized into two main sections:
- User Guide: Step-by-step guides to help you learn how to use JsWeb, from installation to deployment.
- API Reference: Detailed reference documentation for the JsWeb API and CLI.
🤝 Contributing
JsWeb is an open-source project, and we welcome contributions from the community! Whether you want to fix a bug, add a feature, or improve the documentation, your help is appreciated.
Check out our GitHub repository to get started.
📄 License
This project is licensed under the terms of the MIT license.