Skip to content

Repository files navigation




Connect any data source, combine them in real-time and instantly get low-latency gRPC and REST APIs.
⚡ All with just a simple configuration! ⚡️


CICoverage StatusDocsJoin on DiscordLicense


Overview

This repository is a python wrapper over gRPC APIs that are automatically when you run Dozer.

Installation

poetry add git+ssh://git@github.com:getdozer/dozer-python.git#main
# or 
pip install pydozer

Dependencies

Querying

Intialize Users Endpoint

api_client=ApiClient("users")
api_client.query()
# Query using $limit, $order_by, $filterapi_client.query({"$limit": 1})
#Countapi_client.count()

gRPC methods

api_client.describe()
#Healthapi_client.health()

Ingestion

Initialize Ingestion Client

from dozer.ingest import IngestClient
ingestion_client = IngestClient()

Ingest a data frame

df=pl.read_parquet('tests/trips_small.parquet')
ingestion_client.ingest_df('trips', df, seq_no=1)

Use Arrow Format for ingestion

ingestion_client.ingest_df_arrow('trips', df, seq_no=1)

Ingest raw records

frompydozer.ingest_pb2importIngestRequestfrompydozer.types_pb2importRecord, Valueuser=IngestRequest(
schema_name="users",
typ=0,
old=None,
new=[Value(int_value=1), Value(string_value="vivek")],
seq_no=1
)
ingestor.ingest(user)

Ingest in Arrow format

Check out our Docs for more information.

Testing

pytest

Contributing

Please refer to Contributing for more details.

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages