# 🍬 candy-ai

**candy** is a Python client for **cedric-8EF**, a powerful multi-personality AI engine.  
Import the personality you need, ask your question — it's that simple.

---

## Installation

```bash
pip install candy-ai
```

---

## Quick Start

```python
from candy import Coding

response = Coding.ask("Write a binary search in Python")
print(response)
```

```python
from candy import Math, Reflexion

# Math
solution = Math.ask("Solve: integral of x^2 * sin(x) dx")
print(solution)

# Reflexion
insight = Reflexion.ask("Is free will compatible with determinism?")
print(insight)
```

---

## Streaming

```python
from candy import Writing

for token in Writing.stream("Write a short story about a lighthouse keeper"):
    print(token, end="", flush=True)
```

---

## Context support

Pass extra data alongside your prompt:

```python
from candy import Analytic

data = """
Month,Revenue
Jan,12000
Feb,15400
Mar,9800
Apr,18200
"""

response = Analytic.ask("What trend do you see?", context=data)
print(response)
```

---

## Combining multiple personalities

```python
from candy import Coding, Debugger, Reviewer

code = Coding.ask("Write a REST API client in Python")
bugs = Debugger.ask("Find issues in this code", context=code)
review = Reviewer.ask("Review this code for best practices", context=code)
```

---

## Check your quota

```python
from candy import Math

print(Math.quota())
# {'ip': '...', 'quota_used_today': 12, 'quota_limit': 500, 'quota_remaining': 488}
```

---

## Available personalities (50)

| Import | Domain |
|--------|--------|
| `Math` | Mathematics |
| `Coding` | Software engineering |
| `Reflexion` | Deep thinking & philosophy |
| `Analytic` | Data analysis |
| `Full` | All domains combined |
| `Science` | Multi-disciplinary science |
| `Writing` | Creative & technical writing |
| `History` | World history |
| `Law` | Legal concepts |
| `Medicine` | Medical knowledge |
| `Finance` | Finance & investment |
| `Marketing` | Growth & marketing |
| `Security` | Cybersecurity |
| `Design` | UI/UX & graphic design |
| `Language` | Translation & linguistics |
| `Psychology` | Human behavior |
| `Education` | Pedagogy & teaching |
| `Research` | Academic research |
| `Business` | Strategy & consulting |
| `Productivity` | Efficiency & systems |
| `Cooking` | Recipes & nutrition |
| `Travel` | Trip planning |
| `Music` | Music theory & production |
| `Film` | Cinema & screenwriting |
| `Sports` | Sports analysis & coaching |
| `Philosophy` | Ethics & metaphysics |
| `Environment` | Ecology & sustainability |
| `Architecture` | Building & urban design |
| `Automotive` | Vehicles & mechanics |
| `Astronomy` | Astrophysics & space |
| `Biology` | Life sciences |
| `Chemistry` | Chemical science |
| `Physics` | Classical & quantum physics |
| `Engineering` | Multi-discipline engineering |
| `Entrepreneur` | Startups & ventures |
| `Ethics` | Applied moral philosophy |
| `Geopolitics` | International relations |
| `Crypto` | Blockchain & DeFi |
| `AI` | Machine learning & AI |
| `DevOps` | Cloud & infrastructure |
| `Database` | DB design & optimization |
| `GameDev` | Game development |
| `Comic` | Humor & comedy writing |
| `Storyteller` | Narrative & fiction |
| `Translator` | Professional translation |
| `Summarizer` | Content summarization |
| `Debugger` | Bug finding & fixing |
| `Reviewer` | Code & content review |
| `Planner` | Project planning |
| `Tutor` | Adaptive teaching |

---

## Powered by cedric-8EF

candy connects to the **cedric-8EF** engine.  
Usage is subject to a daily quota (500 requests/day by default).  
API availability depends on the engine being online.

---

## License

MIT
