Socketify.py is a reliable, high-performance Python web framework for building large-scale app backends and microservices.
 
 
 
 
 
 
Go to file
Ciro 3872860684 add async upgrade 2022-11-07 14:35:06 -03:00
.github/workflows Update linux.yml 2022-11-05 13:27:02 -03:00
examples add async upgrade 2022-11-07 14:35:06 -03:00
src add async upgrade 2022-11-07 14:35:06 -03:00
.gitignore new Makefile for shared libraries 2022-11-01 17:09:56 -03:00
.gitmodules fix modules?? 2022-05-28 20:18:31 -03:00
CODE_OF_CONDUCT.md add CODE_OF_CONDUCT and get_headers 2022-10-28 17:27:34 -03:00
LICENSE Initial commit 2022-05-24 16:29:51 -03:00
README.md added WebSockets and server name support 2022-11-07 11:06:13 -03:00
setup.py rollback perf tests 2022-11-06 07:25:07 -03:00

README.md

socketify.py

MacOS Build Linux Build Windows Build

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

This project aims at High Performance PyPy3 Web Development and WebSockets

This project will adapt the full C API from uNetworking/uWebSockets, this same C API is used by Bun

Overly simple hello world app click here for more examples

from socketify import App

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

pip install

pip install git+https://github.com/cirospaciari/socketify.py.git
#or specify PyPy3
pypy3 -m pip install git+https://github.com/cirospaciari/socketify.py.git
#or in editable mode
pypy3 -m pip install -e git+https://github.com/cirospaciari/socketify.py.git@main#egg=socketify

Install via requirements.txt

requirements.txt file content

git+https://github.com/cirospaciari/socketify.py.git@main#socketify

install command

pip install -r ./requirements.txt 
#or specify PyPy3
pypy3 -m pip install -r ./requirements.txt 

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 config: print("Listening on port http://localhost:%d now\n" % config.port))
app.run()

Build local from source

#clone and update submodules
git clone https://github.com/cirospaciari/socketify.py.git
cd ./socketify.py
git submodule update --init --recursive --remote
#you can use make linux, make macos or call Make.bat from Visual Studio Development Prompt to build
cd ./src/socketify/native/ && make linux && cd ../../../
#install local pip
pypy3 -m pip install .
#install in editable mode
pypy3 -m pip install -e .
#if you want to remove
pypy3 -m pip uninstall socketify