Metadata-Version: 2.1
Name: PyHostr
Version: 0.4
Summary: UNKNOWN
Home-page: https://github.com/FujiwaraChoki/PyHost
Author: Sami Hindi
Author-email: sami@samihindi.com
License: MIT
Keywords: PyHostr
Platform: UNKNOWN
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# PyHostr

Handle HTTP GET and POST requests in Python.

## Installation

```bash
pip install pyhostr
```

## Usage

```python
from pyhostr import PyHostr

# Instantiating the server
server = PyHost("localhost", 8080)

# Creating a GET route
server.get(route="/", response_headers={"Content-type": "text/html"},
            response="<h2>INDEX PAGE</h2>")

# Creating a POST route
server.post(
    route="/post", response_headers={"Content-type": "application/json"}, handler=handler_func)

# Finally, start the server
server.serve()
```

## License

[MIT Sami Hindi 2022 (c)](LICENSE.txt)


