Skip to main content

Shattered

STOMP meets bottle.py

Build Status

Getting Started

Installation

pip install shattered

CLI

shattered run will run a Shattered app, using one of the following (in order):

  1. The --app flag.
  2. The SHATTERED_APP environment variable.
  3. app.py as the application module name.

Use shattered config to see the current configuration (same app resolution as run command).

Echo Server

app.py

import logging

from shattered import Shattered


logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

app = Shattered(host="rabbitmq")


@app.subscribe("/queue/echo")
def echo(headers, body, conn):
    logger.info("%s %s", headers, body)


@app.subscribe("/queue/echo")
def echo_fancy(headers, body, conn):
    logger.info("✨✨✨%s %s✨✨✨", headers, body)


app.run()

Running the Demo

Start up RabbitMQ using docker-compose up

In another shell, run docker-compose run shattered python examples/echo/echo.py

In another shell, run docker-compose run shattered python examples/echo/send.py

Metadata

Release files for shattered 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shattered 0.5.0
File Size Uploaded Provenance
shattered-0.5.0.tar.gz 3.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for shattered 0.5.0
File Interpreter ABI Platform
shattered-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.7 kB

Release files / shattered-0.5.0.tar.gz

Download URL shattered-0.5.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e7f95937ade0ca24a1164dd09acbeb0a952297f77d95d61b61a4cb95bbd796f1
BLAKE2b-256 checksum
How to use checksums
1fe97a421f031c0271a311a5eb91ae844187b24d5858be2c8220b091b71ecb3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.6 Linux/5.4.0-1032-azure

Release files / shattered-0.5.0-py3-none-any.whl

Download URL shattered-0.5.0-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a931e3e87dbd6674cd6e49a9079e1b1692e99663f9f1c37df93d96285d399dde
BLAKE2b-256 checksum
How to use checksums
2bde1bd9e7aba1ea9a55e3df73433468f2fe5f6d0d69084b7d7643b5dd9b9667
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.6 Linux/5.4.0-1032-azure

Security for shattered 0.5.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page