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 picks the wheel for the local OS and CPU. One wheel covers Python 3.10, 3.11, 3.12, and later on that platform.

You can also download a wheel from the GitHub Release.

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

The examples below use the Linux x86_64 filename. Substitute the file that matches the local platform.

pip:

pip install greptimedb_ingester-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl

uv:

uv add greptimedb_ingester-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl

To install into an existing virtual environment:

uv pip install greptimedb_ingester-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl

Put the wheel path in requirements.txt:

./greptimedb_ingester-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl

Then:

pip install -r requirements.txt

or:

uv pip install -r requirements.txt

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.0

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.0
File Actions
greptimedb_ingester-0.1.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for greptimedb_ingester-0.1.0-cp310-abi3-win_amd64.whl
greptimedb_ingester-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for greptimedb_ingester-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl
greptimedb_ingester-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for greptimedb_ingester-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl
greptimedb_ingester-0.1.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for greptimedb_ingester-0.1.0-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 13.4 MB

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

Download URL greptimedb_ingester-0.1.0-cp310-abi3-win_amd64.whl
Size 2.8 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1e48ed63fdf2ed574366ee3ba61d66ba0f2076c6f9823bb00a543d98fa8df5cd
BLAKE2b-256 checksum
How to use checksums
17ffc99d533298541d5e13817f0bdc7b8b8a2a997dc7d93fbb9b98715f0c8c6b
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.0-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL greptimedb_ingester-0.1.0-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
7c02b02125810caf9b1f1f4ed0826174a9ea7c67a356c09cb552f539455cdf2c
BLAKE2b-256 checksum
How to use checksums
e2499296f722bfa53ad5b9fe75ed1f12d707ca4c05788fa195077f778102c2e3
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.0-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL greptimedb_ingester-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl
Size 3.6 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
670db5a22cfe43477fd02a3804a6582679793c7bc2294bd3381ae5d2dcc69843
BLAKE2b-256 checksum
How to use checksums
ff8f1c93bad218dd253775ea7a9c5db696b650dea9d61ab755f6493d0e02e4b9
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.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL greptimedb_ingester-0.1.0-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
2f935c798611bd1892bf58ffd50a52dc02da8f3ec22ff1767ae94fdf90217ba3
BLAKE2b-256 checksum
How to use checksums
11e7c5a7080712c73a54e265a09440c8df6384f2858e4f14b9c66f7e7fde0ea9
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.0

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