Skip to main content

Python wrapper for the Dozer API

Project description


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


CI Coverage Status Docs Join on Discord License


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, $filter
api_client.query({"$limit": 1})

#Count
api_client.count()

gRPC methods

api_client.describe()

#Health
api_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

from pydozer.ingest_pb2 import IngestRequest
from pydozer.types_pb2 import Record, Value

user = 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydozer-0.2.1.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

pydozer-0.2.1-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file pydozer-0.2.1.tar.gz.

File metadata

  • Download URL: pydozer-0.2.1.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.6 Darwin/23.0.0

File hashes

Hashes for pydozer-0.2.1.tar.gz
Algorithm Hash digest
SHA256 563fa20b11b71981cec52f1860354071820fb06fd222f96c2ee03180fe00818b
MD5 16aa25e3efd1321bcdabc89e1d644217
BLAKE2b-256 450e1583d9c12aa6ea9863f29ff7ce6151875b9561b6459ea77500ab48222d08

See more details on using hashes here.

File details

Details for the file pydozer-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pydozer-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.6 Darwin/23.0.0

File hashes

Hashes for pydozer-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3e5560b8ebfcbf3aa23b27095cfc031ad7f77eb7bf19c1ffe210e1a0e714c9b
MD5 f3a05b93a4f5f94dd46e78e3f02c07ef
BLAKE2b-256 8891d412e73ed25c82c876aa3fe8a9dec00528ddd7fa3fb58532320b5378e180

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page