Skip to main content

Official Python client SDK for the Dojo API

Project description

DojoSDK

Official Python client SDK for the Dojo API.

Installation

pip install dojosdk

Quick Start

import dojo

client = dojo.Dojo(api_key="your-api-key")
ticker = client.market_data.get_ticker(exchange="BINANCE", bz_type="spot", symbol="BTCUSDT")
print(ticker)

Environment Variables

When integrating DojoSDK with Hugging Face Datasets (e.g., for automated data syncing or pushing records), you need to configure the following environment variable to authenticate with Hugging Face:

Environment Variable Description Required
HF_TOKEN Hugging Face User Access Token. Requires "Write" permissions to push data to remote repositories. Yes (when using huggingface_hub to push without CLI login)

Setup Example:

export HF_TOKEN="hf_your_access_token_here"

Alternatively, you can skip configuring this variable if your environment is already authenticated locally via huggingface-cli login.

Hugging Face Cache Management

DojoSDK automatically caches offline data downloaded from Hugging Face. To free up disk space by deleting older revisions and keeping only the latest version of the cached data, use the cleanup_cache method:

from dojo.datasource.huggingface import HuggingFaceDataSource

ds = HuggingFaceDataSource()
result = ds.cleanup_cache()

# Expected output format:
# {'freed_space': '3.0GB', 'details': {'AlphaDojo/dojo_stock_kline': '772.9M', ...}, 'message': 'Cache cleanup complete.'}
print(result)

Project details


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.

dojosdk-0.1.1-py3-none-any.whl (48.5 kB view details)

Uploaded Python 3

File details

Details for the file dojosdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dojosdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 48.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for dojosdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d54aae4200f9531fd8e5a65238ae8d1f602a56aa70248331c1495a6dc79c0248
MD5 a01c7049547b326c810390b711fd946e
BLAKE2b-256 05bf1729efedf04211b165839e5e8ef28182855dfc352d6a3bd79f0133ad6e6e

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