Language
简体中文English
FloraServer
By inheriting a large number of modified websocket-server library classes to customize a network router, splitting regular HTTP connections from WebSocket connections, and constructing a WSGI environment and HTTP request headers to call flask, websocket-server and flask can communicate on the same port
How to use it?
You can choose to directly 'clone' this repository into your project- Use the following command to install
pip install FloraServer
- Import
FloraServerinto your projectFrom FloraServer import [class]There are twoWebSocketServer classesin this project, one isFloraFlaskWSServer, the protagonist of this repository, and the other isFloraWebsocket Server, which is not much different fromWebsocket Server, only with relatively loose connections - To start using, follow the development documentation for
flaskandwebsocket-server
Code Demonstration
from FloraServer import FloraFlaskWSServer
from flask import Flask
app = Flask(__name__)
@app.route("/")
def index():
return "Hello world!"
def on_message(client, server, message):
print(message)
if __name__ == "__main__":
server = FloraFlaskWSServer(flask_app=app, host="0.0.0.0", port=5000)
server.set_fn_message_received(on_message)
server.run_forever()
Metadata
Release files for FloraServer 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| floraserver-0.1.0.tar.gz | 4.5 kB | Without provenance | Details for floraserver-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| floraserver-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for floraserver-0.1.0-py3-none-any.whl |
Total release size: 10.0 kB
Release files / floraserver-0.1.0.tar.gz
| Download URL | floraserver-0.1.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0347cf35f7fd8e2cfb138f92d90c6ecd66387c93c4ff46534497db4c60d9fac
|
|
BLAKE2b-256 checksum How to use checksums |
dac39e49aad812724e3ca78a181e5b40a392fa3c2e0a2684938d8dea5ae90462
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.22.3 CPython/3.13.1 Linux/6.8.0-1020-azure
|
Release files / floraserver-0.1.0-py3-none-any.whl
| Download URL | floraserver-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc86938c62a3fa685606cefd45a9d3092f66e75ecceb6990c62f403bf076358a
|
|
BLAKE2b-256 checksum How to use checksums |
fcace0126d0e24381ef657e9f923e638e964b3444b49b1f60034a5d5a55d4bef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.22.3 CPython/3.13.1 Linux/6.8.0-1020-azure
|
Security for FloraServer 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.