Skip to main content

greptimedb-ingester

中文

Python write client for GreptimeDB, binding greptimedb-ingester 0.19.0. Python 3.10 and later. Calls are synchronous.

  • Client.insert: gRPC row writes. If the table does not exist, GreptimeDB creates it from the schema in the request.
  • Client.bulk_writer: Arrow Flight bulk writes. The table must already exist.

The client connects to the gRPC port, 127.0.0.1:4001 by default.

See docs/usage.md for the full guide and docs/api.md for the API reference.

Install

pip:

pip install greptimedb-ingester

uv:

uv add greptimedb-ingester

requirements.txt:

greptimedb-ingester
pip install -r requirements.txt

or:

uv pip install -r requirements.txt

The installer downloads the wheel for the local OS and CPU. One wheel covers Python 3.10, 3.11, 3.12, and later on that platform. You do not download a wheel yourself.

Supported architectures:

  • Linux x86_64, glibc 2.28 or later
  • Linux aarch64, glibc 2.28 or later
  • Windows x64
  • macOS arm64 (Apple Silicon)

Published wheels:

Platform wheel
Linux x86_64, glibc 2.28 or later greptimedb_ingester-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl
Linux aarch64, glibc 2.28 or later greptimedb_ingester-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl
Windows x64 greptimedb_ingester-0.1.0-cp310-abi3-win_amd64.whl
macOS Apple Silicon greptimedb_ingester-0.1.0-cp310-abi3-macosx_11_0_arm64.whl

Building from source requires Rust 1.85 or later:

pip install maturin
maturin build --release
pip install dist/greptimedb_ingester-*.whl

Write

from datetime import datetime, timezone

from greptimedb_ingester import Client, Column, ColumnDataType, SemanticType

client = Client(["127.0.0.1:4001"], database="public")

affected = client.insert(
    "sensor_data",
    columns=[
        Column("device_id", ColumnDataType.STRING, SemanticType.TAG),
        Column("ts", ColumnDataType.TIMESTAMP_MILLISECOND, SemanticType.TIMESTAMP),
        Column("temperature", ColumnDataType.FLOAT64, SemanticType.FIELD),
    ],
    rows=[
        ["device_001", datetime(2009, 2, 13, 23, 31, 30, tzinfo=timezone.utc), 23.5],
        {"device_id": "device_002", "ts": 1_234_567_890_001, "temperature": 24.0},
    ],
)
print(affected)

If sensor_data does not exist, this insert creates it. examples/insert_example.py also writes into a table that already exists. Bulk writes are in examples/bulk_example.py; the table must already exist.

Development

uv python pin 3.10
uv sync --group dev
uv run maturin develop
uv run pytest

pytest checks value conversion only. It does not connect to GreptimeDB.

Metadata

Release files for greptimedb-ingester 0.1.1

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

Built distributions (wheels)

Table of built distributions (wheels) for greptimedb-ingester 0.1.1
File Actions
greptimedb_ingester-0.1.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for greptimedb_ingester-0.1.1-cp310-abi3-win_amd64.whl
greptimedb_ingester-0.1.1-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for greptimedb_ingester-0.1.1-cp310-abi3-manylinux_2_28_x86_64.whl
greptimedb_ingester-0.1.1-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for greptimedb_ingester-0.1.1-cp310-abi3-manylinux_2_28_aarch64.whl
greptimedb_ingester-0.1.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for greptimedb_ingester-0.1.1-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 13.4 MB

Release files / greptimedb_ingester-0.1.1-cp310-abi3-win_amd64.whl

Download URL greptimedb_ingester-0.1.1-cp310-abi3-win_amd64.whl
Size 2.8 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f29e2bba7e4daa91b8045e1d87f47eb75f518f9a9f8b2554f3638048c71da13e
BLAKE2b-256 checksum
How to use checksums
a6c0ea1e2b9b6ca06b12041ebaa855d474b8f132af8ebf255486081fe2b14d04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / greptimedb_ingester-0.1.1-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL greptimedb_ingester-0.1.1-cp310-abi3-manylinux_2_28_x86_64.whl
Size 3.8 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
185c6e46d18205609f3be426ecdb9e227c077a1ad1a1316e729c848f3eecb68e
BLAKE2b-256 checksum
How to use checksums
f1cd55b828d11c1955d1c09ca3a978138ee2ed6c1d53840c634e396ab8b598ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / greptimedb_ingester-0.1.1-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL greptimedb_ingester-0.1.1-cp310-abi3-manylinux_2_28_aarch64.whl
Size 3.7 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
3bd1817e84e2b96256428fa8cdcd879462da6c89c7fff8acf66a1fd8c9c91c32
BLAKE2b-256 checksum
How to use checksums
aa6b6340952187ee949765e4b1562edee9186389d87f690a4f49d8e31aa951c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / greptimedb_ingester-0.1.1-cp310-abi3-macosx_11_0_arm64.whl

Download URL greptimedb_ingester-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
Size 3.0 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1c748435dfb630a0ab2af715f2d0002897fd5ca47a0f408fa8199af1e08bfdbf
BLAKE2b-256 checksum
How to use checksums
dbcad09fe4851986cedfeb990de423d07ea083997750ddbdf50d6a45cd57de4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for greptimedb-ingester 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.

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