semvec/pypi-packages huggingface dataset:
sqla-utils 0.7.0
Opinionated utilities for working with SQLAlchemy
License: MIT
Requires Python: <4,>=3.9
Keywords: sqlalchemy, orm

# sqla-utils

Opinionated utilities for working with SQLAlchemy

[![MIT License](https://img.shields.io/pypi/l/sqla-utils.svg)](https://pypi.python.org/pypi/sqla-utils/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sqla-utils)](https://pypi.python.org/pypi/sqla-utils/)
[![GitHub](https://img.shields.io/github/release/srittau/sqla-utils/all.svg)](https://github.com/srittau/sqla-utils/releases/)
[![pypi](https://img.shields.io/pypi/v/sqla-utils.svg)](https://pypi.python.org/pypi/sqla-utils/)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/srittau/sqla-utils/test-and-lint.yml?branch=main)](https://github.com/srittau/sqla-utils/actions/workflows/test-and-lint.yml)

## Contents

### Transaction Wrapper

**FIXME**

### `DBObjectBase`

`DBObjectBase` is a base class for mapped classes.

Example:

```python
from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, String
from sqla_utils import DBObjectBase, Transaction

class DBAppointment(DBObjectBase):
    __tablename__ = "appointments"

    id = Column(Integer, primary_key=True)
    date = Column(DateTime, nullable=False)
    description = Column(String(1000), nullable=False, default="")
```

Appointment items can then be queried like this:

```python
from sqla_utils import begin_transaction

with begin_transaction() as t:
    app123 = DBAppointment.fetch_by_id(t, 123)
    great_apps = DBAppointment.fetch_all(t, DBAppointment.description.like("%great%"))
```

It is recommended to add custom query, creation, and update methods:

```python
class DBAppointment(DBObjectBase):
    ...

    @classmethod
    def create(cls, t: Transaction, date: datetime, description: str) -> DBAppointment:
        o = cls()
        o.date = date
        o.description = description
        t.add(o)
        return o

    @classmethod
    def fetch_all_after(cls, t: Transaction, date: datetime) -> List[DBAppointment]:
        return cls.fetch_all(t, cls.start >= dates.start)

    def update_description(self, t: Transaction, new_description: str) -> None:
        self.description = new_description
        t.changed(self)
```

### Database Builder

**FIXME**

### pytest Utilities

The `sqla_utils.test` module contains a few utilities for working with pytest and SQLAlchemy.

**FIXME**
hacs-infrastructure 0.4.3
Infrastructure components for HACS (Healthcare Agent Communication Standard) - DI container, configuration, and service management
License: MIT
Requires Python: >=3.11
Keywords: ai-agents, configuration, container, dependency-injection, fhir, healthcare, infrastructure, service-management

# HACS Infrastructure

Infrastructure components for HACS (Healthcare Agent Communication Standard) providing dependency injection, configuration management, service discovery, and monitoring capabilities.

## Features

- **Dependency Injection Container**: Type-safe DI with singleton, transient, and scoped lifetimes
- **Configuration Management**: Environment-based configuration with validation
- **Service Registry & Discovery**: Service registration, health monitoring, and load balancing
- **Event System**: Pub/sub event bus with filtering and async handling
- **Lifecycle Management**: Graceful startup and shutdown orchestration
- **Monitoring**: Health checks, metrics collection, and performance monitoring

## Installation

```bash
pip install hacs-infrastructure
```

## Quick Start

```python
from hacs_infrastructure import Container, Injectable, get_config

# Dependency Injection
@Injectable
class DatabaseService:
    def __init__(self):
        self.connection = "database_connection"

@Injectable  
class UserService:
    def __init__(self, db: DatabaseService):
        self.db = db

container = Container()
container.register(DatabaseService)
container.register(UserService)

user_service = container.get(UserService)

# Configuration
config = get_config()
print(f"Environment: {config.environment}")
print(f"Debug mode: {config.debug}")
```

## License

MIT License - see LICENSE file for details.
hacs-core 0.4.3
Core models and base classes for Healthcare Agent Communication Standard
License: MIT
Requires Python: >=3.11
Keywords: actor, agents, ai, base-classes, core, evidence, healthcare, memory, models

# HACS Core

**Foundation models for Healthcare Agent Communication Standard**

Core Pydantic models and base classes that define the healthcare AI communication protocol.

## 🏥 **Healthcare Models**

Essential healthcare data structures optimized for AI agent communication:

- **Patient** - Demographics, contact info, clinical context
- **Observation** - Clinical measurements, lab results, vital signs
- **Encounter** - Healthcare visits, episodes of care
- **Actor** - Healthcare providers with role-based permissions
- **MemoryBlock** - Structured memory for AI clinical reasoning
- **Evidence** - Clinical guidelines, research, decision support

## 🎯 **Key Features**

- **FHIR Compatible** - Full alignment with healthcare standards
- **AI Optimized** - Structured for LLM processing and tool calling
- **Validation Built-in** - Healthcare-specific validation rules
- **Actor Security** - Role-based access control for clinical data
- **Memory System** - Episodic, procedural, and executive memory types

## 📦 **Installation**

```bash
pip install hacs-core
```

## 🚀 **Quick Start**

```python
from hacs_core import Patient, Observation, Actor, MemoryBlock

# Healthcare provider
physician = Actor(
    name="Dr. Sarah Chen",
    role="PHYSICIAN",
    organization="Mount Sinai Health System"
)

# Patient record
patient = Patient(
    full_name="Maria Rodriguez",
    birth_date="1985-03-15",
    gender="female",
    active=True
)

# Clinical observation
bp_reading = Observation(
    code_text="Blood Pressure",
    value="145/90",
    unit="mmHg",
    status="final",
    patient_id=patient.id
)

# Clinical memory
memory = MemoryBlock(
    content="Patient presents with elevated BP, discussed lifestyle modifications",
    memory_type="episodic",
    importance_score=0.8
)
```

## 🔗 **Integration**

HACS Core models work seamlessly with:
- **MCP Tools** - 42+ Hacs Tools via Model Context Protocol
- **LangGraph** - AI agent workflows with clinical memory
- **PostgreSQL** - Persistent storage with pgvector
- **FHIR Systems** - Healthcare standards compliance

## 📄 **License**

Apache-2.0 License - see [LICENSE](../../LICENSE) for details.
hacs-auth 0.4.3
Authentication and authorization components for HACS (Healthcare Agent Communication Standard)
License: MIT
Requires Python: >=3.11
Keywords: ai-agents, authentication, authorization, fhir, healthcare, jwt, oauth2

# HACS Authentication

Authentication and authorization components for HACS (Healthcare Agent Communication Standard) providing JWT token management, role-based access control, and comprehensive audit logging.

## Features

- **JWT Token Management**: Healthcare-specific claims with organization context
- **Role-Based Access Control**: 13+ healthcare roles with smart permissions
- **Session Management**: Secure session handling with activity tracking  
- **Audit Logging**: HIPAA-compliant access tracking and compliance reports
- **Healthcare Security**: Security levels, PHI tracking, consent management
- **AI Agent Integration**: Simplified APIs for intelligent healthcare agents

## Installation

```bash
pip install hacs-auth
```

## Quick Start

```python
from hacs_auth import AuthManager, Actor, ActorRole, require_auth

# JWT Authentication
auth_manager = AuthManager()
token = auth_manager.create_access_token(
    user_id="physician-123",
    role="physician", 
    permissions=["read:patient", "write:observation"],
    organization="Mayo Clinic"
)

# Actor Management
actor = Actor(
    name="Dr. Sarah Johnson",
    role=ActorRole.PHYSICIAN,
    organization="Mayo Clinic"
)

# Function Protection
@require_auth(permission="read:patient")
def get_patient_data(patient_id: str, **kwargs):
    token_data = kwargs["token_data"]
    return f"Patient data for {patient_id}"
```

## License

MIT License - see LICENSE file for details.