Skip to main content
https://travis-ci.org/iceb0y/pyh2o.svg?branch=master

The pyh2o module provides Python binding for the H2O HTTP server. Specifically, it provides high performance HTTP 1/2 and websocket server for Python.

Installation

pip install pyh2o

If binary distribution for your platform is not provided, you will need cmake>=2.8.11 to install.

Development

Clone the repository, initialize submodules by git submodule update --init --recursive.

  • Build: python setup.py build

  • Test: python setup.py test

  • Clean: python setup.py clean

End to end test brings up a real server and make requests to it.

Example

Below is an example of serving static content.

import h2o
import socket

class Handler(h2o.Handler):
    def on_req(self):
        self.res_status = 200
        self.send_inline(b'Hello, world!')
        return 0

config = h2o.Config()
host = config.add_host(b'default', 65535)
host.add_path(b'/plaintext').add_handler(Handler)

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, True)
sock.bind(('127.0.0.1', 8888))
sock.listen(0)

loop = h2o.Loop()
loop.start_accept(sock.fileno(), config)
while loop.run() == 0:
    pass

Release files for pyh2o 0.0.6

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

Source distribution (sdist)

Source distribution for pyh2o 0.0.6
File Size Uploaded
pyh2o-0.0.6.tar.gz 16.7 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyh2o 0.0.6
File
pyh2o-0.0.6-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
pyh2o-0.0.6-cp34-cp34m-manylinux1_x86_64.whl CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-64 Details
pyh2o-0.0.6-cp33-cp33m-manylinux1_x86_64.whl CPython 3.3 CPython 3.3 pymalloc Linux glibc 2.5+ x86-64 Details
pyh2o-0.0.6-cp27-cp27mu-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 Details
pyh2o-0.0.6-cp27-cp27m-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64 Details
pyh2o-0.0.6-cp26-cp26mu-manylinux1_x86_64.whl CPython 2.6 CPython 2.6 pymalloc wide-unicode Linux glibc 2.5+ x86-64 Details
pyh2o-0.0.6-cp26-cp26m-manylinux1_x86_64.whl CPython 2.6 CPython 2.6 pymalloc Linux glibc 2.5+ x86-64 Details

Total release size:28.2 MB

Release files / pyh2o-0.0.6.tar.gz

Download URL pyh2o-0.0.6.tar.gz
Size 16.7 MB
Tags Source
SHA-256 checksum
How to use checksums
af75ffa8ced82dfa6e6027ae56e12bf24fca7edf5752a97894fb83a1e826563b
BLAKE2b-256 checksum
How to use checksums
4e48ff2b61150b5743778b9d2b7551c1cef85df30364e010fa65768424aac8cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyh2o-0.0.6-cp35-cp35m-manylinux1_x86_64.whl

Download URL pyh2o-0.0.6-cp35-cp35m-manylinux1_x86_64.whl
Size 1.7 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
4b8a42a1ad8446fcd1c8732709503fdd230a704c4a96451a6bde0aab3d70f116
BLAKE2b-256 checksum
How to use checksums
732e243999558196f9cbb38d5287ef32660ac37c0f51ea19aca642ab1d5c5b37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyh2o-0.0.6-cp34-cp34m-manylinux1_x86_64.whl

Download URL pyh2o-0.0.6-cp34-cp34m-manylinux1_x86_64.whl
Size 1.7 MB
Tags CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
cd00fe2093441a4d61c9d13ea1a9b72d20a3d99b455db88e05fb3a8fea17ae55
BLAKE2b-256 checksum
How to use checksums
b80a34914cb739d9b4486fb7d5c4eed38a03f98c43a4238d8c6a239f121b1783
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyh2o-0.0.6-cp33-cp33m-manylinux1_x86_64.whl

Download URL pyh2o-0.0.6-cp33-cp33m-manylinux1_x86_64.whl
Size 1.6 MB
Tags CPython 3.3 CPython 3.3 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
bbeeb4caaa470ee3211e7ebb5fb81dcc61e3aebb0f0a6f6cc237f5d48d941b6a
BLAKE2b-256 checksum
How to use checksums
2695638746a1450c6eb21a28f884d2310de126c46a2cbeb1f156ace492a49c34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyh2o-0.0.6-cp27-cp27mu-manylinux1_x86_64.whl

Download URL pyh2o-0.0.6-cp27-cp27mu-manylinux1_x86_64.whl
Size 1.6 MB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
f05f6a9b072b286d1436aeaceb1afc8840e2ed8adf33af1914a9852cf245d512
BLAKE2b-256 checksum
How to use checksums
8515fb170f07edeb13a4961e0692ec35766aca7b13dc087cc8f87dfd44f2ac44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyh2o-0.0.6-cp27-cp27m-manylinux1_x86_64.whl

Download URL pyh2o-0.0.6-cp27-cp27m-manylinux1_x86_64.whl
Size 1.6 MB
Tags CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
1f756cded13f571573b7003ca9315da1a0c06a3b04c5f248712d11e2821750e5
BLAKE2b-256 checksum
How to use checksums
8df6bb92464720e47394d2cb88a6544373dba79e100dc7a6376fe4f0b9b345af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyh2o-0.0.6-cp26-cp26mu-manylinux1_x86_64.whl

Download URL pyh2o-0.0.6-cp26-cp26mu-manylinux1_x86_64.whl
Size 1.6 MB
Tags CPython 2.6 CPython 2.6 pymalloc wide-unicode Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
867673485afd5130091e225ad9c07c86c42113faab325f85421dc5e3b50b4315
BLAKE2b-256 checksum
How to use checksums
8ca0ae4a9b8de2a3ea28df28b539b1b4953237bef23ae5acc3f29a2cbd357ba6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyh2o-0.0.6-cp26-cp26m-manylinux1_x86_64.whl

Download URL pyh2o-0.0.6-cp26-cp26m-manylinux1_x86_64.whl
Size 1.6 MB
Tags CPython 2.6 CPython 2.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
d61b3cd7b89de89f547be0aecb8e04ed26f56ffc87e04af3c190b65a86e15484
BLAKE2b-256 checksum
How to use checksums
ed9d882d9b438c043293c47a1b28b07c0886db26214eab2f34a845e6f9b8cc8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.6 This release

8 release files

0.0.5

3 release files

0.0.4

3 release files

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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