Simple and generic python web server and utils
Project description
Simple Python Server
Simple and generic python web server, designed with simplicity and extendability in mind.
Background & motivation
I really like the simplicity and elegance of frameworks like FastAPI
, Flask
, Express.js
and Koa.js
.
# Typical usage for defining routes
app = FastAPI() # Or some other framework like flask
@app.get("/")
async def root():
return {"message": "Hello World"}
What I don't like, for very simple use cases, is the boilerplate and dependencies.
All of the above frameworks have some requirements and dependencies, meaning its not completely portable to all environments, without the need to download dependencies from the internet.
At its core, this project was designed with the following features in mind:
- Handle
HTTP
routes with a simplerequest
-response
model. - Support ways to serve static content from a folder (eg: HTML, CSS, JS).
- A zero-dependency
server.py
that just works out of the box as a simple web server. - Supports multiple response types, with ability to render custom templated responses.
With these basic requirements in place, rapid prototyping is possible with very little overhead.
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
File details
Details for the file anyserver-0.3.4.tar.gz
.
File metadata
- Download URL: anyserver-0.3.4.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d35a0285f5f9361f0918da5c68fef2f5b2f9cbfbc9a4a258bd8a1b3b43247e6 |
|
MD5 | 918db974001c685c0d739155f4e7804e |
|
BLAKE2b-256 | 975f664926e17cae03a711bc8c54431faf7e4e30c6e08b9e4ece301ac905de48 |