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
Metadata
Release files for bitllama 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bitllama-1.0.1.tar.gz | 6.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bitllama-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.1 kB
Release files / bitllama-1.0.1.tar.gz
| Download URL | bitllama-1.0.1.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e02c2adf96c70ff7c48461d66fe098fe8b93e1698b0ae7856004da0cc572f76
|
|
BLAKE2b-256 checksum How to use checksums |
958490ac27feb30f5e323952d114aa0f7ab0f8882d0be8f8770af5463de1dc82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|
Release files / bitllama-1.0.1-py3-none-any.whl
| Download URL | bitllama-1.0.1-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
481cf7779b3c29cdb6015d140eec28b2f9962ac51a4742adb9018ada1cb945ee
|
|
BLAKE2b-256 checksum How to use checksums |
d090bc09978be084fd4094498bbcebf98a66008f096cf63f65927b890481ed3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|