BitLlama Python SDK
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
Links
- PyPI Package: https://pypi.org/project/bitllama/
- GitHub: https://github.com/samthedataman/bitllama/tree/main/packages/python-sdk
- Documentation: https://docs.bitllama.ai/python-sdk
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.1.tar.gz
(6.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bitllama-1.0.1.tar.gz.
File metadata
- Download URL: bitllama-1.0.1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e02c2adf96c70ff7c48461d66fe098fe8b93e1698b0ae7856004da0cc572f76
|
|
| MD5 |
9332704eee84a1ddbda4fa0665c1b837
|
|
| BLAKE2b-256 |
958490ac27feb30f5e323952d114aa0f7ab0f8882d0be8f8770af5463de1dc82
|
File details
Details for the file bitllama-1.0.1-py3-none-any.whl.
File metadata
- Download URL: bitllama-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
481cf7779b3c29cdb6015d140eec28b2f9962ac51a4742adb9018ada1cb945ee
|
|
| MD5 |
58769b3f2b4d14957edebac374be861c
|
|
| BLAKE2b-256 |
d090bc09978be084fd4094498bbcebf98a66008f096cf63f65927b890481ed3c
|