Skip to main content

Bleemeo Python Python 3.8 at least GitHub License

Python library for interacting with the Bleemeo API

Requirements

  • Python3.8 or later
  • An account on Bleemeo

Installation

Take a look at venv. This tool provides isolated Python environments, which are more practical than installing packages system-wide.

After you’ve created and activated a virtual environment, run the command:

python -m pip install --upgrade bleemeo

Documentation

The Python library is documented using docstring in the source code.

Some examples of library usage can be found in examples.

Basic usage

Listing the first 10 agents of your account:

from bleemeo import Client, Resource, APIError


def list_agents():
    with Client(load_from_env=True) as client:
        try:
            resp_page = client.get_page(
                Resource.AGENT,
                page=1,
                page_size=10,
                params={"active": True, "fields": "id,fqdn,display_name"},
            )
            for agent in resp_page.json()["results"]:
                print(
                    f"* Agent {agent['display_name']} (fqdn = {agent['fqdn']}, id = {agent['id']})"
                )
        except APIError as e:
            print(f"API error: {e}:\n{e.response.text}")


if __name__ == "__main__":
    list_agents()

Save this file as list_agents.py.

Run it with:

BLEEMEO_USER=user-email@domain.com BLEEMEO_PASSWORD=password python3 list_agents.py

More examples can be found in examples

To run an example from a clone of this repository, run the following:

BLEEMEO_USER=user-email@domain.com BLEEMEO_PASSWORD=password python3 examples/list_metrics.py

Environment

At least the following options should be configured (as environment variables or with options):

  • Credentials OR initial refresh token
  • All other configuration options are optional and could be omitted

Ways to provide those options are referenced in the Configuration section.

Configuration

For environment variables to be taken into account, the parameter load_from_env of the Client constructor must be set to True.

Property Constructor parameter(s) Env variable(s) Default values
Credentials username & password BLEEMEO_USER & BLEEMEO_PASSWORD None. This option is required (unless initial refresh token is used)
Bleemeo account header account_id BLEEMEO_ACCOUNT_ID The first account associated with used credentials.
OAuth client ID/secret oauth_client_id & oauth_client_secret BLEEMEO_OAUTH_CLIENT_ID & BLEEMEO_OAUTH_CLIENT_SECRET The default SDK OAuth client ID
API URL api_url BLEEMEO_API_URL https://api.bleemeo.com
Initial refresh token oauth_initial_refresh_token BLEEMEO_OAUTH_INITIAL_REFRESH_TOKEN None. This is an alternative to username & password credentials.
Custom headers custom_headers - {"User-Agent": "Bleemeo Python Client"}
Throttle max auto retry delay throttle_max_auto_retry_delay - 1 minute.

Metadata

Release files for bleemeo 0.10.0

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

Source distribution (sdist)

Source distribution for bleemeo 0.10.0
File Size Uploaded Provenance Actions
bleemeo-0.10.0.tar.gz 91.6 kB Without provenance Details for bleemeo-0.10.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bleemeo 0.10.0
File Interpreter ABI Platform Actions
bleemeo-0.10.0-py3-none-any.whl Python 3 none any Details for bleemeo-0.10.0-py3-none-any.whl

Total release size: 110.6 kB

Release files / bleemeo-0.10.0.tar.gz

Download URL bleemeo-0.10.0.tar.gz
Size 91.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a616f4517dfda5f0e5168cb4b054844b75b32ffb040cf8021f7ac4c9e0f1e533
BLAKE2b-256 checksum
How to use checksums
4ba41340199422955a8a77ea2779daadba8b5b6bdc9dff6dace80ff7abfd8487
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.3 {"installer":{"name":"uv","version":"0.13.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / bleemeo-0.10.0-py3-none-any.whl

Download URL bleemeo-0.10.0-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c230285872d58316ca2b9cf09303e2a002768ad09b1485ccc4f8ae45614517f
BLAKE2b-256 checksum
How to use checksums
a95b5c447f81ae2a547c91e08f7ed8cc6db7bea5889cece4a615b0282e71368e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.3 {"installer":{"name":"uv","version":"0.13.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for bleemeo 0.10.0

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