
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
A lightweight Python logging SDK that provides structured logging for Flask and FastAPI applications. This new version uses a custom implementation without OpenTelemetry dependencies.
pip
pip install sift-dev-logger
With optional Flask support:
pip install "sift-dev-logger[flask]"
With optional FastAPI support:
pip install "sift-dev-logger[fastapi]"
With all optional dependencies:
pip install "sift-dev-logger[all]"
Configure the logger via environment variables:
# Required for sending logs to a custom endpoint
export SIFT_DEV_ENDPOINT="https://your-log-endpoint.com/logs"
export SIFT_DEV_API_KEY="your-api-key"
# Optional configuration
export SIFT_DEV_SERVICE_NAME="your-service-name"
export SIFT_DEV_SERVICE_INSTANCE_ID="your-instance-id"
export ENV="production" # or development, staging, etc.
Or configure programmatically:
from sift_dev_logger import configure, SiftDevConfig
# Configure once at application startup
configure(SiftDevConfig(
service_name="my-service",
service_instance_id="instance-1",
endpoint="https://your-log-endpoint.com/logs",
api_key="your-api-key",
env="production",
batch_size=10, # Number of logs to batch before sending
batch_delay_millis=5000 # Maximum time to wait before sending a batch
))
from sift_dev_logger import getLogger
# Get a logger (automatically configured with SiftDevHandler)
logger = getLogger("my_module")
# Log messages with different severity levels
logger.info("This is an informational message")
logger.warning("This is a warning message")
logger.error("This is an error message")
# Log with additional context
logger.info("User logged in", extra={"user_id": "12345", "ip_address": "192.168.1.1"})
# Log with structured data
logger.info("API request completed", extra={
"request_id": "req-abc-123",
"duration_ms": 42,
"status_code": 200,
"user": {
"id": "user-123",
"role": "admin"
}
})
# Make sure all logs are flushed before application exit
from sift_dev_logger import flush_logs
flush_logs()
Install build tools:
pip install build
Build the package:
python -m build
Test the package locally:
pip install sift_dev_logger-0.1.0.tar.gz
Upload to PyPI (you'll need to create an account first):
python -m twine upload dist/*
hatchling
for a clean, modern build.FAQs
A logging SDK for Sift Dev that supports Flask and FastAPI
We found that sift-dev-logger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.