NATS App
NATS App is wrapper application on NATS Connection
Create NATS Application
NATS_URL = "nats://localhost:4222"
nc = NATSApp(NATS_URL)
await nc.connect()
Add RPC Handler
@nc.push_subscribe("app.test.echo", queue="worker")
async def rpc_func_echo(msg: Any) -> str:
return f"Response with Msg.data: {msg.data}"
Call RPC
res = await nc.request("app.test.echo", {"args": ["test"]})
print(res)
JetStream push subscription
@nc.js_push_subscribe("app.test.js.subs", queue="worker")
async def handler(msg: Msg):
print(msg.data)
await msg.ack()
JetStream pull subscription
@nc.js_pull_subscribe("app.subject.js.subs", batch=1)
async def handler(msgs: list[Msg]):
for m in msgs:
print(m)
await m.ack()
JetStream publish
await nc.js.publish("app.subject.js.subs", b"TEST123")
Metadata
Release files for nats-app 0.7.6
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 |
|---|---|---|---|---|
| nats_app-0.7.6.tar.gz | 21.0 kB | Without provenance | Details for nats_app-0.7.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nats_app-0.7.6-py3-none-any.whl | Python 3 | none | any | Details for nats_app-0.7.6-py3-none-any.whl |
Total release size: 48.2 kB
Release files / nats_app-0.7.6.tar.gz
| Download URL | nats_app-0.7.6.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce9ba48e1ff732d98320c1e3e84bf569e2ab054d36db97e7e4937744e6fa38f3
|
|
BLAKE2b-256 checksum How to use checksums |
cef275e089dbdab4eba9d1bf247fd05d4d68fe9ded2591cb8c3ec46a174d3a90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.12 Linux/6.11.0-1018-azure
|
Release files / nats_app-0.7.6-py3-none-any.whl
| Download URL | nats_app-0.7.6-py3-none-any.whl |
|---|---|
| Size | 27.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f61bfde3936d7016fe2c7a7e11e8819459cbcbb3660a4a772b04d27a9ce6c549
|
|
BLAKE2b-256 checksum How to use checksums |
2e6a4f5f87dfb5cd672d681487c1041776e8045d4f77598f7ca19a3eb8425e24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.12 Linux/6.11.0-1018-azure
|
Security for nats-app 0.7.6
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.