Skip to main content

BitAds Client Library

BitAds Logo

🚀 Overview

BitAds Client is an asynchronous Python client for interacting with the BitAds.ai API. It allows users to integrate with the BitAds network to retrieve campaign details, validate miners, and interact with the BitAds infrastructure.

📦 Installation

Install the package using pip:

pip install bitads-client

🔧 Configuration

Importing the Client

from bitads_client.client.impl import AsyncBitAdsClient

Initializing the Client

client = AsyncBitAdsClient(
    base_url="https://prod-s.a.bitads.ai/api",
    hot_key="your-hot-key",
)

📡 API Usage

✅ Ping BitAds API

import asyncio

async def main():
    response = await client.ping()
    print(response)
    await client.close()

asyncio.run(main())

🔗 Generate Miner URL

async def main():
    response = await client.generate_miner_url("campaign_id")
    print(response.data)
    await client.close()

asyncio.run(main())

📊 Send Server Load Data

from bitads_client.schemas import SendServerLoadRequest

async def main():
    data = SendServerLoadRequest(
        timestamp="2024-06-08 19:33:07",
        hostname="server1",
        load_average={"1min": 3.5, "5min": 4.2, "15min": 4.0},
    )
    await client.send_server_load(data)
    await client.close()

asyncio.run(main())

📡 Send User IP Activity

from bitads_client.schemas import SendUserIpActivityRequest

async def main():
    data = SendUserIpActivityRequest(
        user_activity={
            "user1": [{"ip": "192.168.1.1", "date": "2024-06-08", "count": 5}]
        }
    )
    await client.send_user_ip_activity(data)
    await client.close()

asyncio.run(main())

✅ Running Tests

To run unit tests:

pytest tests/

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

📬 Contact

For issues, please open a GitHub issue or contact support at Discord.


🚀 Enjoy seamless integration with BitAds.ai!

Metadata

Release files for bitads-client 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bitads-client 0.1.4
File Size Uploaded Provenance Actions
bitads_client-0.1.4.tar.gz 6.5 kB Without provenance Details for bitads_client-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bitads-client 0.1.4
File Interpreter ABI Platform Actions
bitads_client-0.1.4-py3-none-any.whl Python 3 none any Details for bitads_client-0.1.4-py3-none-any.whl

Total release size: 13.3 kB

Release files / bitads_client-0.1.4.tar.gz

Download URL bitads_client-0.1.4.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
137c1993ee195af9dc7f709b1a01c5eb1cd95d08a518acc5f117c6bd8a0aa3aa
BLAKE2b-256 checksum
How to use checksums
13390648f1b999687571bf8c9e9bde2add2531ddae8033831f0aa891e70daa4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release files / bitads_client-0.1.4-py3-none-any.whl

Download URL bitads_client-0.1.4-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b455c5c6a90e669fd9d05ddbf803ac9b83dda247fbd3500fad349e9131f87389
BLAKE2b-256 checksum
How to use checksums
42203a9f88f24c54e34fed3669e25770a36c0a4819469c290cb092560d4f06af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Security for bitads-client 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page