Skip to main content

SimpleHTTP is a minimalist, no-nonsense HTTP server written in Python. Created purely for fun, this server is as simple as it gets—no third-party dependencies, no unnecessary features, just pure, unfiltered HTTP handling. Note that this project is currently unstable and primarily a learning experiment.

Project description

SimpleHTTPServe

Overview

SimpleHTTPServe is a minimalist, no-nonsense HTTP server written in Python. Created purely for fun, this server is as simple as it gets—no third-party dependencies, no unnecessary features, just pure, unfiltered HTTP handling. Note that this project is currently unstable and primarily a learning experiment.

Features

  • Zero third-party dependencies
  • Lightweight and easy to understand
  • Handles basic HTTP requests and responses
  • Designed for simplicity and educational purposes

Getting Started

Prerequisites

  • Python 3.6 or higher

Installation

Clone the repository to your local machine:

pip install SimpleHTTPServe

Usage

from SimpleHTTPServe import App, Response, HtmlResponse
from http import HTTPStatus

app = App()

def serve(request):
    return Response(HTTPStatus.OK, "aman")

def index(request):
    return HtmlResponse(HTTPStatus.OK, "hello.html")

if __name__=="__main__":
    app.register("GET", "", serve)
    app.register("GET", "/index", index)
    app.start()

Contributing to SimpleHTTPServe

Feel free to add whatever you feel is intresting. Whether you're fixing bugs, adding new features, improving the documentation, or simply offering suggestions, your contributions are highly appreciated.

How to Contribute

1. Fork the Repository

Click on the "Fork" button at the top of this repository to create your own copy of the SimpleHTTPServe repository. And then create PR.

2. Clone Your Fork

Clone your forked repository to your local machine.

git clone https://github.com/yourusername/SimpleHTTPServe.git

Next Steps

  1. read port from terminal/config

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

SimpleHTTPServe-0.0.3.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

SimpleHTTPServe-0.0.3-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file SimpleHTTPServe-0.0.3.tar.gz.

File metadata

  • Download URL: SimpleHTTPServe-0.0.3.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.13

File hashes

Hashes for SimpleHTTPServe-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7e48a0c2f3bea071b2df5507dbb49d5df824e02bbc2cbfef59a6e61eabb28fe0
MD5 b50162d020e2a76f151078cc0a2396a6
BLAKE2b-256 283fb1635419e9a36972ae0e4bf0869750e8decfd0aa8e8e4e846ecad033d3fc

See more details on using hashes here.

File details

Details for the file SimpleHTTPServe-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for SimpleHTTPServe-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 14f659a71ee6b85db1709f385c840d6bb8bd5cbd3b41d7329f57e18614d605ce
MD5 cc3790a978f64a4d1a465cce679ba9c9
BLAKE2b-256 c034ffc93710f18eebc2eb583f46970d35841cdd2cd4abe1af154bedb2bd8f7e

See more details on using hashes here.

Supported by

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