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

Development

First install the dev dependancies,

poetry install --with dev

Then you can run the test suite,

poetry run pytest .

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.2.tar.gz (6.3 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.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: companion_server-1.3.2.tar.gz
  • Upload date:
  • Size: 6.3 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.2.tar.gz
Algorithm Hash digest
SHA256 8217dbf992360a16b44bc0be8498d5bb030de4e6a41680f5c38c7295ef668c9d
MD5 2cc9bf3f76e8465cf43b4cbf4c8ecff2
BLAKE2b-256 9fa8dd4fecd501ad1936aa697baba8670692cb9d14042999df154304c5093fba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: companion_server-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 21e113be9dc2ec19b5b3587f64da68d62184af9421d826f382ec349540903240
MD5 4215c2947931c8a6768ec00cd77ec0b8
BLAKE2b-256 c392c387e86356355121f39a7b70b471504abcb4b7a9ccf340dc2040b4a39b3a

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