Metadata-Version: 2.4
Name: trendsagi
Version: 0.8.0
Summary: Python utilities for TrendsAGI ad-platform execution helpers and scaffolding.
Author-email: TrendsAGI <contact@trendsagi.com>
License: MIT License
        
        Copyright (c) [2025] [TrendsAGI]
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        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. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/TrendsAGI/TrendsAGI
Project-URL: Bug Tracker, https://github.com/TrendsAGI/TrendsAGI/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28.0
Requires-Dist: pydantic>=2.0
Dynamic: license-file

# TrendsAGI Python Utilities

[![PyPI Version](https://img.shields.io/pypi/v/trendsagi.svg)](https://pypi.org/project/trendsagi/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python Versions](https://img.shields.io/pypi/pyversions/trendsagi.svg)](https://pypi.org/project/trendsagi/)

## About

`trendsagi` provides:

- ad-platform execution helpers for Google, Meta, TikTok, and LinkedIn
- deterministic idempotency-key generation
- scaffold commands for Docker and Terraform templates

This package does not include a TrendsAGI HTTP API client.

## Installation

```bash
pip install trendsagi
```

## Quick Start

```python
from trendsagi import AIInsight
from trendsagi.integrations import GoogleAdsExecutor

insight = AIInsight.model_validate(
    {
        "trend_id": 123,
        "key_themes": ["running shoes", "marathon prep"],
        "audience_injection": {
            "interest_keywords": ["running shoes"],
            "negative_keywords": ["cheap"],
            "demographics": {"regions": ["US"]},
        },
    }
)

google = GoogleAdsExecutor(
    {
        "access_token": "YOUR_ACCESS_TOKEN",
        "developer_token": "YOUR_DEVELOPER_TOKEN",
    }
)

result = google.apply_targeting(
    insight,
    customer_id="1234567890",
    campaign_id="9876543210",
    dry_run=True,
)

print(result.idempotency_key)
```

## CLI Scaffolder

```bash
trendsagi scaffold --type docker --output-dir ./runner
trendsagi scaffold --type terraform --output-dir ./infra
```
