Skip to main content

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

Metadata

Release files for companion-server 1.3.3

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

Source distribution (sdist)

Source distribution for companion-server 1.3.3
File Size Uploaded
companion_server-1.3.3.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for companion-server 1.3.3
File Interpreter ABI Platform
companion_server-1.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / companion_server-1.3.3.tar.gz

Download URL companion_server-1.3.3.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b79c5846c918e11bda2e88e34d3f48a96325decd2a3010942ff6d1c0c6a66b09
BLAKE2b-256 checksum
How to use checksums
d945fb9983e7fca14b6650f3396cb4c4ab8c0190aba5a7df09b876d55096a4ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.11.11 Linux/6.8.0-1021-azure

Release files / companion_server-1.3.3-py3-none-any.whl

Download URL companion_server-1.3.3-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93f583d5fa0ab77280442d12ee6a6517aa8c2f06209a8010698ff6daba194621
BLAKE2b-256 checksum
How to use checksums
06250ac4c2eb3d3670aea4d20e8541230df7077855efa63632e8769ca5888ffe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.11.11 Linux/6.8.0-1021-azure

Release history Release notifications | RSS feed

This release

1.3.3 This release

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.0.1

2 release files

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