Skip to main content

Simple Web Server

A simple web server package built using Python's http.server module. This library provides an easy way to serve files and handle HTTP requests with custom routing.

Features

  • Lightweight and easy to use.
  • Modular route management through dynamic import of modules.
  • Threading support for handling multiple requests concurrently.
  • Custom request handlers for specific endpoints.

Installation

You can install the package via pip:

pip install simplewebserver

Usage

from simplewebserver import SimpleWebServer
import my_routes  # Your custom route module

# Create a new server instance
server = SimpleWebServer()

# Include your custom route module
server.include_routes_module(my_routes)

# Start the server on port 5000
server.start(port=5000)
# my_routes.py
from simplewebserver import route, Request, Response

@route('/hello')
def hello_world(request:Request):
    return Response({'message': 'Hello, World!'})

Metadata

Release files for simplewebserver 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simplewebserver 0.0.6
File Size Uploaded Provenance Actions
simplewebserver-0.0.6.tar.gz 4.9 kB Without provenance Details for simplewebserver-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simplewebserver 0.0.6
File Interpreter ABI Platform Actions
simplewebserver-0.0.6-py3-none-any.whl Python 3 none any Details for simplewebserver-0.0.6-py3-none-any.whl

Total release size: 10.9 kB

Release files / simplewebserver-0.0.6.tar.gz

Download URL simplewebserver-0.0.6.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
77368d02f9dde814f6671450b897aad81e63267e603921eb86439ba5d7ad3723
BLAKE2b-256 checksum
How to use checksums
60878b4ad8030236bedaee578cc18916157c63b502fae4655358a59800c60ee3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release files / simplewebserver-0.0.6-py3-none-any.whl

Download URL simplewebserver-0.0.6-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47881fa45acd2cde6022db70b6b2dce688b4f66602f4f2526253f4bffc5a63ee
BLAKE2b-256 checksum
How to use checksums
61da532ca07b187a013ae431c690751bdc1d4e31c3e080505c1a6da4421183e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Security for simplewebserver 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page