Name | sift-dev-logger JSON |
Version |
1.0.7
JSON |
| download |
home_page | None |
Summary | A logging SDK for Sift Dev that supports Flask and FastAPI |
upload_time | 2025-02-23 03:07:30 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | None |
keywords |
dev
fastapi
flask
logging
sift
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# SIFT dev-logger
A Python logging SDK that provides structured logging for Flask and FastAPI applications.
---
## Installation
### Using `pip`
```bash
pip install sift-dev-logger
```
**With optional Flask support:**
```bash
pip install "sift-dev-logger[flask]"
```
**With optional FastAPI support:**
```bash
pip install "sift-dev-logger[fastapi]"
```
**With all library support:**
```bash
pip install "sift-dev-logger[all]"
```
---
## Usage
### Flask Application
```python
from flask import Flask
from sift_dev_logger.config import SiftDevConfig, configure
from sift_dev_logger.flask import instrument_logging_middleware
app = Flask(__name__)
# Configure the SDK
config = SiftDevConfig(
service_name="my-flask-app",
service_instance="my-instance",
sift_dev_logging_project_key="my-project-key"
)
configure(config)
# Add logging middleware
instrument_logging_middleware(app)
```
### FastAPI Application
```python
from fastapi import FastAPI
from sift_dev_logger.config import SiftDevConfig, configure
from sift_dev_logger.fastapi import instrument_logging_middleware
app = FastAPI()
# Configure the SDK
config = SiftDevConfig(
service_name="my-fastapi-app",
service_instance="my-instance",
sift_dev_logging_project_key="my-project-key"
)
configure(config)
# Add logging middleware
instrument_logging_middleware(app)
```
---
## How to build and publish
1. **Install build tools**:
```bash
pip install build
```
2. **Build the package**:
```bash
python -m build
```
3. **Test the package locally**:
```bash
pip install sift_dev_logger-0.1.0.tar.gz
```
4. **Upload to PyPI** (you’ll need to create an account first):
```bash
python -m twine upload dist/*
```
---
## Key Features
1. **Optional Dependencies**: Users can install just what they need (core, Flask, or FastAPI support).
2. **Modern Build System**: Uses `hatchling` for a clean, modern build.
3. **Clear Documentation**: README shows installation and basic usage.
4. **Version Management**: Easy to update version in one place.
5. **Development Tooling**: Development dependencies separated from runtime requirements.
---
Raw data
{
"_id": null,
"home_page": null,
"name": "sift-dev-logger",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "dev, fastapi, flask, logging, sift",
"author": null,
"author_email": "Sift Dev <support@trysift.dev>",
"download_url": "https://files.pythonhosted.org/packages/af/a9/5a36e88ecb98fa3ea825a0ccabf68edb01a4edbe880c04dd0997f7d28cfd/sift_dev_logger-1.0.7.tar.gz",
"platform": null,
"description": "# SIFT dev-logger\n\nA Python logging SDK that provides structured logging for Flask and FastAPI applications.\n\n---\n\n## Installation\n\n### Using `pip`\n\n```bash\npip install sift-dev-logger\n```\n\n**With optional Flask support:**\n\n```bash\npip install \"sift-dev-logger[flask]\"\n```\n\n**With optional FastAPI support:**\n\n```bash\npip install \"sift-dev-logger[fastapi]\"\n```\n\n**With all library support:**\n\n```bash\npip install \"sift-dev-logger[all]\"\n```\n\n---\n\n## Usage\n\n### Flask Application\n\n```python\nfrom flask import Flask\nfrom sift_dev_logger.config import SiftDevConfig, configure\nfrom sift_dev_logger.flask import instrument_logging_middleware\n\napp = Flask(__name__)\n\n# Configure the SDK\nconfig = SiftDevConfig(\n service_name=\"my-flask-app\",\n service_instance=\"my-instance\",\n sift_dev_logging_project_key=\"my-project-key\"\n)\nconfigure(config)\n\n# Add logging middleware\ninstrument_logging_middleware(app)\n```\n\n### FastAPI Application\n\n```python\nfrom fastapi import FastAPI\nfrom sift_dev_logger.config import SiftDevConfig, configure\nfrom sift_dev_logger.fastapi import instrument_logging_middleware\n\napp = FastAPI()\n\n# Configure the SDK\nconfig = SiftDevConfig(\n service_name=\"my-fastapi-app\",\n service_instance=\"my-instance\",\n sift_dev_logging_project_key=\"my-project-key\"\n)\nconfigure(config)\n\n# Add logging middleware\ninstrument_logging_middleware(app)\n```\n\n---\n\n## How to build and publish\n\n1. **Install build tools**:\n\n ```bash\n pip install build\n ```\n\n2. **Build the package**:\n\n ```bash\n python -m build\n ```\n\n3. **Test the package locally**:\n\n ```bash\n pip install sift_dev_logger-0.1.0.tar.gz\n ```\n\n4. **Upload to PyPI** (you\u2019ll need to create an account first):\n\n ```bash\n python -m twine upload dist/*\n ```\n\n---\n\n## Key Features\n\n1. **Optional Dependencies**: Users can install just what they need (core, Flask, or FastAPI support). \n2. **Modern Build System**: Uses `hatchling` for a clean, modern build. \n3. **Clear Documentation**: README shows installation and basic usage. \n4. **Version Management**: Easy to update version in one place. \n5. **Development Tooling**: Development dependencies separated from runtime requirements.\n\n---",
"bugtrack_url": null,
"license": null,
"summary": "A logging SDK for Sift Dev that supports Flask and FastAPI",
"version": "1.0.7",
"project_urls": {
"Documentation": "https://github.com/sift-dev/python-sdk/tree/main/sift_dev_logger/README.md",
"Homepage": "https://github.com/sift-dev/python-sdk/",
"Repository": "https://github.com/sift-dev/python-sdk.git"
},
"split_keywords": [
"dev",
" fastapi",
" flask",
" logging",
" sift"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9e6a8c9d21d5a2528eb37aacc17f4681af7bf27989334c744dd35434bc162ab7",
"md5": "ef1ac4ab36dbd5551bf1551855ed21b3",
"sha256": "262e31ee8ecea0363bb3d318671c36373600a502d9c0b9e1759ecba6661c7807"
},
"downloads": -1,
"filename": "sift_dev_logger-1.0.7-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "ef1ac4ab36dbd5551bf1551855ed21b3",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 11048,
"upload_time": "2025-02-23T03:07:28",
"upload_time_iso_8601": "2025-02-23T03:07:28.353493Z",
"url": "https://files.pythonhosted.org/packages/9e/6a/8c9d21d5a2528eb37aacc17f4681af7bf27989334c744dd35434bc162ab7/sift_dev_logger-1.0.7-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "afa95a36e88ecb98fa3ea825a0ccabf68edb01a4edbe880c04dd0997f7d28cfd",
"md5": "bfbb8fbe174f4a0f91e4126de89a9e98",
"sha256": "73ae3bc89a89681e6f92a627fe8c350093000781b586fbbc5e7723abe5c8746e"
},
"downloads": -1,
"filename": "sift_dev_logger-1.0.7.tar.gz",
"has_sig": false,
"md5_digest": "bfbb8fbe174f4a0f91e4126de89a9e98",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14306,
"upload_time": "2025-02-23T03:07:30",
"upload_time_iso_8601": "2025-02-23T03:07:30.037584Z",
"url": "https://files.pythonhosted.org/packages/af/a9/5a36e88ecb98fa3ea825a0ccabf68edb01a4edbe880c04dd0997f7d28cfd/sift_dev_logger-1.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-23 03:07:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sift-dev",
"github_project": "python-sdk",
"github_not_found": true,
"lcname": "sift-dev-logger"
}