Socketify.py is a reliable, high-performance Python web framework for building large-scale app backends and microservices.
 
 
 
 
 
 
Go to file
Ciro b6f2572372 rename 2022-05-28 10:47:26 -03:00
misc added listen options and SSL support 2022-05-25 10:55:23 -03:00
.gitignore rename 2022-05-28 10:47:26 -03:00
LICENSE Initial commit 2022-05-24 16:29:51 -03:00
README.md rename 2022-05-28 10:47:26 -03:00
libuv.py rename 2022-05-28 10:47:26 -03:00
libuwebsockets.so firsts tests with python/pypy with CFFI, no pip package yeat 2022-05-24 18:43:27 -03:00
original.py rename 2022-05-28 10:47:26 -03:00
selector.py rename 2022-05-28 10:47:26 -03:00
socketify.py rename 2022-05-28 10:47:26 -03:00
tests.py rename 2022-05-28 10:47:26 -03:00

README.md

socketify.py

Fast WebSocket and Http/Https server using CFFI with C API from uNetworking/uWebSockets

This project will adapt the full capi from uNetworking/uWebSockets but for now it's just this.

Overly simple hello world app

from socketify import App

app = App()
app.get("/", lambda res, req: res.end("Hello World socketify from Python!"))
app.listen(3000, lambda socket, config: print("Listening on port http://localhost:%d now\n" % config.port))
app.run()

pip (working progress)

pip install git+https://github.com/cirospaciari/socketify.py.git

Run

pypy3 ./hello_world.py

SSL version sample

from socketify import App, AppOptions

app = App(AppOptions(key_file_name="./misc/key.pem", cert_file_name="./misc/cert.pem", passphrase="1234"))
app.get("/", lambda res, req: res.end("Hello World socketify from Python!"))
app.listen(3000, lambda socket, config: print("Listening on port http://localhost:%d now\n" % config.port))
app.run()