Skip to main content

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 simple request - 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anyserver-0.3.4.tar.gz (19.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page