Arcane bing
This package is based on bingads.
Get Started
pip install arcane-bing
Example Usage
Reporting
bing_client = Client(
credentials=Config.BING_ADS_CREDENTIALS,
secrets_bucket=Config.SECRETS_BUCKET,
refresh_token_location=Config.BING_ADS_REFRESH_TOKEN,
storage_client=storage_client
)
reporting_service_manager, reporting_service = bing_client.get_bing_ads_api_client()
report_request = build_campaigns_report(reporting_service, bing_account_id)
result_file_path = bing_client.submit_and_download(report_request, reporting_service_manager)
Campaign Service
⚠️ For some API methods, you must provide the client's account id and the manager's customer id
from arcane.bing import Client
from arcane.bing.helpers import parse_webfault_errors, parse_bing_response
bing_client = Client(
credentials=Config.BING_ADS_CREDENTIALS,
secrets_bucket=Config.SECRETS_BUCKET,
refresh_token_location=Config.BING_ADS_REFRESH_TOKEN,
storage_client=storage_client,
customer_id=CUSTOMER_ID,
account_id=ACCOUNT_ID
)
campaign_service = bing_client.get_service_client(service_name='CampaignManagement')
try:
response = campaign_service.GetCampaignsByAccountId(AccountId=ACCOUNT_ID)
all_campaigns = parse_bing_response(response)['Campaign']
# do stuff with all_campaigns
except WebFault as e:
bing_error = parse_webfault_errors(e)
# do stuff with bing_error
Release files for arcane-bing 0.5.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| arcane_bing-0.5.9.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arcane_bing-0.5.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.7 kB
Release files / arcane_bing-0.5.9.tar.gz
| Download URL | arcane_bing-0.5.9.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a13930dfecef9057b6be24ccd5566607525e62df713f6df0cf7f6f15b441835
|
|
BLAKE2b-256 checksum How to use checksums |
d621706429c63074c90fcc5b633e312a9c9b3604f5f1282cc53c90ecb85956de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.3 CPython/3.12.14 Linux/6.17.0-1022-azure
|
Release files / arcane_bing-0.5.9-py3-none-any.whl
| Download URL | arcane_bing-0.5.9-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28b1b943964afdc83169c71514ff3b2f64f6e5d98b338537b2adec954c08198b
|
|
BLAKE2b-256 checksum How to use checksums |
965344b6d0c8648487bd2ff4ee5ee7e27ac62390180c2c1e25cec498721d0f94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.3 CPython/3.12.14 Linux/6.17.0-1022-azure
|