Metadata-Version: 2.3
Name: companion-server
Version: 1.3.3
Summary: a basic http 1.0 server implemented in python
License: MIT License
         
         Copyright (c) 2025 Daniel Krzeminski
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
Author: dankrzeminski32
Author-email: dankrzeminski32@gmail.com
Requires-Python: >=3.11, <4
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Project-URL: Repository, https://github.com/dankrzeminski32/companion
Description-Content-Type: text/markdown

# 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, 

```bash
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

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

## Development

First install the dev dependancies,

```bash
poetry install --with dev
```

Then you can run the test suite,

```bash
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 
