Magentic
github.com · Package · Active
Use LLMs as ordinary Python functions with typed outputs
- AI & agents
- Package
- Python
- Day-7 check
- Day-30 check
- Stars
- 2.4k
- Forks
- 134
- Open issues
- 45
- Last commit
- Releases
- 65
- Found
- 3 years ago
GitHub figures as of . They are context, not a ranking.
Magentic is a Python package where function signatures define LLM queries, and the output is parsed according to the return type annotation. It lets developers mix regular code with LLM calls, including structured and streamed results, which suits people who want LLMs to fit into ordinary Python programs.
Repository description on GitHub: “Seamlessly integrate LLMs as Python functions”
What it does
- @prompt and @chatprompt decorators turn functions into LLM calls
- Structured outputs from pydantic models and built-in types
- Streaming of structured outputs and function calls
- Configurable for OpenAI, Anthropic and Ollama
Good for
- Write a Python function that returns a typed object from an LLM
- Stream a list of structured objects while the model is still generating
Suits: Python developers who want LLMs inside ordinary code.
What you can try
Read the README on GitHub and install the package.
Install
pip install magenticTaken from the project’s README. Read the project’s own instructions before running anything.
Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.
Found vs. released
Kip first saw Magentic on , when jackmpcollins posted it to Show HN. The oldest published release on GitHub is v0.1.0, dated . Magentic had been shipping tagged releases for 73 days before it was found. 65 releases have been published in total; the latest is v0.41.1 ().
Day-7 and day-30 updates
Day 7 1 release shipped
- 1 release in the first 7 days: v0.7.0 (2 Oct 2023)
- Show HN discussion at check time: 283 points, 63 comments. API record
Checked , later than day 7 because tracking began after.
Day 30 3 releases shipped
- 3 releases in the first 30 days: v0.7.0 (2 Oct 2023), v0.7.1 (8 Oct 2023), v0.7.2 (14 Oct 2023)
- Show HN discussion at check time: 283 points, 63 comments. API record
Checked , later than day 30 because tracking began after.
Release timeline every entry links to its source
- Repository created on GitHub: jackmpcollins/magentic
- Release v0.1.0
- Found: jackmpcollins posted it to Show HN. Show HN
- Release v0.39.1
- Release v0.39.2
- Release v0.39.3
- Release v0.40.0
- Release v0.41.0
- Release v0.41.1
- Day-7 check recorded by Kip (details)
- Day-30 check recorded by Kip (details)
Showing the first and the 6 latest of 65 releases. All releases on GitHub
Quick answers
- When was Magentic released?
- Its first tagged release on GitHub is dated 15 Jul 2023. Kip found it on Show HN on 26 Sep 2023.
- Is Magentic open source?
- Its source is public on GitHub at jackmpcollins/magentic under the MIT licence.
- What does Magentic run on?
- Library.
- Is Magentic free?
- It is open source, so the code is free to read and run; check the licence for terms.
- Is Magentic still maintained?
- Yes. It had a commit or release in the last 90 days as of the latest check.
Provenance
| Source | Record | Last checked |
|---|---|---|
| Show HN | listing official API record | |
| GitHub repository | jackmpcollins/magentic REST API record | |
| GitHub Releases | release list REST API record |
Stable ID hn-37661767. Summary drafted with AI from the source records above and checked against KipFound’s rules before publishing. Dates and release facts come only from those records.
Share
Similar tools
Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.