Skip to main content

Logship – Python Logging Client for Elasticsearch

Logship 是一个轻量级、可扩展的 Python 日志上报客户端,用于将结构化日志批量、异步推送到 Elasticsearch。

Features

  • 异步发送
  • 批量缓冲
  • 自动重试
  • 支持 Basic Auth
  • 自动创建索引(可选)
  • 最小依赖

Installation

pip install logship-client

Quick Start

from logship import LogshipClient

client = LogshipClient(
    base_url="https://your-es-server.com",
    index_prefix="logship",
    username="elastic",
    password="your_password",
    app_name="order-service",
    env="prod",
)

client.info("用户登录成功", user_id=123)

Advanced Usage

client.debug("查询订单", order_id=9981, cost_ms=12)
client.error("订单支付失败", order_id=9981, code="PAY_TIMEOUT")

Directory Structure

logship/
├── es_logger
│   ├── __init__.py
│   ├── config.py
│   ├── handler.py
│   └── setup.py
├── README.md
├── pyproject.toml
└── LICENSE

License

MIT License

Metadata

Release files for logship-client 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for logship-client 0.1.1
File Size Uploaded Provenance
logship_client-0.1.1.tar.gz 5.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for logship-client 0.1.1
File Interpreter ABI Platform
logship_client-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / logship_client-0.1.1.tar.gz

Download URL logship_client-0.1.1.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e9b18df49a9879c729ac676f6412de671ece9603e93ca00fe91f24a708ff2573
BLAKE2b-256 checksum
How to use checksums
8d8910ede66e8dd319f01373d7e8c811ca99e8d96509f49640d57cd8fa0fd13b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / logship_client-0.1.1-py3-none-any.whl

Download URL logship_client-0.1.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
578cbf016fd3a507770340f844b7c40bed848e28dbfafb97d787c1d5e8158ae7
BLAKE2b-256 checksum
How to use checksums
a521cf4d7699f6acc8bbbdc85906ecf3620cc229f665a026fd882c8c5563490d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for logship-client 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page