Metadata-Version: 2.4
Name: startuped-ai
Version: 1.0.1
Summary: Official Startuped.AI Python SDK — CRM, agents, and credits over the Startuped REST API
Author-email: "Startuped.AI" <ankit@startuped.ai>
License-Expression: MIT
Project-URL: Homepage, https://www.startuped.ai
Project-URL: Documentation, https://www.startuped.ai/docs
Project-URL: Repository, https://github.com/startuped-ai/startuped-sdk/tree/main/packages/python
Project-URL: Issues, https://github.com/startuped-ai/startuped-sdk/issues
Keywords: startuped,startuped-ai,startuped.ai,sdk,crm,agents,leads,deals
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Official Startuped.AI Python SDK

Official Python client for the [Startuped.AI](https://www.startuped.ai) REST API (`sk_` API keys).

**Version:** 1.0.0 · **PyPI:** `startuped-ai` · **Import:** `startuped`  
API surface matches Node [`@startuped-ai/sdk`](../startuped) (v1.0.3).

## Install

```bash
pip install startuped-ai
```

## Quick start

```python
from startuped import Startuped

client = Startuped(
    api_key="sk_…",  # from https://www.startuped.ai/api-keys
    # base_url="https://www.startuped.ai",  # default
    # tenant_id="startuped",                # optional
)

# Auth
client.auth.validate()

# CRM
client.leads.create({"firstName": "Ada", "email": "ada@example.com"})
client.leads.search({"search": "ada", "limit": 10})
client.deals.create({"name": "Acme deal", "company": "Acme", "amount": 5000})
client.deals.search({"stage": "Prospect"})
client.accounts.search({"search": "Acme"})
client.contacts.create({"firstName": "Ada", "email": "ada@example.com"})
client.tasks.create({"title": "Follow up", "status": "todo"})
client.tasks.list({"status": "todo"})

# Credits & agents (read-only agents for now)
client.credits.status()
client.agents.list()
client.agents.status("<agentId>")
```

## Modules

| Resource | Methods |
|----------|---------|
| `auth` | `validate()` |
| `leads` | `create`, `get`, `update`, `search`, `list` |
| `deals` | `create`, `get`, `update`, `search`, `list` |
| `accounts` | `get`, `search`, `list` |
| `contacts` | `create`, `search`, `list` |
| `tasks` | `create`, `list`, `update` |
| `credits` | `status` |
| `agents` | `list`, `status` |

Errors raise `StartupedError` with `status` and `body`.

## API keys & permissions

Create a key at [startuped.ai/api-keys](https://www.startuped.ai/api-keys). Newer keys include CRM/agent scopes. Regenerate older keys if new methods return a permission error.

Use the **canonical** host (`https://www.startuped.ai`) so redirects do not strip `Authorization`.

## Related

- Node SDK: `npm install @startuped-ai/sdk`
- REST docs: https://www.startuped.ai/docs
- MCP (Claude / agents): Cloudflare Worker + `mcp/` in the monorepo

## Develop & publish

From this directory (does **not** affect the Node package or the Next.js app):

```bash
cd packages/startuped-python
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
pip install --upgrade build twine

python -m build
python -m twine check dist/*

# Dry run
python -m twine upload --repository testpypi dist/*

# Production (version must be new; PyPI never overwrites)
python -m twine upload dist/*
```

CLI help:

```bash
startuped-ai --help
```
