sprockets.mixins.correlation
This sprocket provides a single mix-in that imbues your RequestHandler with a unique correlation ID. If a correlation ID is present upon input then it will be preserved in the output. It is also available for your use as the correlation_id property.
Installation
sprockets.mixins.correlation is available on the Python Package Index and can be installed via pip:
$ pip install sprockets.mixins.correlation
Example
from sprockets.mixins import correlation
from tornado import ioloop, web
class Handler(correlation.HandlerMixin, web.RequestHandler):
def get(self):
self.finish('my id is {0}'.format(self.correlation_id)
if __name__ == '__main__':
application = web.Application([('/', Handler)])
application.listen(8888)
ioloop.IOLoop.instance().start()
Generated Correlation ID
GET / HTTP/1.1
Host: localhost:8888
Connection: keep-alive
HTTP/1.1 200 OK
Correlation-ID: 0a2b6080-e4da-43bf-a2a5-38d861846cb9
Content-Length: 44
my id is 0a2b6080-e4da-43bf-a2a5-38d861846cb9
Relayed Correlation ID
GET / HTTP/1.1
Host: localhost:8888
Connection: keep-alive
Correlation-Id: 4676922073c4c59b1f5e6b4a18894bd46f867316
HTTP/1.1 200 OK
Correlation-ID: 4676922073c4c59b1f5e6b4a18894bd46f867316
Connection: close
Content-Length: 48
my id is 4676922073c4c59b1f5e6b4a18894bd46f867316
Metadata
Release files for sprockets.mixins.correlation 3.0.0
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 |
|---|---|---|---|---|
| sprockets.mixins.correlation-3.0.0.tar.gz | 7.1 kB | Without provenance | Details for sprockets.mixins.correlation-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sprockets.mixins.correlation-3.0.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for sprockets.mixins.correlation-3.0.0-py2.py3-none-any.whl |
Total release size: 13.8 kB
Release files / sprockets.mixins.correlation-3.0.0.tar.gz
| Download URL | sprockets.mixins.correlation-3.0.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f13ad20b2b74b84656f526d14d75dad12a4672a7d2752511164c6dee8ca28def
|
|
BLAKE2b-256 checksum How to use checksums |
13f202aaf228dc9ef23ae6767dbb01d9c620ed69aa2eac2b254df19654b21d1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.7
|
Release files / sprockets.mixins.correlation-3.0.0-py2.py3-none-any.whl
| Download URL | sprockets.mixins.correlation-3.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
61d1455e4af80bf85f219d6135b5726d1eb45c42ca31ea7297255339d199e53c
|
|
BLAKE2b-256 checksum How to use checksums |
64e67e9ccead4fc94dd30db12dcf8d1ca6bc10e61e7e79f58c23d8abb1b6f64e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.7
|
Security for sprockets.mixins.correlation 3.0.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.