Skip to main content

Tort

Tornado framework helpers.

Requires Python 3.7+ as it uses contextvars and Tornado 6+.

Use cases

Add Request Id to all requests

    import logging
    import tornado.ioloop
    import tornado.web
    from tort.logger import configure_logging

    class MainHandler(tornado.web.RequestHandler):
        def get(self):
            self.write("Hello, world")

    def make_app():
        configure_logging('/tmp/logs_with_request_id.txt', logging.DEBUG)

        return tornado.web.Application([
            (r"/", MainHandler),
        ])

    if __name__ == "__main__":
        app = make_app()
        app.listen(8888)
        tornado.ioloop.IOLoop.current().start()

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tort-0.5.9.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tort-0.5.9-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file tort-0.5.9.tar.gz.

File metadata

  • Download URL: tort-0.5.9.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.1

File hashes

Hashes for tort-0.5.9.tar.gz
Algorithm Hash digest
SHA256 9e65dd55ba73cad09e91113e057b3924f38b60056bd72f0b8bfd18bfb58db26d
MD5 668c17269a02465c6a516fb5700fcd89
BLAKE2b-256 acb66260e0b55bbbdda0be0a57e387d8a17ded5737ec92627b6ac9a38236d4ca

See more details on using hashes here.

File details

Details for the file tort-0.5.9-py3-none-any.whl.

File metadata

  • Download URL: tort-0.5.9-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.1

File hashes

Hashes for tort-0.5.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c3da52ab8c1b74190cca7f1a8921eadf726c62daef0cecb274f303c104e6bdd6
MD5 6145408c39d5b51dceb8241876f23f75
BLAKE2b-256 f3948467dd399d23dc9ccf1c87cdb85c33f141b4d46d3188637c915178d17d06

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.9 This release

2 files

0.5.7

1 file

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page