Registry / gcp / google-ads-admanager

google-ads-admanager

JSON →
library0.10.0pypiunverified

This is an official Python client library for interacting with the Google Ad Manager API. It provides a programmatic interface to manage ad campaigns, inventory, and other Ad Manager features. The current version is 0.9.0 and it is part of the broader `googleapis/google-cloud-python` monorepo, which typically sees frequent updates, though this specific client's release cadence appears less frequent.

pip install google-ads-admanager
INSTALL
IMPORT
SIG · GOOGLE-ADS-ADMANAG
G
google-ads-admanager
gcpenv0.10.0
Install
5.9s avg
Import
Disk
82MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 83.5MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 5.9s · import 0.000s · 81MB
82MB installed
● package 82MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NetworkServiceClient
from google.ads.admanager_v202311.services.network_service import NetworkServiceClient
from google.ads.admanager.services.network_service import NetworkServiceClient
The API version (e.g., `v202311`) is an explicit part of the import path and must be specified. This changes with new Ad Manager API releases.

This quickstart demonstrates how to instantiate the `NetworkServiceClient` and retrieve information about the current Ad Manager network. It assumes Application Default Credentials (ADC) are configured, typically via `GOOGLE_APPLICATION_CREDENTIALS` environment variable or `gcloud auth application-default login`.

import os from google.ads.admanager_v202311.services.network_service import NetworkServiceClient def get_admanager_network_info(): try: # Authenticate using Application Default Credentials (ADC). # Ensure GOOGLE_APPLICATION_CREDENTIALS env var is set or gcloud is configured. # For Ad Manager, ensure your credentials have the necessary Ad Manager scope. client = NetworkServiceClient() # Get the current network. network = client.get_current_network() print(f"Current Ad Manager Network:") print(f" Network Code: {network.network_code}") print(f" Display Name: {network.display_name}") print(f" Time Zone: {network.time_zone}") print(f" Primary Ad Exchange Id: {network.primary_ad_exchange_id}") except Exception as e: print(f"An error occurred: {e}") # Consider detailed error handling based on API response codes. if __name__ == '__main__': get_admanager_network_info()
Debug
Known issues
breakingThe Ad Manager API version is embedded directly into the Python import path (e.g., `admanager_v202311`). Upgrading the `google-ads-admanager` library might introduce a newer API version in the import path (e.g., `v202402`), requiring code changes even if the library's own major version (0.x.x) remains the same.
fix
Always check the specific API version directory (e.g., `google/ads/admanager_vYYYYMM/`) after an upgrade and update your import statements accordingly.
affects: All pre-1.0 versions
gotchaThis `google-ads-admanager` library is a distinct client for the Google Ad Manager API and should not be confused with the older `googleads-python-lib` (which also supported DFP/Ad Manager). They have different import paths, authentication methods, and underlying API interactions.
fix
Ensure you are using the correct library for your project. This library (from `google.ads.admanager_vYYYYMM`) follows a more 'Google Cloud'-like pattern, while the older library used `from googleads import dfp`.
affects: All versions
gotchaAs a pre-1.0 version (currently 0.9.0), the API stability is not guaranteed. Breaking changes in methods, object structures, or underlying API behavior can occur in minor or patch releases.
fix
Pin the library version (e.g., `google-ads-admanager==0.9.0`) and thoroughly test your application after any version upgrade before deploying to production.
affects: <1.0.0
gotchaWhile this library uses `google-auth` for authentication, connecting to the Ad Manager API typically requires specific OAuth 2.0 scopes (e.g., `https://www.googleapis.com/auth/dfp`) and an Ad Manager network ID. Ensure your service account or user credentials have been properly granted these scopes within Google Ad Manager.
fix
Verify that your Google Cloud Project's service account (or the user account for local development) has the necessary Ad Manager permissions and that the correct scopes are included when generating credentials if not using standard ADC with a sufficiently scoped service account.
affects: All versions
gotchaThe Google Ad Manager API is a SOAP-based API. While this Python library aims to abstract away the XML/SOAP complexity, understanding the underlying SOAP structures (e.g., WSDL definitions) can be helpful for advanced usage, debugging, or when implementing features not directly exposed by the client methods.
fix
Consult the official Google Ad Manager API documentation for details on service operations, object structures, and field definitions when facing complex API interactions or unexpected behavior.
affects: All versions
Upgrade
Version history
0.10.0latest on PyPI · released Jun 3, 2026
Audit
Dependencies
proto-plusrequiredRequired for protobuf message serialization/deserialization.
google-api-core[grpc]requiredCore library for Google API clients, including gRPC support.
google-authrequiredHandles authentication with Google APIs.
Agent activity
30 hits · last 30 days
node
24
OpenAI (training)
1
Resources

No resource links recorded.