🍬 candy-ai v21
Framework IA Python professionnel — Cedric8-Thinking Engine
pip install candy-ai
🆕 Nouveautés v21
🧠 AutoMemory — Mémoire inter-sessions
from candy import AutoMemory, Coding
AutoMemory.enable()
chat = Coding.chat()
chat.say("Je préfère toujours des réponses en français")
chat.say("Je travaille sur un projet FastAPI avec Python 3.12")
# La prochaine session, candy s'en souvient automatiquement
chat2 = Coding.chat()
print(AutoMemory.summary())
AutoMemory.remember("Mon stack : React + FastAPI + PostgreSQL")
AutoMemory.forget() # tout effacer
AutoMemory.disable()
🔀 Compare — Même prompt, plusieurs personnalités
from candy import Compare, Coding, Security, Reviewer
result = Compare(Coding, Security, Reviewer).ask("Comment sécuriser une API REST ?")
result.show() # affichage formaté
print(result["coding"])
name, resp = result.best() # la plus longue
md = result.to_markdown()
# Async — toutes en parallèle
import asyncio
result = asyncio.run(Compare(Coding, Security).ask_async("..."))
📝 stream_to_file — Génération longue sans saturer la RAM
from candy import Writing, Coding
Writing.stream_to_file(
"roman.txt",
"Écris un roman de science-fiction de 5000 mots",
show_progress=True
)
# → [candy] ✓ 24,831 chars → roman.txt (18.3s)
Coding.stream_to_file("api.py", "Génère une API REST complète avec FastAPI")
Writing.stream_to_file("journal.txt", "Entrée du jour...", append=True)
📋 CandyLogger — Logs structurés JSON
from candy import CandyLogger, Coding
CandyLogger.enable() # ~/.candy/logs/candy.jsonl
Coding.ask("Write a sort") # loggué automatiquement
CandyLogger.tail(n=10)
print(CandyLogger.stats())
# → {"total_calls": 42, "avg_latency_ms": 312, "top_personality": "coding"}
logs = CandyLogger.read(last_n=50, personality="coding")
CandyLogger.clear()
🎨 ImageGen — Animate, StyleTransfer, CompareStyles
from candy import ImageGen
ImageGen.animate("un chat qui saute sur la lune", frames=8, save="anim.gif")
ImageGen.style_transfer(
"mon_portrait.jpg",
"van_gogh.jpg",
strength=0.8,
save="portrait_van_gogh.png"
)
ImageGen.compare_styles("un château médiéval", save_dir="./styles/")
# → styles/default.png, styles/anime.png, styles/painting.png ...
🖥️ CLI — candy logs
candy logs # 10 derniers appels
candy logs --n 50 # 50 derniers
candy logs --stats # statistiques
candy logs --clear # vider
Fonctionnalités v20 (toutes conservées)
Async, Mix, Chain, Retry, Cache offline, Conversation+ (titre, compression, export MD), ImageGen Edit/Upscale, CLI doctor/update.
Quick Start
from candy import Coding
print(Coding.ask("Write a binary search in Python"))
Streaming
for token in Writing.stream("Raconte une histoire"):
print(token, end="", flush=True)
120 personnalités disponibles
Math, Coding, Writing, Medicine, Law, Finance, Security, Design, Psychology, Education, Research, Business, Cooking, Travel, Music, Film, Philosophy, Engineering, Crypto, AI, DevOps, Screenwriting, Comics, Animation, DataScience, Neuroscience, Trading, MentalHealth, Fitness, Sustainability... et 90 autres.
Powered by Cedric8-Thinking · MIT License
Metadata
Release files for candy-ai 21.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| candy_ai-21.0.0.tar.gz | 67.7 kB | Without provenance | Details for candy_ai-21.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| candy_ai-21.0.0-py3-none-any.whl | Python 3 | none | any | Details for candy_ai-21.0.0-py3-none-any.whl |
Total release size: 167.3 kB
Release files / candy_ai-21.0.0.tar.gz
| Download URL | candy_ai-21.0.0.tar.gz |
|---|---|
| Size | 67.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
219e2dca99d82f949a98c957cf5b5878886ac734575beafbab9469703be73d18
|
|
BLAKE2b-256 checksum How to use checksums |
caae961d9e1b703313eea3a2eb03e78a86d86c1b4658c571fa063f6db8e5cf89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / candy_ai-21.0.0-py3-none-any.whl
| Download URL | candy_ai-21.0.0-py3-none-any.whl |
|---|---|
| Size | 99.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ea59de7b57f64ff1e209b63d967592ed857d7ba3c581a6ecfc66386339f0e82
|
|
BLAKE2b-256 checksum How to use checksums |
59dea945c3248dd793cd5c2334792453f0371f13b89b7966e455b79aceb0bb88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Security for candy-ai 21.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.