Skip to main content

BlueCat Libraries

Modules for working with products from BlueCat Networks.

The Python clients in this package provide access to the following BlueCat HTTP APIs:

  • Address Manager RESTful v2 API (9.6, 25.1, 26.1)

  • Address Manager Legacy REST v1 API (9.6, 25.1, 26.1)

  • Address Manager Failover API

  • DNS Edge API

  • Micetro REST API

The examples below illustrate how to use the Address Manager RESTful v2 API and Legacy v1 API to fetch BlueCat Address Manager (BAM) configurations.

Examples using Address Manager RESTful v2 API

from bluecat_libraries.address_manager.apiv2 import Client, MediaType
import csv

# Retrieve the configurations. Request the data as per BAM's default content type.
with Client(<bam_url>) as client:
    client.login(<username>, <password>)
    response = client.http_get("/configurations")
    configurations = response["data"]
    for configuration in configurations:
        print(f'{configuration["id"]}: {configuration["name"]}')
    client.logout()

# Retrieve the configurations. Request that the response is in 'JSON' format.
# The result should contain only fields 'id' and 'name'.
with Client(<bam_url>) as client:
    client.login(<username>, <password>)
    response = client.http_get(
        "/configurations",
        params={"fields": "id,name"},
        headers={"Accept": MediaType.JSON},
    )
    configurations = response["data"]
    for configuration in configurations:
        print(f'{configuration["id"]}: {configuration["name"]}')
    client.logout()

# Retrieve configurations. Request that the response is in 'CSV' format.
# The result should contain only the first 10, ordered alphabetically by name.
with Client(<bam_url>) as client:
    client.login(<username>, <password>)
    configurations_csv = client.http_get(
        "/configurations",
        params={"orderBy": "asc(name)", "limit": "10"},
        headers={"Accept": MediaType.CSV},
    )
    configurations = list(csv.reader(configurations_csv.splitlines()))
    for configuration in configurations:
        # NOTE: The 'id' is the first value in a row, the 'name' is the third one.
        print(f"{configuration[0]}: {configuration[2]}")
    client.logout()

Example using Address Manager Legacy REST v1 API

# Fetch all configurations from a BlueCat Address Manager server.

from bluecat_libraries.address_manager.api import Client
from bluecat_libraries.address_manager.constants import ObjectType

with Client(<bam_url>) as client:
    client.login(<username>, <password>)
    configs = client.get_entities(0, ObjectType.CONFIGURATION)
    client.logout()

for config in configs:
    print(config)

Examples using Micetro REST API

from bluecat_libraries.micetro.apiv2 import Client, MediaType

# Retrieve the users. Request the data as per Micetro's default content type.

with Client(<micetro_url>) as client:
    client.authenticate(<username>, <password>)
    response = client.http_get("/users")
    users = response["result"]["users"]
    for user in users:
        print(f'{user["ref"]}: {user["name"]}')

# Retrieve users. Request that the response is in 'XML' format.

with Client(<micetro_url>) as client:
    client.authenticate(<username>, <password>)
    response = client.http_get("/users", headers={"Accept": MediaType.XML})
    print(response)

Note

Subpackage bluecat_libraries.address_manager.api.rest.provisional is a deprecated dependency of BlueCat Gateway, and currently exists while we are still in the pre-deprecation-removal grace period. It will be removed in the next release of BlueCat Libraries.

Metadata

Release files for bluecat-libraries 26.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 bluecat-libraries 26.1.1
File Size Uploaded Provenance Actions
bluecat_libraries-26.1.1.tar.gz 117.9 kB Without provenance Details for bluecat_libraries-26.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bluecat-libraries 26.1.1
File Interpreter ABI Platform Actions
bluecat_libraries-26.1.1-py3-none-any.whl Python 3 none any Details for bluecat_libraries-26.1.1-py3-none-any.whl

Total release size: 269.7 kB

Release files / bluecat_libraries-26.1.1.tar.gz

Download URL bluecat_libraries-26.1.1.tar.gz
Size 117.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6e5d0059cdb5adee1ce252dac5856908a797b2e5609adfbb2704dde0ac2edf7b
BLAKE2b-256 checksum
How to use checksums
b94fce16c7fec5d34b00a96d6c97a672e83cec177dad92597470f8e42f8e59e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / bluecat_libraries-26.1.1-py3-none-any.whl

Download URL bluecat_libraries-26.1.1-py3-none-any.whl
Size 151.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad03ce9d739d2098a637221df8639280af6696386ab2e94f360a3f79284673c3
BLAKE2b-256 checksum
How to use checksums
bd7dc95a77e4204d7284bdd1621cfe3205e6dde97f8efcfd117919cd55353222
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for bluecat-libraries 26.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.

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