Skip to main content

Reusable SDK for Joblogic automation projects

Project description

joblogic-automation-sdk

Reusable SDK for Joblogic automation projects. Provides common infrastructure: Jicro client, audit logging (Cosmos DB), Slack/Teams notifications, PostgreSQL helpers, auth middleware, and shared enums/utilities.

Installation

# Full install (all extras)
pip install "joblogic-automation-sdk[all] @ git+https://joblogicltd@dev.azure.com/joblogicltd/JobLogic%20Automations/_git/joblogic-automation-sdk@uat"

# Core only (JicroClient, ExecutionResult, config)
pip install "joblogic-automation-sdk @ git+https://joblogicltd@dev.azure.com/joblogicltd/JobLogic%20Automations/_git/joblogic-automation-sdk@uat"

# Selective extras
pip install "joblogic-automation-sdk[audit,db] @ git+https://joblogicltd@dev.azure.com/joblogicltd/JobLogic%20Automations/_git/joblogic-automation-sdk@uat"

Quick Start

from joblogic_sdk.jicro import JicroClient, JicroError
from joblogic_sdk.config import get_settings

async with JicroClient() as client:
    result = await client.execute(
        tenant_id=get_settings().tenant_id,
        service_name="core",
        message_signature="SearchJobMsg",
        payload={"searchText": "example", "pageSize": 10},
    )

Modules

Module Import Extra
Config from joblogic_sdk.config import get_settings (core)
Jicro Client from joblogic_sdk.jicro import JicroClient, JicroError (core)
Execution Result from joblogic_sdk.models import ExecutionResult (core)
Database from joblogic_sdk.db import query, execute db
Notifications from joblogic_sdk.notifications import slack_notification, teams_notification (core)
Audit from joblogic_sdk.audit import AuditManager, AuditData, audit_router audit
Auth from joblogic_sdk.auth import get_tenant_id auth
Common from joblogic_sdk.common import EntityType, AuditAction, AuditStatus (core)

Environment Variables

Variable Module Description
JICRO_BASE_URL jicro Jicro API base URL
JICRO_AUTH_TOKEN jicro Jicro auth token
TENANT_ID config Single-tenant automations
DATABASE_URL db PostgreSQL connection
AUDIT_MONGODB_CONNECTION_STRING audit Cosmos DB (MongoDB API) connection
AUDIT_DB_NAME audit MongoDB database name
AUDIT_COLLECTION_NAME audit MongoDB collection name
SLACK_ENABLED notifications Enable Slack (true/false)
SLACK_SUCCESS_WEBHOOK notifications Slack success webhook
SLACK_FAILURE_WEBHOOK notifications Slack failure webhook
SLACK_PARTIAL_FAILURE_WEBHOOK notifications Slack partial failure webhook
TEAMS_ENABLED notifications Enable Teams (1/0)
TEAMS_WORKFLOW_URL notifications Teams workflow webhook
APPLICATION_ENVIRONMENT config Environment name
IDP_CLIENT_ID config OAuth2 client ID
IDP_AUTHORITY config IDP authority URL
SCHEDULER_CRON_HOUR config Timer cron hour
SCHEDULER_CRON_MINUTE config Timer cron minute

Development

# Install with dev dependencies
pip install -e ".[all,dev]"

# Run tests
pytest tests/ -v

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

joblogic_automation_sdk-0.1.0.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

joblogic_automation_sdk-0.1.0-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

Details for the file joblogic_automation_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: joblogic_automation_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for joblogic_automation_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c8191f8d59ce13e2691df829c9e15c2c4bd451a569c5fa8d3362651f29378269
MD5 fa8fc812d33c58d6b3329ce2e18d05fb
BLAKE2b-256 c3c463db6ab0e93f9a58739520ff1f129f7f81b5d2cefa6ddc34d983bd8f27a8

See more details on using hashes here.

File details

Details for the file joblogic_automation_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for joblogic_automation_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e756dcfae2b9e1d13d8ea0d26c0d9e56058824f10f2919d1413c516766085f1
MD5 5d16c5813590c3221055e616eb455735
BLAKE2b-256 c8a31671c0df7b38a6b577947b48da955217357c70df684551d9224101b44490

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page