To publish:
uv run python -m build
uv run twine upload dist/*
To install:
uv add psServerWrapper
To update to a newer version after upload during development:
uv remove psServerWrapper
uv cache clear psServerWrapper
uv add psServerWrapper
To use:
import uvicorn
import psServerWrapper
from fastapi import FastAPI, Request
app = FastAPI()
@app.post("/myEndpoint")
async def myEndpoint(request: Request):
print("myEndpoint")
res = {"success": True, "message": "Hi there"}
return res
server: uvicorn.Server | None = None
psServerWrapper.register_shutdown_endpoint(app, lambda: server)
if __name__ == "__main__":
def set_server(s: uvicorn.Server) -> None:
global server
server = s
psServerWrapper.run(app, set_server)
Run your script with optional arguments:
python my_server.py --port 8000 --label dev --dt 1000 --debug false
CLI Arguments
--port: Port to bind to. Use0to auto-select a free port.--label: Label included in the status filename.--dt: Status write interval in milliseconds.--tShutdown: If no requests are being made to the api for tShutdown[ms] the server will shut down--debug: Enables uvicorn reload behavior intended for local development.
Metadata
Release files for psServerWrapper 2.0.1
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 | |
|---|---|---|---|---|
| psserverwrapper-2.0.1.tar.gz | 3.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| psserverwrapper-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / psserverwrapper-2.0.1.tar.gz
| Download URL | psserverwrapper-2.0.1.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57a36df6ed1dc9498b4a28dc97cf4e9843f45079d2302150ffd4046ef128d0ba
|
|
BLAKE2b-256 checksum How to use checksums |
3376770bb3b031030cd58256479991deb3afbeb07ba34309e45ae57482bb44c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0
|
Release files / psserverwrapper-2.0.1-py3-none-any.whl
| Download URL | psserverwrapper-2.0.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f3024fafbb0ef61f5de3320afeee9bcdbdb5fd7ce151fbd16afa23cedc19ff6
|
|
BLAKE2b-256 checksum How to use checksums |
b4a2fa2553d0be14de6b8eb59a48bb3a22d6dc952a6ef836fd7c3088a2fd3e81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0
|
Security for psServerWrapper 2.0.1
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.