Skip to main content

ustack-tornado-shutdown

Library for gracefully terminating a Tornado server on SIGTERM

Example Without Grace Period

import asyncio
from ustack_tornado_shutdown.graceful_shutdown import on_sigterm


async def run_forever():
    while True:
        asyncio.sleep(1)


async def main():
    asyncio.create_task(run_forever())

    await on_sigterm()


if __name__ == "__main__":
    asyncio.run(main())

Example With Grace Period

import asyncio
from tornado.web import Application
from ustack_tornado_shutdown.graceful_shutdown import on_sigterm


async def main():
    app = Application([])

    server = app.listen(8000)

    await on_sigterm(server.stop)


if __name__ == "__main__":
    asyncio.run(main())

Metadata

Release files for ustack-tornado-shutdown 1.0.1

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

Source distribution (sdist)

Source distribution for ustack-tornado-shutdown 1.0.1
File Size Uploaded Provenance Actions
ustack_tornado_shutdown-1.0.1.tar.gz 2.0 kB Without provenance Details for ustack_tornado_shutdown-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ustack-tornado-shutdown 1.0.1
File Interpreter ABI Platform Actions
ustack_tornado_shutdown-1.0.1-py3-none-any.whl Python 3 none any Details for ustack_tornado_shutdown-1.0.1-py3-none-any.whl

Total release size: 5.1 kB

Release files / ustack_tornado_shutdown-1.0.1.tar.gz

Download URL ustack_tornado_shutdown-1.0.1.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f9b39194eb315f86fce0f037209cfc2592b018edcd302dc4c69b73b35570b757
BLAKE2b-256 checksum
How to use checksums
f2f40607dca66ee48940b941febad9ee742d40a2c8a8e398e135930698ea42ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.15.1 Linux/7.0.0-1014-aws

Release files / ustack_tornado_shutdown-1.0.1-py3-none-any.whl

Download URL ustack_tornado_shutdown-1.0.1-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cdc92f0ee200a8f7389ece70f538bcc0aa3c55e04b06709a63be1c2d69a20f6
BLAKE2b-256 checksum
How to use checksums
0f49f02629cfbf4265ca3cf9c3db3fa585e62c520c77311457d8e4e9e8592e18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.15.1 Linux/7.0.0-1014-aws

Security for ustack-tornado-shutdown 1.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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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