geek-cafe-services


Namegeek-cafe-services JSON
Version 0.4.4 PyPI version JSON
download
home_pageNone
SummaryBase Reusable Services for SaaS
upload_time2025-10-10 02:22:36
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseGeek Cafe Services Business Source License 1.0 Copyright (c) 2025 Geek Cafe, LLC. All rights reserved. The "Geek Cafe Services" software (the "Software") is made available under this Business Source License (the "License"). This License allows you to view, study, and modify the source code, and to use it for personal, educational, research, or non-commercial purposes, subject to the following terms. 1. Grant of Rights a. You may copy and modify the Software for your own personal, educational, or internal development use. b. You may not use the Software, or modified versions of it, to provide any commercial service or product, including software-as-a-service, consulting, hosting, or resale, without a separate commercial license from Geek Cafe LLC. 2. Change Date Three (3) years from the date of first public release of a specific version of the Software (the “Change Date”), that version will automatically be made available under the Apache License 2.0. Later versions may have different Change Dates. 3. Attribution All copies or substantial portions of the Software must retain this License text, the copyright notice above, and a clear reference to the original source repository (https://github.com/geekcafe/geek-cafe-services). 4. Trademarks The names “Geek Cafe”, “Geek Cafe Services”, and any related logos are trademarks of Geek Cafe LLC and may not be used to endorse or promote derivative products without prior written permission. 5. Disclaimer of Warranty THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. 6. Limitation of Liability IN NO EVENT SHALL GEEK Cafe LLC OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR IN CONNECTION WITH THE SOFTWARE OR ITS USE. --- For commercial licensing inquiries, contact: legal@geekcafe.com
keywords api gateway aws dynamodb lambda saas serverless services
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Geek Cafe Services

[![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/)
[![Version](https://img.shields.io/badge/version-0.4.0-green.svg)](https://github.com/geekcafe/geek-cafe-services)
[![DynamoDB](https://img.shields.io/badge/database-DynamoDB-orange.svg)](https://aws.amazon.com/dynamodb/)
[![AWS Lambda](https://img.shields.io/badge/runtime-AWS%20Lambda-yellow.svg)](https://aws.amazon.com/lambda/)

> **⚠️ Pre-1.0 Notice**: This library is under active development. Breaking changes may occur until we reach a stable 1.0 GA release. We recommend pinning to specific versions in production.

> **✨ New in v0.3.0**: Complete CRUDL Lambda handlers for all core resources (Events, Users, Groups, Messages, Votes)!

<!-- COVERAGE-BADGE:START -->
## Test Coverage

![Tests](https://img.shields.io/badge/tests-492%20passed-brightgreen)
![Coverage](https://img.shields.io/badge/coverage-83.7%25-green)

**Overall Coverage:** 83.7% (3496/4178 statements)

### Coverage Summary

| Metric | Value |
|--------|-------|
| Total Statements | 4,178 |
| Covered Statements | 3,496 |
| Missing Statements | 682 |
| Coverage Percentage | 83.7% |
| Total Tests | 492 |
| Test Status | ✅ All Passing |

### Files Needing Attention (< 80% coverage)

| Coverage | Missing Lines | File |
|----------|---------------|------|
| 0.0% | 9 | `core/audit_mixin.py` |
| 54.4% | 140 | `utilities/lambda_event_utility.py` |
| 54.5% | 20 | `core/service_result.py` |
| 55.9% | 56 | `services/website_analytics_summary_service.py` |
| 64.0% | 9 | `lambda_handlers/_base/service_pool.py` |
| 66.3% | 33 | `models/base_model.py` |
| 72.5% | 41 | `services/website_analytics_service.py` |
| 72.7% | 41 | `services/user_service.py` |
| 73.9% | 47 | `services/message_thread_service.py` |
| 74.6% | 48 | `services/group_service.py` |

*... and 3 more files with < 80% coverage*

### Running Tests

```bash
# Run all tests with coverage
./run_unit_tests.sh

# View detailed coverage report
open reports/coverage/index.html
```

*Last updated: 2025-10-09 14:08:26*

---

<!-- COVERAGE-BADGE:END -->

## Description

**Geek Cafe Services** is a production-ready, enterprise-grade library that provides reusable database services specifically designed for multi-tenant SaaS applications. Built on top of AWS DynamoDB, this library offers a prescriptive approach to building scalable, maintainable backend services with consistent patterns and best practices.

### Why Geek Cafe Services?

🏗️ **Consistent Architecture**: All services follow the same proven patterns for CRUD operations, error handling, and access control  
🔒 **Multi-Tenant by Design**: Built-in tenant isolation ensures secure data separation across customers  
⚡ **DynamoDB Optimized**: Leverages DynamoDB's strengths with efficient GSI indexes and query patterns  
🛡️ **Production Ready**: Comprehensive error handling, logging, pagination, and batch operations  
🧪 **Fully Tested**: 100% test coverage with comprehensive test suites for reliability  
📖 **Well Documented**: Extensive documentation with practical examples and best practices  

### Perfect For

- **SaaS Applications** requiring multi-tenant data isolation
- **Serverless Architectures** built on AWS Lambda and DynamoDB
- **Teams** wanting consistent, proven patterns across services
- **Rapid Development** with pre-built, tested service components

## Installation

```bash
# Clone the repository
git clone https://github.com/geekcafe/geek-cafe-services.git
cd geek-cafe-services

# Setup the development environment
./pysetup.sh

# Install dependencies
pip install -r requirements.txt
```

## Quick Start

```python
from geek_cafe_services.message_service import MessageService

# Initialize service
service = MessageService()

# Create a message
result = service.create(
    tenant_id="your_tenant",
    user_id="your_user",
    type="notification",
    content={"title": "Welcome!", "body": "Thanks for joining us."}
)

if result.success:
    print(f"Created message: {result.data.id}")
```

## Available Services

### 🚀 Lambda Handler Wrappers (NEW in v0.2.0)
**Purpose**: Eliminate 70-80% of boilerplate code in AWS Lambda functions

**Key Capabilities**:
- ✅ Automatic API key validation from environment
- ✅ Request body parsing and camelCase → snake_case conversion
- ✅ Service initialization with connection pooling for warm starts
- ✅ Built-in CORS and error handling
- ✅ User context extraction from authorizers
- ✅ Service injection for easy testing
- ✅ Support for public and secured endpoints

**Available Handlers**:
- `ApiKeyLambdaHandler` - API key validation (most common)
- `PublicLambdaHandler` - No authentication (config endpoints)
- `BaseLambdaHandler` - Extensible base for custom handlers

**Quick Example**:
```python
from geek_cafe_services.lambda_handlers import ApiKeyLambdaHandler
from geek_cafe_services.vote_service import VoteService

# All boilerplate handled in 3 lines
handler = ApiKeyLambdaHandler(
    service_class=VoteService,
    require_body=True,
    convert_case=True
)

def lambda_handler(event, context):
    return handler.execute(event, context, create_vote)

def create_vote(event, service, user_context):
    # Just your business logic - everything else is handled!
    payload = event["parsed_body"]  # Already parsed & converted
    return service.create_vote(
        tenant_id=user_context.get("tenant_id", "anonymous"),
        user_id=user_context.get("user_id", "anonymous"),
        **payload
    )
```

**Use Cases**: Any AWS Lambda function with API key auth, reducing code by 70-80% while maintaining all functionality

📖 **[Complete Lambda Handlers Documentation](./docs/lambda_handlers.md)**

### 📧 MessageService
**Purpose**: Complete message and notification management system

**Key Capabilities**:
- ✅ Full CRUD operations with tenant isolation
- ✅ Flexible JSON content storage for any message type
- ✅ Efficient querying by user, tenant, and message type
- ✅ Automatic audit trails and timestamps
- ✅ Built-in access control and validation

**Use Cases**: User notifications, system alerts, communication logs, announcement management

### 🗳️ Voting Services Suite
**Purpose**: Complete voting and rating system with real-time aggregation

**Architecture**: Three interconnected services working together:

#### VoteService
- ✅ Individual vote management with automatic upsert behavior
- ✅ One vote per user per target enforcement
- ✅ Support for up/down votes or custom vote types
- ✅ Comprehensive querying by user, target, and tenant

#### VoteSummaryService  
- ✅ Pre-calculated vote totals for instant retrieval
- ✅ Target-based optimization for high-performance lookups
- ✅ Metadata tracking (last tallied timestamp, vote counts)
- ✅ Tenant-scoped summary management

#### VoteTallyService
- ✅ Intelligent vote aggregation with pagination support
- ✅ Batch processing for multiple targets
- ✅ Stale target detection and automated re-tallying
- ✅ Comprehensive error handling and resilience

**Use Cases**: Product ratings, content voting, feedback systems, community polls, recommendation engines

## Documentation

📖 **[Complete Documentation](./docs/services_overview.md)**

- **[DynamoDB Models](./docs/dynamodb_models.md)** - Model definition patterns and best practices
- **[Services Pattern](./docs/services_pattern.md)** - Service layer architecture and CRUD operations
- **[Lambda Handlers](./docs/lambda_handlers.md)** - 🆕 Eliminate Lambda boilerplate (70-80% code reduction)
- [Services Overview](./docs/services_overview.md) - Architecture and common patterns
- [MessageService](./docs/message_service.md) - Message management API
- [Voting Services](./docs/voting_services.md) - Complete voting system documentation
- [A/B Testing Guide](./docs/ab_testing_guide.md) - Using voting services for A/B testing and experimentation
- [Development Roadmap](./docs/roadmap.md) - Planned improvements and enhancements

## Core Features

### 🏛️ **Enterprise Architecture**
- **Multi-Tenant by Design**: Complete tenant isolation with automatic access control
- **Consistent Patterns**: All services follow identical CRUD interfaces and conventions
- **Scalable Design**: Built for high-throughput, multi-customer SaaS applications

### 🔧 **Developer Experience**
- **Type Safety**: Full Python type hints for better IDE support and fewer bugs
- **Comprehensive Testing**: 100% test coverage with realistic test scenarios
- **Rich Documentation**: Detailed API docs, examples, and best practices
- **Easy Integration**: Simple initialization and consistent error handling

### ⚡ **Performance & Reliability**
- **DynamoDB Optimized**: Efficient GSI indexes and query patterns for fast operations
- **Pagination Support**: Handle large datasets without memory issues
- **Batch Operations**: Process multiple items efficiently
- **Error Resilience**: Graceful handling of partial failures and edge cases

### 🛡️ **Production Ready**
- **Structured Logging**: AWS Lambda Powertools integration for observability
- **Comprehensive Validation**: Input validation with detailed error messages  
- **Access Control**: Automatic tenant and user-based security enforcement
- **Audit Trails**: Complete tracking of who did what and when

## Environment Setup

```bash
# Required environment variables
export DYNAMODB_TABLE_NAME=your_table_name

# Optional AWS configuration (if not using IAM roles)
export AWS_REGION=us-east-1
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
```

## Testing

```bash
# Run all tests
pytest tests/ -v

# Run specific service tests
pytest tests/test_message_service.py -v
pytest tests/test_vote_*_service.py -v

# Run with coverage
pytest tests/ --cov=geek_cafe_services --cov-report=html
```

## Project Structure

```
geek-cafe-services/
├── src/geek_cafe_services/
│   ├── lambda_handlers/     # 🆕 Lambda handler wrappers (v0.2.0)
│   │   ├── base.py          # Base handler with common functionality
│   │   ├── api_key_handler.py    # API key validation handler
│   │   ├── public_handler.py     # Public (no auth) handler
│   │   └── service_pool.py       # Service connection pooling
│   ├── middleware/          # CORS, auth, error handling decorators
│   ├── utilities/           # Request/response helpers
│   ├── models/              # Data models with DynamoDB mapping
│   ├── *_service.py         # Service implementations
│   ├── database_service.py  # Base service class
│   └── service_result.py    # Standardized response wrapper
├── tests/                   # Comprehensive test suite
├── docs/                    # Detailed documentation
│   └── lambda_handlers.md   # 🆕 Lambda wrapper documentation
├── examples/                # Working code examples
│   └── lambda_handlers/     # 🆕 Handler examples
└── README.md               # This file
```

## Contributing

We welcome contributions! Here's how to get started:

1. **Fork the repository** and create a feature branch
2. **Follow the existing patterns** - consistency is key
3. **Add comprehensive tests** for any new functionality  
4. **Update documentation** for API changes
5. **Submit a Pull Request** with a clear description

### Development Guidelines

- Follow existing code style and patterns
- Maintain 100% test coverage for new code
- Update documentation for any API changes
- Use meaningful commit messages
- Test against multiple Python versions if possible

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Support

- 📖 **Documentation**: [Complete docs](./docs/services_overview.md)
- 🐛 **Bug Reports**: [GitHub Issues](https://github.com/geekcafe/geek-cafe-services/issues)
- 💡 **Feature Requests**: [GitHub Discussions](https://github.com/geekcafe/geek-cafe-services/discussions)
- 📧 **Questions**: Create an issue with the "question" label

---

**Built with ❤️ for the SaaS development community**

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "geek-cafe-services",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "api gateway, aws, dynamodb, lambda, saas, serverless, services",
    "author": null,
    "author_email": "Eric Wilson <eric.wilson@geekcafe.com>",
    "download_url": "https://files.pythonhosted.org/packages/58/5d/c5e27d82843a428804d1ceb11e06488240d4b540718915f60b9fb1654489/geek_cafe_services-0.4.4.tar.gz",
    "platform": null,
    "description": "# Geek Cafe Services\n\n[![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/)\n[![Version](https://img.shields.io/badge/version-0.4.0-green.svg)](https://github.com/geekcafe/geek-cafe-services)\n[![DynamoDB](https://img.shields.io/badge/database-DynamoDB-orange.svg)](https://aws.amazon.com/dynamodb/)\n[![AWS Lambda](https://img.shields.io/badge/runtime-AWS%20Lambda-yellow.svg)](https://aws.amazon.com/lambda/)\n\n> **\u26a0\ufe0f Pre-1.0 Notice**: This library is under active development. Breaking changes may occur until we reach a stable 1.0 GA release. We recommend pinning to specific versions in production.\n\n> **\u2728 New in v0.3.0**: Complete CRUDL Lambda handlers for all core resources (Events, Users, Groups, Messages, Votes)!\n\n<!-- COVERAGE-BADGE:START -->\n## Test Coverage\n\n![Tests](https://img.shields.io/badge/tests-492%20passed-brightgreen)\n![Coverage](https://img.shields.io/badge/coverage-83.7%25-green)\n\n**Overall Coverage:** 83.7% (3496/4178 statements)\n\n### Coverage Summary\n\n| Metric | Value |\n|--------|-------|\n| Total Statements | 4,178 |\n| Covered Statements | 3,496 |\n| Missing Statements | 682 |\n| Coverage Percentage | 83.7% |\n| Total Tests | 492 |\n| Test Status | \u2705 All Passing |\n\n### Files Needing Attention (< 80% coverage)\n\n| Coverage | Missing Lines | File |\n|----------|---------------|------|\n| 0.0% | 9 | `core/audit_mixin.py` |\n| 54.4% | 140 | `utilities/lambda_event_utility.py` |\n| 54.5% | 20 | `core/service_result.py` |\n| 55.9% | 56 | `services/website_analytics_summary_service.py` |\n| 64.0% | 9 | `lambda_handlers/_base/service_pool.py` |\n| 66.3% | 33 | `models/base_model.py` |\n| 72.5% | 41 | `services/website_analytics_service.py` |\n| 72.7% | 41 | `services/user_service.py` |\n| 73.9% | 47 | `services/message_thread_service.py` |\n| 74.6% | 48 | `services/group_service.py` |\n\n*... and 3 more files with < 80% coverage*\n\n### Running Tests\n\n```bash\n# Run all tests with coverage\n./run_unit_tests.sh\n\n# View detailed coverage report\nopen reports/coverage/index.html\n```\n\n*Last updated: 2025-10-09 14:08:26*\n\n---\n\n<!-- COVERAGE-BADGE:END -->\n\n## Description\n\n**Geek Cafe Services** is a production-ready, enterprise-grade library that provides reusable database services specifically designed for multi-tenant SaaS applications. Built on top of AWS DynamoDB, this library offers a prescriptive approach to building scalable, maintainable backend services with consistent patterns and best practices.\n\n### Why Geek Cafe Services?\n\n\ud83c\udfd7\ufe0f **Consistent Architecture**: All services follow the same proven patterns for CRUD operations, error handling, and access control  \n\ud83d\udd12 **Multi-Tenant by Design**: Built-in tenant isolation ensures secure data separation across customers  \n\u26a1 **DynamoDB Optimized**: Leverages DynamoDB's strengths with efficient GSI indexes and query patterns  \n\ud83d\udee1\ufe0f **Production Ready**: Comprehensive error handling, logging, pagination, and batch operations  \n\ud83e\uddea **Fully Tested**: 100% test coverage with comprehensive test suites for reliability  \n\ud83d\udcd6 **Well Documented**: Extensive documentation with practical examples and best practices  \n\n### Perfect For\n\n- **SaaS Applications** requiring multi-tenant data isolation\n- **Serverless Architectures** built on AWS Lambda and DynamoDB\n- **Teams** wanting consistent, proven patterns across services\n- **Rapid Development** with pre-built, tested service components\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/geekcafe/geek-cafe-services.git\ncd geek-cafe-services\n\n# Setup the development environment\n./pysetup.sh\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n## Quick Start\n\n```python\nfrom geek_cafe_services.message_service import MessageService\n\n# Initialize service\nservice = MessageService()\n\n# Create a message\nresult = service.create(\n    tenant_id=\"your_tenant\",\n    user_id=\"your_user\",\n    type=\"notification\",\n    content={\"title\": \"Welcome!\", \"body\": \"Thanks for joining us.\"}\n)\n\nif result.success:\n    print(f\"Created message: {result.data.id}\")\n```\n\n## Available Services\n\n### \ud83d\ude80 Lambda Handler Wrappers (NEW in v0.2.0)\n**Purpose**: Eliminate 70-80% of boilerplate code in AWS Lambda functions\n\n**Key Capabilities**:\n- \u2705 Automatic API key validation from environment\n- \u2705 Request body parsing and camelCase \u2192 snake_case conversion\n- \u2705 Service initialization with connection pooling for warm starts\n- \u2705 Built-in CORS and error handling\n- \u2705 User context extraction from authorizers\n- \u2705 Service injection for easy testing\n- \u2705 Support for public and secured endpoints\n\n**Available Handlers**:\n- `ApiKeyLambdaHandler` - API key validation (most common)\n- `PublicLambdaHandler` - No authentication (config endpoints)\n- `BaseLambdaHandler` - Extensible base for custom handlers\n\n**Quick Example**:\n```python\nfrom geek_cafe_services.lambda_handlers import ApiKeyLambdaHandler\nfrom geek_cafe_services.vote_service import VoteService\n\n# All boilerplate handled in 3 lines\nhandler = ApiKeyLambdaHandler(\n    service_class=VoteService,\n    require_body=True,\n    convert_case=True\n)\n\ndef lambda_handler(event, context):\n    return handler.execute(event, context, create_vote)\n\ndef create_vote(event, service, user_context):\n    # Just your business logic - everything else is handled!\n    payload = event[\"parsed_body\"]  # Already parsed & converted\n    return service.create_vote(\n        tenant_id=user_context.get(\"tenant_id\", \"anonymous\"),\n        user_id=user_context.get(\"user_id\", \"anonymous\"),\n        **payload\n    )\n```\n\n**Use Cases**: Any AWS Lambda function with API key auth, reducing code by 70-80% while maintaining all functionality\n\n\ud83d\udcd6 **[Complete Lambda Handlers Documentation](./docs/lambda_handlers.md)**\n\n### \ud83d\udce7 MessageService\n**Purpose**: Complete message and notification management system\n\n**Key Capabilities**:\n- \u2705 Full CRUD operations with tenant isolation\n- \u2705 Flexible JSON content storage for any message type\n- \u2705 Efficient querying by user, tenant, and message type\n- \u2705 Automatic audit trails and timestamps\n- \u2705 Built-in access control and validation\n\n**Use Cases**: User notifications, system alerts, communication logs, announcement management\n\n### \ud83d\uddf3\ufe0f Voting Services Suite\n**Purpose**: Complete voting and rating system with real-time aggregation\n\n**Architecture**: Three interconnected services working together:\n\n#### VoteService\n- \u2705 Individual vote management with automatic upsert behavior\n- \u2705 One vote per user per target enforcement\n- \u2705 Support for up/down votes or custom vote types\n- \u2705 Comprehensive querying by user, target, and tenant\n\n#### VoteSummaryService  \n- \u2705 Pre-calculated vote totals for instant retrieval\n- \u2705 Target-based optimization for high-performance lookups\n- \u2705 Metadata tracking (last tallied timestamp, vote counts)\n- \u2705 Tenant-scoped summary management\n\n#### VoteTallyService\n- \u2705 Intelligent vote aggregation with pagination support\n- \u2705 Batch processing for multiple targets\n- \u2705 Stale target detection and automated re-tallying\n- \u2705 Comprehensive error handling and resilience\n\n**Use Cases**: Product ratings, content voting, feedback systems, community polls, recommendation engines\n\n## Documentation\n\n\ud83d\udcd6 **[Complete Documentation](./docs/services_overview.md)**\n\n- **[DynamoDB Models](./docs/dynamodb_models.md)** - Model definition patterns and best practices\n- **[Services Pattern](./docs/services_pattern.md)** - Service layer architecture and CRUD operations\n- **[Lambda Handlers](./docs/lambda_handlers.md)** - \ud83c\udd95 Eliminate Lambda boilerplate (70-80% code reduction)\n- [Services Overview](./docs/services_overview.md) - Architecture and common patterns\n- [MessageService](./docs/message_service.md) - Message management API\n- [Voting Services](./docs/voting_services.md) - Complete voting system documentation\n- [A/B Testing Guide](./docs/ab_testing_guide.md) - Using voting services for A/B testing and experimentation\n- [Development Roadmap](./docs/roadmap.md) - Planned improvements and enhancements\n\n## Core Features\n\n### \ud83c\udfdb\ufe0f **Enterprise Architecture**\n- **Multi-Tenant by Design**: Complete tenant isolation with automatic access control\n- **Consistent Patterns**: All services follow identical CRUD interfaces and conventions\n- **Scalable Design**: Built for high-throughput, multi-customer SaaS applications\n\n### \ud83d\udd27 **Developer Experience**\n- **Type Safety**: Full Python type hints for better IDE support and fewer bugs\n- **Comprehensive Testing**: 100% test coverage with realistic test scenarios\n- **Rich Documentation**: Detailed API docs, examples, and best practices\n- **Easy Integration**: Simple initialization and consistent error handling\n\n### \u26a1 **Performance & Reliability**\n- **DynamoDB Optimized**: Efficient GSI indexes and query patterns for fast operations\n- **Pagination Support**: Handle large datasets without memory issues\n- **Batch Operations**: Process multiple items efficiently\n- **Error Resilience**: Graceful handling of partial failures and edge cases\n\n### \ud83d\udee1\ufe0f **Production Ready**\n- **Structured Logging**: AWS Lambda Powertools integration for observability\n- **Comprehensive Validation**: Input validation with detailed error messages  \n- **Access Control**: Automatic tenant and user-based security enforcement\n- **Audit Trails**: Complete tracking of who did what and when\n\n## Environment Setup\n\n```bash\n# Required environment variables\nexport DYNAMODB_TABLE_NAME=your_table_name\n\n# Optional AWS configuration (if not using IAM roles)\nexport AWS_REGION=us-east-1\nexport AWS_ACCESS_KEY_ID=your_access_key\nexport AWS_SECRET_ACCESS_KEY=your_secret_key\n```\n\n## Testing\n\n```bash\n# Run all tests\npytest tests/ -v\n\n# Run specific service tests\npytest tests/test_message_service.py -v\npytest tests/test_vote_*_service.py -v\n\n# Run with coverage\npytest tests/ --cov=geek_cafe_services --cov-report=html\n```\n\n## Project Structure\n\n```\ngeek-cafe-services/\n\u251c\u2500\u2500 src/geek_cafe_services/\n\u2502   \u251c\u2500\u2500 lambda_handlers/     # \ud83c\udd95 Lambda handler wrappers (v0.2.0)\n\u2502   \u2502   \u251c\u2500\u2500 base.py          # Base handler with common functionality\n\u2502   \u2502   \u251c\u2500\u2500 api_key_handler.py    # API key validation handler\n\u2502   \u2502   \u251c\u2500\u2500 public_handler.py     # Public (no auth) handler\n\u2502   \u2502   \u2514\u2500\u2500 service_pool.py       # Service connection pooling\n\u2502   \u251c\u2500\u2500 middleware/          # CORS, auth, error handling decorators\n\u2502   \u251c\u2500\u2500 utilities/           # Request/response helpers\n\u2502   \u251c\u2500\u2500 models/              # Data models with DynamoDB mapping\n\u2502   \u251c\u2500\u2500 *_service.py         # Service implementations\n\u2502   \u251c\u2500\u2500 database_service.py  # Base service class\n\u2502   \u2514\u2500\u2500 service_result.py    # Standardized response wrapper\n\u251c\u2500\u2500 tests/                   # Comprehensive test suite\n\u251c\u2500\u2500 docs/                    # Detailed documentation\n\u2502   \u2514\u2500\u2500 lambda_handlers.md   # \ud83c\udd95 Lambda wrapper documentation\n\u251c\u2500\u2500 examples/                # Working code examples\n\u2502   \u2514\u2500\u2500 lambda_handlers/     # \ud83c\udd95 Handler examples\n\u2514\u2500\u2500 README.md               # This file\n```\n\n## Contributing\n\nWe welcome contributions! Here's how to get started:\n\n1. **Fork the repository** and create a feature branch\n2. **Follow the existing patterns** - consistency is key\n3. **Add comprehensive tests** for any new functionality  \n4. **Update documentation** for API changes\n5. **Submit a Pull Request** with a clear description\n\n### Development Guidelines\n\n- Follow existing code style and patterns\n- Maintain 100% test coverage for new code\n- Update documentation for any API changes\n- Use meaningful commit messages\n- Test against multiple Python versions if possible\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\n- \ud83d\udcd6 **Documentation**: [Complete docs](./docs/services_overview.md)\n- \ud83d\udc1b **Bug Reports**: [GitHub Issues](https://github.com/geekcafe/geek-cafe-services/issues)\n- \ud83d\udca1 **Feature Requests**: [GitHub Discussions](https://github.com/geekcafe/geek-cafe-services/discussions)\n- \ud83d\udce7 **Questions**: Create an issue with the \"question\" label\n\n---\n\n**Built with \u2764\ufe0f for the SaaS development community**\n",
    "bugtrack_url": null,
    "license": "Geek Cafe Services Business Source License 1.0\n        \n        Copyright (c) 2025 Geek Cafe, LLC. All rights reserved.\n        \n        The \"Geek Cafe Services\" software (the \"Software\") is made available under this\n        Business Source License (the \"License\"). This License allows you to view,\n        study, and modify the source code, and to use it for personal, educational,\n        research, or non-commercial purposes, subject to the following terms.\n        \n        1. Grant of Rights\n           a. You may copy and modify the Software for your own personal,\n              educational, or internal development use.\n           b. You may not use the Software, or modified versions of it,\n              to provide any commercial service or product, including\n              software-as-a-service, consulting, hosting, or resale,\n              without a separate commercial license from Geek Cafe LLC.\n        \n        2. Change Date\n           Three (3) years from the date of first public release of a specific\n           version of the Software (the \u201cChange Date\u201d), that version will\n           automatically be made available under the Apache License 2.0.\n           Later versions may have different Change Dates.\n        \n        3. Attribution\n           All copies or substantial portions of the Software must retain this\n           License text, the copyright notice above, and a clear reference to\n           the original source repository (https://github.com/geekcafe/geek-cafe-services).\n        \n        4. Trademarks\n           The names \u201cGeek Cafe\u201d, \u201cGeek Cafe Services\u201d, and any related logos are\n           trademarks of Geek Cafe LLC and may not be used to endorse or promote\n           derivative products without prior written permission.\n        \n        5. Disclaimer of Warranty\n           THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND,\n           EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n           OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.\n        \n        6. Limitation of Liability\n           IN NO EVENT SHALL GEEK Cafe LLC OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM,\n           DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR\n           OTHERWISE, ARISING FROM OR IN CONNECTION WITH THE SOFTWARE OR ITS USE.\n        \n        ---\n        \n        For commercial licensing inquiries, contact:\n        legal@geekcafe.com",
    "summary": "Base Reusable Services for SaaS",
    "version": "0.4.4",
    "project_urls": {
        "Documentation": "https://github.com/geekcafe/geek-cafe-services/blob/main/README.md",
        "Homepage": "https://github.com/geekcafe/geek-cafe-services",
        "Source Code": "https://github.com/geekcafe/geek-cafe-services"
    },
    "split_keywords": [
        "api gateway",
        " aws",
        " dynamodb",
        " lambda",
        " saas",
        " serverless",
        " services"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e92bafa411a94bc515a015ff26a2bb45f6a8587436483c3536cc104197b7e2bd",
                "md5": "fc001583eed5f83bcf51dbeaa23c7bdf",
                "sha256": "e9d37b39d9a402d4f66e0e3e3bc0fcc1ac1ca5f3e0e2aa747e94057f65094718"
            },
            "downloads": -1,
            "filename": "geek_cafe_services-0.4.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fc001583eed5f83bcf51dbeaa23c7bdf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 118310,
            "upload_time": "2025-10-10T02:22:34",
            "upload_time_iso_8601": "2025-10-10T02:22:34.544701Z",
            "url": "https://files.pythonhosted.org/packages/e9/2b/afa411a94bc515a015ff26a2bb45f6a8587436483c3536cc104197b7e2bd/geek_cafe_services-0.4.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "585dc5e27d82843a428804d1ceb11e06488240d4b540718915f60b9fb1654489",
                "md5": "f4ab7ec34506f4bc8e9adcf97cc53f9d",
                "sha256": "fe60944479336c59e7d76b43dd2b90ab6e17f9b35b3c6be0726343fadc447390"
            },
            "downloads": -1,
            "filename": "geek_cafe_services-0.4.4.tar.gz",
            "has_sig": false,
            "md5_digest": "f4ab7ec34506f4bc8e9adcf97cc53f9d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 134858,
            "upload_time": "2025-10-10T02:22:36",
            "upload_time_iso_8601": "2025-10-10T02:22:36.365684Z",
            "url": "https://files.pythonhosted.org/packages/58/5d/c5e27d82843a428804d1ceb11e06488240d4b540718915f60b9fb1654489/geek_cafe_services-0.4.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-10 02:22:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "geekcafe",
    "github_project": "geek-cafe-services",
    "github_not_found": true,
    "lcname": "geek-cafe-services"
}
        
Elapsed time: 2.62864s