Ciro 2022-05-24 18:45:24 -03:00
commit 31d4eda821
2 zmienionych plików z 46 dodań i 0 usunięć

21
LICENSE 100644
Wyświetl plik

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Ciro Spaciari
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

25
README.md 100644
Wyświetl plik

@ -0,0 +1,25 @@
# uWebSockets.py
Fast WebSocket and Http/Https server using CFFI with C API from [uNetworking/uWebSockets](https://github.com/uNetworking/uWebSockets)
> This project will adapt the full capi from uNetworking/uWebSockets but for now it's just this.
### Overly simple hello world app
```python
from "uws" import UWSApp
app = UWSApp()
app.get("/", lambda res, req: res.end("Hello World uWS from Python!"))
app.listen(3000, lambda socket, config: print("Listening on port http://localhost:%s now\n" % str(config.port)))
app.run()
```
### pip (working progress)
```bash
pip install git+https://github.com/cirospaciari/uWebSockets.py.git
```
### Run
```bash
pypy3 ./hello_world.py
```