serverish - helpers for server alike projects
Features
- Component management
- Singletons
- Connections management and diagnostics
- NATS based Messenger
- Live documents - auto-updating configuration from NATS
See doc directory for more documentation.
Optional (extras) dependencies
The following extras are available:
messenger- for using NATS based Messenger. Will installnats-pypackage.dns- for usingaiodnsDNS resolver for connection status diagnostics, it's extracted as an extra dependency because it's not available on all platforms.
In order to use Messenger, you have to add extra 'messenger' to your project.toml serveris dependency, e.g.:
serverish = {git="https://github.com/AkondLab/serverish.git", extras=["messenger"], branch="master"}
or specify dpendency with extras in the pip convention: serverish[messenger].
this will install nats-py package.
Plans
- Decorators
@messenger.sub(subject)(Web framework style) - Progress with automatic increment for known durations e.g.
pro_pub.update(completed=1, when=+20) - Custom JetStream API replacing nats-py private internals access
Changes
- 1.7 Subscription reliability: reader auto-recovers from NATS disconnects and consumer expiry,
RPC responder auto-resubscribes,
health_statusproperty on all drivers (reader, publisher, RPC responder, connection) with reconnect counts, error tracking, slow consumer detection. Comprehensive test suite (194 tests) with testcontainers-based NATS fixtures. - 1.5 Introduces live documents (
LiveDocument,get_documentreader(),get_live_document()) for auto-updating configuration from NATS. - 1.4 Contains improvements to the network problems recovery and connection tracking.
- 1.1 Switches to
param2.* nadpy-nats1.7.*. Also, publisher may reraise exceptions or ignore them. - 1.0 Changes NATS subscriptions to pull only
- 0.12 Extends messges metdata of
natssection, Handles reconnection of subscriptions, - 0.11 Extends, tasks, NATS connection tracking and messenger opening options (
Messenger.open) - 0.10 Adds timestamp to journal messages and extablishes schema for journal messages.
- 0.9.1 Makes dependency to aiodns optional.
- 0.9.0 Introduces Logging handler for passing standard logging messages to the Messenger.
- 0.8 Introduces journal publishing/reading API.
- 0.7 Includes progress tracking messages in the Messenger API.
- 0.6 introduces breaking changes in the Messenger API:
- Convenience functions
get_xxxxx()returning publishers/readers are synchronous now. Removeawait-ing for their results. - Change of signature of the callback for
MsgRpcResponder.register_functionforRpc->None.
- Convenience functions
Credits
This package uses some code and ideas from the rich package (Copyright (c) 2020 Will McGugan).
Metadata
Release files for serverish 2.2.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 | |
|---|---|---|---|
| serverish-2.2.1.tar.gz | 70.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| serverish-2.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 168.3 kB
Release files / serverish-2.2.1.tar.gz
| Download URL | serverish-2.2.1.tar.gz |
|---|---|
| Size | 70.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a0ba1aba06c124cbbd3743b42084963e3e1060d57dd46841874c6a014b7cec8
|
|
BLAKE2b-256 checksum How to use checksums |
222e1854c3d39f4249ca6807b2cb0f2746d6a1d4b7df9019cacebcfb38e5cdcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.1 CPython/3.12.12 Darwin/25.5.0
|
Release files / serverish-2.2.1-py3-none-any.whl
| Download URL | serverish-2.2.1-py3-none-any.whl |
|---|---|
| Size | 98.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e53c446e41716c80d64809dfddae6823d235f8e172106d86fcb70e3d1f5c057
|
|
BLAKE2b-256 checksum How to use checksums |
180367934a6ea62503ac6d6abd80ad212004276e1cbd4afaa0824be739376d11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.1 CPython/3.12.12 Darwin/25.5.0
|