Metadata-Version: 2.4
Name: chartlibrary
Version: 0.2.0
Summary: Chart Library Python SDK — the stock market memory for AI agents
Home-page: https://chartlibrary.io/developers
Author: Chart Library
Author-email: graham@chartlibrary.io
Project-URL: Documentation, https://chartlibrary.io/api/docs
Project-URL: Source, https://github.com/grahammccain/chart-library
Keywords: chart patterns,stock analysis,AI agent,trading API,MCP
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.20
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Chart Library Python SDK

Pattern intelligence for AI agents. Search 24 million historical chart patterns and see what happened next.

## Install

```bash
pip install chartlibrary
```

## Quick Start

```python
from chartlibrary import ChartLibrary

cl = ChartLibrary(api_key="cl_your_key")  # or set CHART_LIBRARY_KEY env var

# One call â€” full intelligence
intel = cl.intelligence("NVDA")
print(f"Top match: {intel['matches'][0]['symbol']} {intel['matches'][0]['date']}")
print(f"5-day outlook: {intel['follow_through']['horizon_returns']['5']}")
print(f"Market regime: {intel['regime']['spy_summary'][:100]}...")

# Market regime snapshot
regime = cl.regime()
for sym, data in regime["regime"].items():
    print(f"{sym}: {data['avg_10d']:+.1f}% 10d outlook")

# Pattern search
results = cl.search("AAPL 2024-06-15")
for match in results["results"][:5]:
    print(f"  {match['symbol']} {match['date']} â€” {match['match_score']}%")
```

## Endpoints

| Method | What it does |
|--------|-------------|
| `cl.intelligence(symbol)` | One-call full picture (matches + regime + summary) |
| `cl.regime()` | Market-wide regime snapshot (SPY + QQQ + 11 sectors) |
| `cl.regime_detail(symbol)` | Detailed regime analysis with overlay data |
| `cl.search(query)` | Pattern similarity search |
| `cl.analyze(query)` | Search + follow-through + summary |
| `cl.discover()` | Daily top patterns |
| `cl.status()` | Database stats |

## Free API Key

Get one at [chartlibrary.io/developers](https://chartlibrary.io/developers) â€” 200 calls/day, no credit card.
