Skip to main content

a basic http 1.0 server implemented in python

Project description

companion

an http 1.0 web server, implemented with python

Note: This is not intended to be used in any form of a production environment. For sake of time, I didn't pay attention to every edge case or security concern.

Installation

First, install the companion server to your computer,

pip install companion-server

Now, we can run the server... The only required argument is a path to your content directory, this is how the server knows where to look for content (e.g. HTML, PNG, etc)

You can optionally specify a port otherwise it will default to 8180

companion-server /home/dan/webserver/content/ --port 1000

Goals

[x] Implement a subset of the http 1.0 protocol (rfc 1945)

[x] Handle GET and HEAD requests from a client

[x] Manage multiple connections (threading, multiprocessing, etc)

[x] Use only the python standard lib

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

companion_server-1.3.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

companion_server-1.3.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file companion_server-1.3.0.tar.gz.

File metadata

  • Download URL: companion_server-1.3.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.11 Linux/6.8.0-1021-azure

File hashes

Hashes for companion_server-1.3.0.tar.gz
Algorithm Hash digest
SHA256 0317a26be10ca690acc2cf3a88df9324ddd4bc4ed54d2caabea8e9de75cbc8be
MD5 209967e5eab4312a5063083d0658e591
BLAKE2b-256 b3d645846af9edde8adbb3a6b70741f5cd7d8515cbc2c5053823812264889654

See more details on using hashes here.

File details

Details for the file companion_server-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: companion_server-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.11 Linux/6.8.0-1021-azure

File hashes

Hashes for companion_server-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e05ad483434c2c96af5375da74571c47d6682cf511ec1a553e550af091b278fe
MD5 98c29996ce8fb3641810edf44257d803
BLAKE2b-256 a7e559a07e16f9b8751cbc5fdf02189efdecbc6d2b9d9f1b6969b38cc348cc26

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