kopia lustrzana https://github.com/cirospaciari/socketify.py
update readme
rodzic
ed84fbb4d6
commit
364d84312e
45
README.md
45
README.md
|
@ -1,15 +1,34 @@
|
||||||
# socketify.py
|
# socketify.py
|
||||||
[](https://github.com/cirospaciari/socketify.py/actions/workflows/macos.yml)
|
|
||||||
[](https://github.com/cirospaciari/socketify.py/actions/workflows/linux.yml)
|
|
||||||
[](https://github.com/cirospaciari/socketify.py/actions/workflows/windows.yml)
|
|
||||||
|
|
||||||
Fast WebSocket and Http/Https server using CFFI with C API from [uNetworking/uWebSockets](https://github.com/uNetworking/uWebSockets)
|
|
||||||
|
|
||||||
This project aims at High Performance PyPy3 Web Development and WebSockets
|
<p align="center">
|
||||||
|
<a href="https://github.com/cirospaciari/socketify.py"><img src=" https://raw.githubusercontent.com/cirospaciari/socketify.py/main/misc/logo.png" alt="Logo" height=170></a>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<a href="https://github.com/cirospaciari/socketify.py/actions/workflows/macos.yml" target="_blank"><img src="https://github.com/cirospaciari/socketify.py/actions/workflows/macos.yml/badge.svg" /></a>
|
||||||
|
<a href="https://github.com/cirospaciari/socketify.py/actions/workflows/linux.yml" target="_blank"><img src="https://github.com/cirospaciari/socketify.py/actions/workflows/linux.yml/badge.svg" /></a>
|
||||||
|
<a href="https://github.com/cirospaciari/socketify.py/actions/workflows/windows.yml" target="_blank"><img src="https://github.com/cirospaciari/socketify.py/actions/workflows/windows.yml/badge.svg" /></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
> This project will adapt the full C API from uNetworking/uWebSockets, this same C API is used by [Bun](https://bun.sh/)
|
|
||||||
|
|
||||||
### Overly simple hello world app [click here](https://github.com/cirospaciari/socketify.py/tree/main/examples) for more examples
|
|
||||||
|
socketify.py brings:
|
||||||
|
|
||||||
|
- WebSocket with pub/sub support
|
||||||
|
- Fast and realiable Http/Https
|
||||||
|
- Support for Windows, Linux and macOS Silicon & x64
|
||||||
|
- Support for [`PyPy3`](https://www.pypy.org/) and [`CPython`](https://github.com/python/cpython)
|
||||||
|
|
||||||
|
|
||||||
|
This project aims to bring high performance PyPy3 web development and will bring:
|
||||||
|
- fetch like API powered by libuv
|
||||||
|
- async file IO powered by libuv
|
||||||
|
- full asyncio integration with libuv
|
||||||
|
|
||||||
|
We adapt the full C API from uNetworking/uWebSockets and integrate libuv powered fetch and file IO, this same C API is used by [Bun](https://bun.sh/)
|
||||||
|
|
||||||
|
|
||||||
|
Overly simple hello world app [click here](https://github.com/cirospaciari/socketify.py/tree/main/examples) for more examples
|
||||||
```python
|
```python
|
||||||
from socketify import App
|
from socketify import App
|
||||||
|
|
||||||
|
@ -19,8 +38,7 @@ app.listen(3000, lambda config: print("Listening on port http://localhost:%d now
|
||||||
app.run()
|
app.run()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
pip install
|
||||||
### pip install
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install git+https://github.com/cirospaciari/socketify.py.git
|
pip install git+https://github.com/cirospaciari/socketify.py.git
|
||||||
|
@ -30,21 +48,20 @@ pypy3 -m pip install git+https://github.com/cirospaciari/socketify.py.git
|
||||||
pypy3 -m pip install -e git+https://github.com/cirospaciari/socketify.py.git@main#egg=socketify
|
pypy3 -m pip install -e git+https://github.com/cirospaciari/socketify.py.git@main#egg=socketify
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install via requirements.txt
|
requirements.txt
|
||||||
|
|
||||||
requirements.txt file content
|
|
||||||
```text
|
```text
|
||||||
git+https://github.com/cirospaciari/socketify.py.git@main#socketify
|
git+https://github.com/cirospaciari/socketify.py.git@main#socketify
|
||||||
```
|
```
|
||||||
|
|
||||||
install command
|
install via requirements.txt
|
||||||
```bash
|
```bash
|
||||||
pip install -r ./requirements.txt
|
pip install -r ./requirements.txt
|
||||||
#or specify PyPy3
|
#or specify PyPy3
|
||||||
pypy3 -m pip install -r ./requirements.txt
|
pypy3 -m pip install -r ./requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
### SSL version sample
|
SSL version sample
|
||||||
``` python
|
``` python
|
||||||
from socketify import App, AppOptions
|
from socketify import App, AppOptions
|
||||||
|
|
||||||
|
@ -54,7 +71,7 @@ app.listen(3000, lambda config: print("Listening on port http://localhost:%d now
|
||||||
app.run()
|
app.run()
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build local from source
|
Build local from source
|
||||||
```bash
|
```bash
|
||||||
#clone and update submodules
|
#clone and update submodules
|
||||||
git clone https://github.com/cirospaciari/socketify.py.git
|
git clone https://github.com/cirospaciari/socketify.py.git
|
||||||
|
|
Ładowanie…
Reference in New Issue