Metadata-Version: 2.2
Name: httpp
Version: 0.1.0
Summary: A Cython project with scikit-build
Author-Email: Mohammad Raziei <mohammadraziei1375@gmail.com>
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Project-URL: Homepage, https://github.com/MohammadRaziei/httpp
Project-URL: Bug Tracker, https://github.com/MohammadRaziei/httpp/issues
Project-URL: Document, https://MohammadRaziei.github.io/httpp
Requires-Python: >=3.8
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == "test"
Requires-Dist: pytest-xdist>=3.0; extra == "test"
Requires-Dist: pytest-cov>=4.0; extra == "test"
Description-Content-Type: text/markdown

# httpp

A lightweight HTTP client + server library for C++ and Python — install
with `pip`, no system dependencies (no `apt`/`choco`/`brew` required), works
as both a Python package and a C++ library via CMake.

## Install

```bash
pip install httpp
```

## Quick start

**Python**

```python
from httpp import Client, Server

# client
res = Client.fetch("http://example.com/")
print(res.status, res.body)

# server — like `python -m http.server`, but embeddable in your own app
srv = Server()
srv.serve_directory("/", "./public")
srv.listen("0.0.0.0", 8000)
```

**CLI**

```bash
httpp server .              # serve the current directory, like python -m http.server
httpp download http://example.com/
```

**C++**

```cpp
#include <httpp.h>

auto res = httpp::client::fetch("http://example.com/");

httpp::server srv;
srv.serve_directory("/", "./public");
srv.listen("0.0.0.0", 8000);
```

```cmake
find_package(httpp CONFIG REQUIRED)
target_link_libraries(app PRIVATE httpp::httpp)
```

## Status

- [x] Client — GET requests, `Client.fetch(url)` from a full URL
- [x] Server — route handlers, static directory serving
- [x] CLI — `httpp server`, `httpp download`
- [ ] HTTPS
- [ ] Route handlers from Python (directory serving works today)

## License

MIT
