Skip to main content

Business-Use Core CLI

Project description

business-use-core

FastAPI backend for tracking and validating business event flows in production applications.

Quick Start

# Install dependencies
uv sync

# Initialize (creates config, generates API key, sets up database)
uv run business-use init

# Start development server
uv run business-use serve --reload

# Start production server (4 workers)
uv run business-use prod

What It Does

  • Event Ingestion: Receives events from SDKs via /v1/events-batch
  • Flow Evaluation: Validates event sequences against flow definitions
  • Storage: SQLite database with async queries
  • CLI: Commands for evaluation, inspection, and management

Key Commands

# Evaluate a flow run
uv run business-use eval-run <run_id> <flow> --verbose

# Show flow graph structure
uv run business-use show-graph [flow]

# List recent runs
uv run business-use runs

# Database migrations
uv run business-use db migrate

# Format/lint
uv run ruff format src/
uv run ruff check src/ --fix

Architecture

Follows Hexagonal Architecture (Ports & Adapters):

  • domain/ - Pure business logic (zero dependencies)
  • execution/ - Expression evaluation (Python/CEL/JS)
  • adapters/ - Storage implementations (SQLite)
  • eval/ - Orchestration layer
  • api/ - FastAPI HTTP endpoints
  • loaders/ - YAML flow definitions

Configuration

Configuration loaded from:

  1. ./config.yaml (development)
  2. ~/.business-use/config.yaml (production)
api_key: your_secret_key_here
database_path: ./db.sqlite
log_level: info

Installation from PyPI

# Run without installing
uvx business-use-core init
uvx business-use-core serve

# Or install globally
pip install business-use-core
business-use init
business-use serve

Documentation

  • Full project overview: ../CLAUDE.md
  • Architecture details: ARCHITECTURE.md
  • CLI reference: CLI_REFERENCE.md
  • Graph examples: GRAPH_EXAMPLES.md

API

All endpoints require X-Api-Key header:

  • POST /v1/events-batch - Ingest events
  • POST /v1/run-eval - Evaluate flow run
  • GET /health - Health check (no auth)

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

business_use_core-0.2.0.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

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

business_use_core-0.2.0-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

Details for the file business_use_core-0.2.0.tar.gz.

File metadata

  • Download URL: business_use_core-0.2.0.tar.gz
  • Upload date:
  • Size: 36.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for business_use_core-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6b62d23aafde9533cf722d098c3a8c6e3452f06207b9330fcf945f9c8d322d47
MD5 02a1d08c950305b7f8f8cd15fc834223
BLAKE2b-256 52e8d13f9d8baa9fa9153486c6901e0456c3511c2986bfcb67d9aaf324758aa8

See more details on using hashes here.

Provenance

The following attestation bundles were made for business_use_core-0.2.0.tar.gz:

Publisher: release-core.yaml on desplega-ai/business-use

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file business_use_core-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for business_use_core-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86ab119b1aa7d1c6b10fad5edcbaf7b26a92c23dd0e103e73419c469259789c8
MD5 500f4a62ecc27f46b573f2e2fda2effc
BLAKE2b-256 9e779944fc9ddfe6800a23db30c81ffb9601782ba4a1507c5e3252c352be6379

See more details on using hashes here.

Provenance

The following attestation bundles were made for business_use_core-0.2.0-py3-none-any.whl:

Publisher: release-core.yaml on desplega-ai/business-use

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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