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

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.3.tar.gz (6.4 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.3-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: companion_server-1.3.3.tar.gz
  • Upload date:
  • Size: 6.4 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.3.tar.gz
Algorithm Hash digest
SHA256 b79c5846c918e11bda2e88e34d3f48a96325decd2a3010942ff6d1c0c6a66b09
MD5 c21859149ffa407a022fe7a76ad38bf4
BLAKE2b-256 d945fb9983e7fca14b6650f3396cb4c4ab8c0190aba5a7df09b876d55096a4ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: companion_server-1.3.3-py3-none-any.whl
  • Upload date:
  • Size: 9.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 93f583d5fa0ab77280442d12ee6a6517aa8c2f06209a8010698ff6daba194621
MD5 24cab7d90ff7d5f036924b055db21b9e
BLAKE2b-256 06250ac4c2eb3d3670aea4d20e8541230df7077855efa63632e8769ca5888ffe

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.3 This release

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.4

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.5

2 files

1.1.1.post2

2 files

1.1.0.post2

2 files

1.0.1

2 files

Supported by

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