Current collected state Current
Observed since 21 Oct, 10:45 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Django AI Services Framework — DB-driven LLM provider, model & usage management
DB-driven LLM provider, model & usage management for Django projects.
pip install aifw
# settings.py
INSTALLED_APPS = [
...
"aifw",
]
# Run migrations
python manage.py migrate aifw
# Use in views, tasks, management commands
from aifw.service import sync_completion, LLMResult
result: LLMResult = sync_completion(
action_code="story_writing",
messages=[{"role": "user", "content": "Write a short story about a dragon."}],
)
if result.success:
print(result.content)
completion() (async), sync_completion() (sync), completion_with_fallback()LLMProvider — provider config (API key env var, base URL)LLMModel — model config (max tokens, cost per million tokens)AIActionType — action → model mapping with fallbackAIUsageLog — token/cost/latency tracking per requestpython manage.py init_llm_config # seed default providers & models
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.5.0Yanked | 2 Mar 2026 | 8 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 10:45 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:d69bc85c4ecabd303c8c7fc973df7f6f224f2b74bb93f482b9782b6ebeeed99b