Mhtg 0.0.3 | GitLocker.com Product

mhtg 0.0.3

Last updated:

0 purchases

mhtg 0.0.3 Image
mhtg 0.0.3 Images

Free

Languages

Categories

Add to Cart

Description:

mhtg 0.0.3

features

h11, a transport agnostic standards-compliant http/1.1 implementation
trio, an async/await-native IO library focused on usability and correctness



usage
contrived example:
from functools import partial
from mhtg import client, context, model
import trio

client_factory = partial(client.client_factory,
server_hostname="google.com",
port=443)

connection_manager = context.make_connection_manager(client_factory)

def request_builder():
request = h11.Request(method="GET",
target="/",
headers=[
("host", server_hostname),
("content-length", 0),
])

return request,

async def do():
async with connection_manager() as reuse_connection:
async with reuse_connection() as make_request:
await make_request(*request_builder())

trio.run(do)

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product: (if this is empty don't purchase this product)

Customer Reviews

There are no reviews.