a custom web server module.
Project description
AServer
A lightweight, Python web framework built using Python.
Designed for simplicity, learning, and fast prototyping.
Features
- 🚀 Zero dependencies (pure Python)
- 🛣️ Simple dictionary-based routing
- 🎯 Flask-style decorator support
- 📄 HTML template rendering with jinja-like syntax
- ⚡ Fast lightweight HTTP server
- 🔧 Easy to extend into a full framework
Installation
pip install aserver
Usage Example
Basic Server Setup
from aserver import ServerHTTP
data = {
"name": "Aadi",
"title": "AServer"
}
server = ServerHTTP(
("127.0.0.1", 1111),
"index.html",
data=data
)
@server.serve()
def routes():
return {
"/": "index.html",
"/about": "about.html"
}
HTML Template Example
<!DOCTYPE html>
<html>
<head>
<title>{{ title }}</title>
</head>
<body>
<h1>Welcome {{ name }}</h1>
</body>
</html>
Routing Example
{
"/": "index.html",
"/about": "about.html",
"/contact": "contact.html"
}
How It Works
- Server listens on host and port
- Matches request path with route dictionary
- Loads corresponding HTML file
- Replaces {{ variables }} using provided data
Contact
email: aadisankar1001@gmail.com
License
MIT License © 2026
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
aserver-0.2.0.tar.gz
(4.2 kB
view details)
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 aserver-0.2.0.tar.gz.
File metadata
- Download URL: aserver-0.2.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d48ace54c7687c50c5347d9a4fe58977b9094dae0647cda99f592007b92ccc90
|
|
| MD5 |
5dff2139c14a0f91ebaf8968f3013f21
|
|
| BLAKE2b-256 |
169c6ed950877eff7b18cba1490a715326ec37f03722129a5e8e65c1ff7bcb24
|
File details
Details for the file aserver-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aserver-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c527459dcde70da78197b5ffbce49b6e66c09489cc115345444fc1942cbc69ae
|
|
| MD5 |
5d80aa66b04632696c95d8d7a34bebf0
|
|
| BLAKE2b-256 |
c4bf964e1928d705b5cfa5bafc8cb30407e77c985b763af39f9ca421897d927c
|