Skip to main content

SAGE Common Libraries (Unified Package)

Project description

SAGE Common - Utilities, CLI, Development Tools & Frontend

This package provides the core utilities, command-line interface, development tools, and web frontend for the SAGE (Stream Analytics in Go-like Environments) framework.

Features

🛠️ Core Utilities (sage.utils)

  • Configuration management with YAML/TOML support
  • Flexible logging system with multiple backends
  • Platform-specific directory management
  • Type validation with Pydantic models
  • Common data structures and helpers

💻 Command Line Interface (sage.cli)

  • Rich CLI with auto-completion support
  • Interactive questionnaires and prompts
  • Beautiful table formatting and progress bars
  • Cross-platform shell integration
  • Core SAGE system management commands

🔧 Development Toolkit (sage.dev)

  • Automated testing with pytest integration
  • Code quality tools (black, isort, mypy, ruff)
  • Package management and publishing
  • Performance profiling and benchmarking
  • Documentation generation tools

🌐 Web Frontend (sage.frontend)

  • FastAPI-based web server and dashboard
  • Real-time websocket communication
  • Interactive data visualization
  • Authentication and security features
  • RESTful API endpoints

Installation

# 基础安装 (仅 utils 核心功能)
pip install isage-common

# 基础 + CLI 工具
pip install isage-common[cli]
# 或者
pip install isage-common[basic]

# CLI + 开发工具
pip install isage-common[tools]

# 开发环境完整安装
pip install isage-common[dev]

# Frontend/Web 功能
pip install isage-common[frontend]
# 或者
pip install isage-common[web]

# 文档生成工具
pip install isage-common[docs]

# 完整安装 (所有功能)
pip install isage-common[full]

Quick Start

Using Utilities

from sage.utils.config import load_config
from sage.utils.logging import get_logger

# Load configuration
config = load_config("my_config.yaml")

# Set up logging
logger = get_logger("my_app")
logger.info("Hello SAGE!")

Using CLI

# Basic SAGE commands
sage --help
sage config show
sage status

# Core system management
sage-core start
sage-core status
sage-core stop

Using Development Tools

# Run tests
sage-dev test

# Code analysis
sage-dev analyze

# Package management
sage-dev package build
sage-dev package publish

# Generate reports
sage-dev report coverage
sage-dev report performance

Using Frontend

# Start SAGE web server
sage-frontend

# Start dashboard  
sage-dashboard

# Start server with custom config
sage-server --config my_config.yaml

Package Structure

src/sage/
├── utils/           # Core utilities
│   ├── config/      # Configuration management
│   ├── logging/     # Logging system
│   ├── types/       # Type definitions
│   └── helpers/     # Helper functions
├── cli/             # Command line interface
│   ├── commands/    # CLI command implementations
│   ├── prompts/     # Interactive prompts
│   └── formatters/  # Output formatting
├── dev/             # Development tools
│   ├── testing/     # Test automation
│   ├── quality/     # Code quality tools
│   ├── packaging/   # Package management
│   └── docs/        # Documentation tools
└── frontend/        # Web frontend and dashboard
    ├── web_ui/ # FastAPI server implementation
    ├── static/      # Static web assets
    └── templates/   # HTML templates

Contributing

This package is part of the SAGE monorepo. Please see the main SAGE repository for contribution guidelines.

License

MIT License - see the LICENSE file for details.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

isage_common-0.1.1-py3-none-any.whl (224.7 kB view details)

Uploaded Python 3

File details

Details for the file isage_common-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: isage_common-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 224.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for isage_common-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 efda6f898dcff84e49d63428527fcb3b843ba8a1f32c415d6324302e9a645670
MD5 b9640e36000d30929b883c86041e5d6d
BLAKE2b-256 3dae6e6bc7b8f6ba9acbe2c1dd0f4bef44ac09d339876f26ff3eef10a71d5ba4

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