Name | landregistry-trace-id JSON |
Version |
0.9.9
JSON |
| download |
home_page | None |
Summary | Tracability for HMLR applications |
upload_time | 2024-10-31 13:55:06 |
maintainer | None |
docs_url | None |
author | Ian Harvey |
requires_python | >=3.9 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Tracability for Python applications
Convienience Flask extension for retrieving trace IDs from incoming requests.
This package depends on:
* Flask (Version 2.2.2 or higher)
* Python 3.9 or higher
## Usage
Instantiate it like a normal flask extension:
```python
from landregistry.trace_id import TraceID
from <somewhere> import app
# ...
trace_id_extn = TraceID()
trace_id_extn.init_app(app)
# retrieve the current trace ID
trace_id = trace_id_extn.current_trace_id
```
## Properties
TraceID.**current_trace_id**
If the application is serving a request, and the value in the request header `X-Trace-ID` is present and is a valid trace ID, then returns the header value.
If the application is serving a request, and the request header `X-Trace-ID` is absent or contains an invalid trace ID, returns a new trace ID. A new trace ID generated this way will be the same for all calls to **current_trace_id** for a given request.
If the application is not serving a request, returns `N/A`.
Raw data
{
"_id": null,
"home_page": null,
"name": "landregistry-trace-id",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Ian Harvey",
"author_email": "ian.harvey@landregistry.gov.uk",
"download_url": "https://files.pythonhosted.org/packages/22/98/12249383d4092f3d5e3ba120bb53a36ed5ea63a1d1dc1582e251327fc134/landregistry_trace_id-0.9.9.tar.gz",
"platform": null,
"description": "# Tracability for Python applications\n\nConvienience Flask extension for retrieving trace IDs from incoming requests.\n\nThis package depends on:\n* Flask (Version 2.2.2 or higher)\n* Python 3.9 or higher\n\n## Usage\n\nInstantiate it like a normal flask extension:\n\n```python\nfrom landregistry.trace_id import TraceID\nfrom <somewhere> import app\n\n# ...\n\ntrace_id_extn = TraceID()\ntrace_id_extn.init_app(app)\n\n# retrieve the current trace ID\ntrace_id = trace_id_extn.current_trace_id\n```\n\n## Properties\n\nTraceID.**current_trace_id**\n\nIf the application is serving a request, and the value in the request header `X-Trace-ID` is present and is a valid trace ID, then returns the header value.\n\nIf the application is serving a request, and the request header `X-Trace-ID` is absent or contains an invalid trace ID, returns a new trace ID. A new trace ID generated this way will be the same for all calls to **current_trace_id** for a given request.\n\nIf the application is not serving a request, returns `N/A`.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Tracability for HMLR applications",
"version": "0.9.9",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bdaf9603268f1190da89f83b753caad3df2a35ec7c4dc51263ac4d23c857cd6e",
"md5": "299d709734dabf4d3c0a59ef4f6ff4b7",
"sha256": "84960f02886594af9fe2e3b5a097abd1df78506d79c83c77a13ec9216350789f"
},
"downloads": -1,
"filename": "landregistry_trace_id-0.9.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "299d709734dabf4d3c0a59ef4f6ff4b7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 2880,
"upload_time": "2024-10-31T13:55:04",
"upload_time_iso_8601": "2024-10-31T13:55:04.197681Z",
"url": "https://files.pythonhosted.org/packages/bd/af/9603268f1190da89f83b753caad3df2a35ec7c4dc51263ac4d23c857cd6e/landregistry_trace_id-0.9.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "229812249383d4092f3d5e3ba120bb53a36ed5ea63a1d1dc1582e251327fc134",
"md5": "5608b06669d9475f74ab4ccc54bc0a9e",
"sha256": "bdd68f792d824c9fe8e914e7cf3ee8f5a435db0ad871124624a69b6eea6c276d"
},
"downloads": -1,
"filename": "landregistry_trace_id-0.9.9.tar.gz",
"has_sig": false,
"md5_digest": "5608b06669d9475f74ab4ccc54bc0a9e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 2534,
"upload_time": "2024-10-31T13:55:06",
"upload_time_iso_8601": "2024-10-31T13:55:06.261970Z",
"url": "https://files.pythonhosted.org/packages/22/98/12249383d4092f3d5e3ba120bb53a36ed5ea63a1d1dc1582e251327fc134/landregistry_trace_id-0.9.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-31 13:55:06",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "landregistry-trace-id"
}