Catalog PyPI
PACKAGE EXPLORERView in registry

aailab-tools

PyPI

Utilities for interacting with the AAILab blade dashboard.

blade-dashboarddecoratoremailnotification
Versions collected1
Direct dependencies1From release 0.1.2
Last observed20 Oct, 16:56 UTC

README

Version 0.1.2 documentation

aailab-tools

aailab-tools provides a notify() decorator that reports the completion status of a function to the blade_dashboard notification API.

Installation

pip install aailab-tools

Configuration

The decorator reads its configuration from environment variables. On a multi-user server, the recommended setup is to export them globally once and let each project inherit them.

Recommended variables:

  • SERVER_NOTIFY: full notification endpoint URL, for example http://127.0.0.1:8000/api/notify
  • API_TOKEN: API token expected by blade_dashboard server
  • AAILAB_MACHINE_ID: optional machine identifier; if omitted, hostname is used

Example global setup:

cat > /etc/profile.d/aailab-tools.sh <<'EOF'
export SERVER_NOTIFY=http://127.0.0.1:8000/api/notify
export API_TOKEN=your-token
export AAILAB_MACHINE_ID=$(hostname)
EOF
chmod 644 /etc/profile.d/aailab-tools.sh

The decorator checks configuration in this order:

  1. Process environment variables
  2. .env in the current working directory
  3. .env next to the calling script
  4. ~/.config/aailab-tools/.env or $XDG_CONFIG_HOME/aailab-tools/.env
  5. ~/.aailab-tools.env

The .env files are fallback sources for cases where the process environment is not set explicitly.

Usage

from aailab_tools import notify


@notify("user@example.com", "admin@example.com")
def run_job():
    return 42

On success, the server receives status 0. If the function raises an exception, the exception text is sent as the status and the exception is re-raised.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.22 Sept 20261

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
vrbaj/aailab-tools

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:56 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:ae92b0b0f8e8b1d631bcfa4e0b22a708f53fc85a65ac5a070396dd011aef0d0b