Skip to main content

greptimedb-ingester

中文

Synchronous Python write client for GreptimeDB. Python 3.10+.

Install

uv add "greptimedb-ingester[postgres]"       # PostgreSQL COPY
uv add "greptimedb-ingester[grpc]"           # gRPC
uv add "greptimedb-ingester[grpc,postgres]"  # Both

Or use pip install with the same requirements. In requirements.txt, omit quotes. Choose at least one backend. [postgres] uses psycopg2 without the Rust SDK.

PostgreSQL COPY

from greptimedb_ingester import Column, ColumnDataType as D, SemanticType as S
from greptimedb_ingester.postgres import Client

columns = [
    Column("host", D.STRING, S.TAG),
    Column("ts", D.TIMESTAMP_MILLISECOND, S.TIMESTAMP),
    Column("reading", D.FLOAT64, S.FIELD),
]
with Client(["127.0.0.1:4003"], batch_size=5000) as client:
    affected = client.insert("sensor_data", columns, [
        ["edge", 1793066400000, 23.5],
    ])
print(affected)

insert creates missing tables and writes COPY batches (default: 10,000 rows). Batches commit separately. The server must support COPY FROM STDIN. See the PG getting started guide and COPY example.

gRPC

from greptimedb_ingester.grpc import Client

client = Client(["127.0.0.1:4001"], database="public")
# client.insert(table, columns, rows)

Supports insert, delete, and bulk_writer. See usage and examples. Import Client from the backend you use. Import shared schema types from greptimedb_ingester.

Development

uv sync --python 3.10 --locked --extra postgres
uv run --extra postgres pytest

For both backends, use --all-extras instead of --extra postgres (requires Rust 1.85+). See the CI workflow for integration tests and publishing.

Metadata

Release files for greptimedb-ingester 0.1.2

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

Source distribution (sdist)

Source distribution for greptimedb-ingester 0.1.2
File Size Uploaded Provenance Actions
greptimedb_ingester-0.1.2.tar.gz 39.3 kB Without provenance Details for greptimedb_ingester-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for greptimedb-ingester 0.1.2
File Interpreter ABI Platform Actions
greptimedb_ingester-0.1.2-py3-none-any.whl Python 3 none any Details for greptimedb_ingester-0.1.2-py3-none-any.whl

Total release size: 53.2 kB

Release files / greptimedb_ingester-0.1.2.tar.gz

Download URL greptimedb_ingester-0.1.2.tar.gz
Size 39.3 kB
Tags Source
SHA-256 checksum
How to use checksums
75d91a94d3dfd688a3c94ac7bd43a5325bf85d33a2151fe7956d3bf04171029c
BLAKE2b-256 checksum
How to use checksums
e288ddca64cfb4cdccc14fffbbe0982fc56748e08629bfdb1606b13d8478c0a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / greptimedb_ingester-0.1.2-py3-none-any.whl

Download URL greptimedb_ingester-0.1.2-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a55ccdd8945048109d9e6ccaeb816e0d90961615c5020c8b9d9741296e2b895a
BLAKE2b-256 checksum
How to use checksums
c70c6d96db64474dfe4f0a3ad63d3ded3d50c45c6a5d33a0d2fe940565671d17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for greptimedb-ingester 0.1.2

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.

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