Skip to main content

RTB House SDK

Overview

This library provides an easy-to-use Python interface to RTB House API. It allows you to read and manage you campaigns settings, browse offers, download statistics etc.

Installation

RTB House SDK can be installed with pip:

$ pip install rtbhouse_sdk

Usage example

Let’s write a script which fetches campaign stats (imps, clicks, postclicks) and shows the result as a table (using tabulate library).

First, create config.py file with your credentials:

USERNAME = 'jdoe'
PASSWORD = 'abcd1234'

Set up virtualenv and install requirements:

$ pip install rtbhouse_sdk tabulate
from operator import itemgetter

from tabulate import tabulate

from config import USERNAME, PASSWORD
from rtbhouse_sdk.reports_api import ReportsApiSession

if __name__ == '__main__':
    api = ReportsApiSession(USERNAME, PASSWORD)
    advertisers = api.get_advertisers()
    stats = api.get_campaign_stats_total(advertisers[0]['hash'], '2017-10-01', '2017-10-31', 'day')
    columns = ['day', 'impsCount', 'clicksCount', 'ctr', 'campaignCost', 'conversionsCount', 'conversionsRate', 'cpc', 'ecc', 'roas', 'conversionsValue']
    data_frame = [[row[c] for c in columns] for row in reversed(sorted(stats, key=itemgetter('day')))]
    print(tabulate(data_frame, headers=columns))

License

MIT

Metadata

Release files for rtbhouse-sdk 3.1.1

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

Source distribution (sdist)

Source distribution for rtbhouse-sdk 3.1.1
File Size Uploaded Provenance
rtbhouse_sdk-3.1.1.tar.gz 3.4 kB Without provenance Details

Release files / rtbhouse_sdk-3.1.1.tar.gz

Download URL rtbhouse_sdk-3.1.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0a988dd90ce95f439a4ea4ebfb843d2a7f85aa81230bfe9eedabc9cfc7b661b1
BLAKE2b-256 checksum
How to use checksums
1bbf2217155eae1a9ca0fa50b13c0bbc212cfc2240deb896f9f7e5b7a7133a23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Security for rtbhouse-sdk 3.1.1

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.

Release history Release notifications | RSS feed

This release

3.1.1 This release

1 release file No provenance

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