Skip to main content

Python client library for ZettaBlock AI Network

Project description

Python client for ZettaBlock AI Network.

Development

Setup

Install locally

  1. Clone the repository.
  2. Create a virtual environment and install the package.
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

GRPC

The client import zetta-grpc-protos as an external repo, you will need to provide your github username and password to install

# using below command to store and skip the repeatly input username / password
git config credential.helper store

For two phase authentication enabled account, password is private-access-token.

IDE setup

for PyCharm, you will need to run

pip install -e . 

to recognize the GRPC imported library correctly

Run the Client

Try run the client.

zetta --help

CICD

  1. the cicd is integrated with python 3.8 to 3.12 and on Ubuntu, MacOS and windows. make sure your PR passed all checks on all environment
  2. make sure some tests are added in the folder, cicd will run checks and test automatically
  3. if all tests passes, the version will be automatically boost and submit a newer version to PyPi
  4. If you want to include the comment in CHANGELOG.md, in Pull request, add ##Changelog in the comment

Examples of commands

datasets v2

upload parquets to create iceberg tables

zetta datasetsv2 create --namespace=ai-lake-test --dataset=imagenet-object-localization-challenge-dec03 --path=tests/data/

read and show datasets contents

% zetta datasetsv2 read --namespace=ai-lake-test --dataset=imagenet-object-localization-challenge-dec03 --limit=1
read ai-lake-test.imagenet-object-localization-challenge-dec03 limit = 1
                              id                                         image_data
0  ILSVRC2012_test_00090558.JPEG  b'/9j/4AAQSkZJRgABAQEASABIAAD/4gJASUNDX1BST0ZJ...

save datasets to local parquets

zetta datasetsv2 save --namespace=ai-lake-test --dataset=imagenet-object-localization-challenge-dec03

datasetsv2 ls

% zetta datasetsv2 ls --id=ai-network-worker-demo_imagenet-object-localization-challenge-dec06-1
% zetta-py-client % zetta datasetsv2 ls                                                                           

databasesv2

% zetta databasesv2 ls --database=testdb
% zetta databasesv2 ls                  

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zetta-0.0.101-py3-none-any.whl (39.4 kB view details)

Uploaded Python 3

File details

Details for the file zetta-0.0.101-py3-none-any.whl.

File metadata

  • Download URL: zetta-0.0.101-py3-none-any.whl
  • Upload date:
  • Size: 39.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for zetta-0.0.101-py3-none-any.whl
Algorithm Hash digest
SHA256 c891091dde6584d21b794345120dd3babcb34b8f1da225fa99662704bcf73bbe
MD5 934375a89d183bb9bf72da173614b57f
BLAKE2b-256 b19536b67121ddf45215820140d32fdbd04552830c3bb54c24375aa7afd2334b

See more details on using hashes here.

Supported by

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