Skip to main content

Python SDK for BitLlama Protocol

Project description

BitLlama Python SDK

BitLlama Logo

Official Python SDK for the BitLlama Protocol

Installation

pip install bitllama

Quick Start

from bitllama import BitLlama, MiningClient
import asyncio

async def main():
    # Initialize client
    client = BitLlama(
        coordinator_url="https://api.bitllama.ai",
        private_key="your_private_key",
        network="base-mainnet"
    )
    
    # Create inference request
    response = await client.i
    nference.create(
        model="llama3:70b",
        prompt="Explain quantum computing",
        max_tokens=500
    )
    print(response.text)

asyncio.run(main())

Mining

# Initialize mining client
miner = MiningClient(
    client=client,
    model_provider="ollama",
    model_name="llama3:70b"
)

# Start mining
await miner.start()

# Check status
status = await miner.get_status()
print(f"Jobs completed: {status.jobs_completed}")
print(f"Earnings: {status.total_earnings} BLMA")

# Stop mining
await miner.stop()

Documentation

Full documentation available at https://docs.bitllama.ai/python-sdk

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

bitllama-1.0.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

bitllama-1.0.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file bitllama-1.0.0.tar.gz.

File metadata

  • Download URL: bitllama-1.0.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for bitllama-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d1318104be3f3435256de00715375c31acf821c19e4d322df3fa67b53634a586
MD5 038936cc22c2a8b94772b0534eaaf8f9
BLAKE2b-256 4260548bf3a65701f23b867cc937d8547a741cbf3d50524de8d825ca1e09f731

See more details on using hashes here.

File details

Details for the file bitllama-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: bitllama-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for bitllama-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 379a0a93183a8c7a2e35ab03961a0b26209e3895d7ff07f4506caa4e4a72419a
MD5 83173adf022a1825c6fba95ba871c333
BLAKE2b-256 f4b30a2000115fba209ea67a3b2f9487b53540877b383deb3cbd34ef90ff7f92

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