[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"workflow-asset-6291ce5e":3,"seo:featured-workflow:6291ce5e-4ea4-11f1-9bc6-00163e2b0d79:zh":83,"workflow-related-asset-6291ce5e-6291ce5e-4ea4-11f1-9bc6-00163e2b0d79":84},{"id":4,"uuid":5,"slug":6,"title":7,"description":8,"author_id":9,"author_name":10,"author_avatar":11,"token_estimate":12,"time_saved":12,"model_used":13,"fork_count":12,"vote_count":12,"view_count":12,"parent_id":12,"parent_uuid":13,"lang_type":14,"steps":15,"tags":22,"has_voted":28,"visibility":18,"share_token":13,"is_featured":12,"content_hash":29,"asset_kind":30,"target_tools":31,"install_mode":35,"entrypoint":19,"risk_profile":36,"dependencies":39,"verification":45,"agent_metadata":48,"agent_fit":61,"trust":71,"provenance":80,"created_at":82,"updated_at":82},3578,"6291ce5e-4ea4-11f1-9bc6-00163e2b0d79","asset-6291ce5e","Marvin — Lightweight AI Functions Framework for Python","Marvin by Prefect is a Python library that turns LLM capabilities into callable functions, providing type-safe AI-powered extraction, classification, and generation with minimal boilerplate using Pydantic models.","8a910e34-3180-11f1-9bc6-00163e2b0d79","Script Depot","https:\u002F\u002Ftokrepo.com\u002Fapple-touch-icon.png",0,"","en",[16],{"id":17,"step_order":18,"title":19,"description":13,"prompt_template":20,"variables":13,"depends_on":21,"expected_output":13},4138,1,"Marvin Overview","# Marvin — Lightweight AI Functions Framework for Python\n\n## Quick Use\n```bash\npip install marvin\nexport MARVIN_OPENAI_API_KEY=your-key\npython -c \"\nimport marvin\nresult = marvin.classify('The app crashed on startup', labels=['bug', 'feature', 'question'])\nprint(result)\n\"\n```\n\n## Introduction\nMarvin is a lightweight Python library from the Prefect team that wraps LLM calls behind clean, functional interfaces. Instead of writing prompts manually, you define the output type and let Marvin handle prompt construction, API calls, and response parsing, producing type-safe results validated by Pydantic.\n\n## What Marvin Does\n- Classifies text into predefined categories with a single function call\n- Extracts structured data from unstructured text into Pydantic models\n- Generates synthetic data matching a specified schema\n- Transforms text between formats (summarize, translate, rewrite)\n- Casts arbitrary inputs to target Python types using AI\n\n## Architecture Overview\nMarvin uses a decorator and function-based API where each AI operation is a Python function that constructs an appropriate prompt, sends it to an LLM, and parses the response into the declared return type. Under the hood, it leverages Pydantic for schema generation and validation, OpenAI function calling for structured output, and asyncio for concurrent operations. The prompt engineering is abstracted away entirely.\n\n## Self-Hosting & Configuration\n- Install from PyPI: `pip install marvin`\n- Set your OpenAI API key via environment variable\n- Optionally configure model, temperature, and other settings\n- Supports Azure OpenAI endpoints via configuration\n- Works with any OpenAI-compatible API by changing the base URL\n\n## Key Features\n- Type-safe AI outputs validated by Pydantic models\n- Single-function API for classify, extract, generate, and transform\n- Zero prompt engineering required for common patterns\n- Async support for high-throughput processing\n- Clean integration with existing Python codebases and type checkers\n\n## Comparison with Similar Tools\n- **Instructor** — structured outputs via patching the OpenAI client; Marvin provides higher-level task-specific functions\n- **LangChain** — full orchestration framework; Marvin is a lightweight functional library\n- **DSPy** — optimizes prompts programmatically; Marvin focuses on simple callable AI functions\n- **Outlines** — constrained generation with grammars; Marvin uses function calling for structured output\n\n## FAQ\n**Q: Does Marvin work with models other than OpenAI?**\nA: It supports any OpenAI-compatible API. Set the base URL to point to your preferred provider.\n\n**Q: How does Marvin handle errors in AI responses?**\nA: Pydantic validation catches malformed responses. Marvin retries with corrective context when parsing fails.\n\n**Q: Can I use Marvin for batch processing?**\nA: Yes, async functions allow processing many items concurrently.\n\n**Q: What is the difference between extract and cast?**\nA: Extract pulls structured information from text into a model. Cast converts a value to a target type using AI reasoning.\n\n## Sources\n- https:\u002F\u002Fgithub.com\u002FPrefectHQ\u002Fmarvin\n- https:\u002F\u002Fwww.askmarvin.ai","0",[23],{"id":24,"name":25,"slug":26,"icon":27},11,"Scripts","script","📜",false,"ec1e77976baf52c221f4b9d515b1ace1276686d287ae53a53fe0ffac486bdbfd","skill",[32,33,34],"claude_code","codex","gemini_cli","stage_only",{"executes_code":28,"modifies_global_config":28,"requires_secrets":37,"uses_absolute_paths":28,"network_access":28},[38],"MARVIN_OPENAI_API_KEY",{"npm":40,"pip":41,"brew":43,"system":44},[],[42],"marvin",[],[],{"commands":46,"expected_files":47},[],[19],{"asset_kind":30,"target_tools":49,"install_mode":35,"entrypoint":19,"risk_profile":50,"dependencies":52,"content_hash":29,"verification":57,"inferred":60},[32,33,34],{"executes_code":28,"modifies_global_config":28,"requires_secrets":51,"uses_absolute_paths":28,"network_access":28},[38],{"npm":53,"pip":54,"brew":55,"system":56},[],[42],[],[],{"commands":58,"expected_files":59},[],[19],true,{"target":33,"score":62,"status":35,"policy":35,"why":63,"asset_kind":30,"install_mode":35},29,[64,65,66,67,68,69,70],"target_tools includes codex","asset_kind skill","install_mode stage_only","policy stage_only","install_mode is stage_only","risk_profile.requires_secrets is not empty","trust established",{"author_trust_level":72,"verified_publisher":28,"asset_signed_hash":29,"signature_status":73,"install_count":12,"report_count":12,"dangerous_capability_badges":74,"review_status":76,"signals":77},"established","hash_only",[75,35],"requires_secrets","unreviewed",[78,79],"author has published assets","content hash available",{"owner_uuid":9,"owner_name":10,"source_url":81,"content_hash":29,"visibility":18,"created_at":82,"updated_at":82},"https:\u002F\u002Ftokrepo.com\u002Fen\u002Fworkflows\u002Fasset-6291ce5e","2026-05-13 16:18:56",null,[85,147,200,247],{"id":86,"uuid":87,"slug":88,"title":89,"description":90,"author_id":9,"author_name":10,"author_avatar":11,"token_estimate":12,"time_saved":12,"model_used":13,"fork_count":12,"vote_count":12,"view_count":91,"parent_id":12,"parent_uuid":13,"lang_type":14,"steps":92,"tags":93,"has_voted":28,"visibility":18,"share_token":13,"is_featured":12,"content_hash":95,"asset_kind":30,"target_tools":96,"install_mode":97,"entrypoint":98,"risk_profile":99,"dependencies":101,"verification":106,"agent_metadata":109,"agent_fit":121,"trust":130,"provenance":135,"created_at":137,"updated_at":138,"__relatedScore":139,"__relatedReasons":140,"__sharedTags":145},2300,"f34ab900-42fe-11f1-9bc6-00163e2b0d79","feathers-lightweight-real-time-api-framework-node-js-f34ab900","Feathers — Lightweight Real-Time API Framework for Node.js","Feathers is a lightweight web framework for building real-time applications and REST APIs with Node.js. It provides a service-oriented architecture that works with Express, Koa, or its own HTTP transport.",160,[],[94],{"id":24,"name":25,"slug":26,"icon":27},"b4722982610e0e5dd2dfa06cfd8c19c94b16c5d68656da48ff339bd105f4abd4",[32,33,34],"single","Feathers Overview",{"executes_code":28,"modifies_global_config":28,"requires_secrets":100,"uses_absolute_paths":28,"network_access":28},[],{"npm":102,"pip":103,"brew":104,"system":105},[],[],[],[],{"commands":107,"expected_files":108},[],[98],{"asset_kind":30,"target_tools":110,"install_mode":97,"entrypoint":98,"risk_profile":111,"dependencies":113,"content_hash":95,"verification":118},[32,33,34],{"executes_code":28,"modifies_global_config":28,"requires_secrets":112,"uses_absolute_paths":28,"network_access":28},[],{"npm":114,"pip":115,"brew":116,"system":117},[],[],[],[],{"commands":119,"expected_files":120},[],[98],{"target":33,"score":122,"status":123,"policy":124,"why":125,"asset_kind":30,"install_mode":97},98,"native","allow",[64,65,126,127,128,129,70],"install_mode single","markdown-only","policy allow","safe markdown-only Codex install",{"author_trust_level":72,"verified_publisher":28,"asset_signed_hash":95,"signature_status":73,"install_count":12,"report_count":12,"dangerous_capability_badges":131,"review_status":76,"signals":132},[],[133,78,79,134],"asset has usage views","no dangerous capability badges",{"owner_uuid":9,"owner_name":10,"source_url":136,"content_hash":95,"visibility":18,"created_at":137,"updated_at":138},"https:\u002F\u002Ftokrepo.com\u002Fen\u002Fworkflows\u002Ffeathers-lightweight-real-time-api-framework-node-js-f34ab900","2026-04-28 20:36:59","2026-05-13 12:25:24",99.31023881404778,[141,142,143,144],"topic-match","same-kind","same-target","same-author",[26,146],"scripts",{"id":148,"uuid":149,"slug":150,"title":151,"description":152,"author_id":9,"author_name":10,"author_avatar":11,"token_estimate":12,"time_saved":12,"model_used":13,"fork_count":12,"vote_count":12,"view_count":153,"parent_id":12,"parent_uuid":13,"lang_type":14,"steps":154,"tags":155,"has_voted":28,"visibility":18,"share_token":13,"is_featured":12,"content_hash":157,"asset_kind":30,"target_tools":158,"install_mode":97,"entrypoint":159,"risk_profile":160,"dependencies":162,"verification":167,"agent_metadata":170,"agent_fit":182,"trust":189,"provenance":193,"created_at":195,"updated_at":196,"__relatedScore":197,"__relatedReasons":198,"__sharedTags":199},2382,"a7398c2b-4409-11f1-9bc6-00163e2b0d79","peewee-lightweight-python-orm-sqlite-mysql-postgresql-a7398c2b","Peewee — Lightweight Python ORM for SQLite, MySQL and PostgreSQL","Peewee is a small expressive Python ORM that provides an intuitive API for interacting with SQLite, MySQL, and PostgreSQL databases with minimal overhead and a tiny footprint.",113,[],[156],{"id":24,"name":25,"slug":26,"icon":27},"4388b4e937323e12dd6aa6f63236eb2784962972355803cea2d89d8f9bad3815",[32,33,34],"Peewee",{"executes_code":28,"modifies_global_config":28,"requires_secrets":161,"uses_absolute_paths":28,"network_access":60},[],{"npm":163,"pip":164,"brew":165,"system":166},[],[],[],[],{"commands":168,"expected_files":169},[],[159],{"asset_kind":30,"target_tools":171,"install_mode":97,"entrypoint":159,"risk_profile":172,"dependencies":174,"content_hash":157,"verification":179},[32,33,34],{"executes_code":28,"modifies_global_config":28,"requires_secrets":173,"uses_absolute_paths":28,"network_access":60},[],{"npm":175,"pip":176,"brew":177,"system":178},[],[],[],[],{"commands":180,"expected_files":181},[],[159],{"target":33,"score":183,"status":184,"policy":185,"why":186,"asset_kind":30,"install_mode":97},64,"needs_confirmation","confirm",[64,65,126,187,188,70],"policy confirm","risk_profile.network_access is true",{"author_trust_level":72,"verified_publisher":28,"asset_signed_hash":157,"signature_status":73,"install_count":12,"report_count":12,"dangerous_capability_badges":190,"review_status":76,"signals":192},[191],"network_access",[133,78,79],{"owner_uuid":9,"owner_name":10,"source_url":194,"content_hash":157,"visibility":18,"created_at":195,"updated_at":196},"https:\u002F\u002Ftokrepo.com\u002Fen\u002Fworkflows\u002Fpeewee-lightweight-python-orm-sqlite-mysql-postgresql-a7398c2b","2026-04-30 04:26:07","2026-05-13 04:09:30",96.0853572770047,[141,142,143,144],[26,146],{"id":201,"uuid":202,"slug":203,"title":204,"description":205,"author_id":9,"author_name":10,"author_avatar":11,"token_estimate":12,"time_saved":12,"model_used":13,"fork_count":12,"vote_count":12,"view_count":206,"parent_id":12,"parent_uuid":13,"lang_type":14,"steps":207,"tags":208,"has_voted":28,"visibility":18,"share_token":13,"is_featured":12,"content_hash":210,"asset_kind":30,"target_tools":211,"install_mode":97,"entrypoint":212,"risk_profile":213,"dependencies":215,"verification":220,"agent_metadata":223,"agent_fit":235,"trust":237,"provenance":240,"created_at":242,"updated_at":243,"__relatedScore":244,"__relatedReasons":245,"__sharedTags":246},2412,"669124d3-4492-11f1-9bc6-00163e2b0d79","micronaut-lightweight-jvm-framework-microservices-669124d3","Micronaut — Lightweight JVM Framework for Microservices","Micronaut is a modern JVM framework for building modular, testable microservices and serverless applications with ahead-of-time compilation and minimal startup time.",111,[],[209],{"id":24,"name":25,"slug":26,"icon":27},"c190feb201d7db5720112f7a67e5311032c01f6e06c23a242f5ffa84adf9c65a",[32,33,34],"Micronaut Overview",{"executes_code":28,"modifies_global_config":28,"requires_secrets":214,"uses_absolute_paths":28,"network_access":28},[],{"npm":216,"pip":217,"brew":218,"system":219},[],[],[],[],{"commands":221,"expected_files":222},[],[212],{"asset_kind":30,"target_tools":224,"install_mode":97,"entrypoint":212,"risk_profile":225,"dependencies":227,"content_hash":210,"verification":232},[32,33,34],{"executes_code":28,"modifies_global_config":28,"requires_secrets":226,"uses_absolute_paths":28,"network_access":28},[],{"npm":228,"pip":229,"brew":230,"system":231},[],[],[],[],{"commands":233,"expected_files":234},[],[212],{"target":33,"score":122,"status":123,"policy":124,"why":236,"asset_kind":30,"install_mode":97},[64,65,126,127,128,129,70],{"author_trust_level":72,"verified_publisher":28,"asset_signed_hash":210,"signature_status":73,"install_count":12,"report_count":12,"dangerous_capability_badges":238,"review_status":76,"signals":239},[],[133,78,79,134],{"owner_uuid":9,"owner_name":10,"source_url":241,"content_hash":210,"visibility":18,"created_at":242,"updated_at":243},"https:\u002F\u002Ftokrepo.com\u002Fen\u002Fworkflows\u002Fmicronaut-lightweight-jvm-framework-microservices-669124d3","2026-04-30 20:45:00","2026-05-13 13:47:37",96.07382703400528,[141,142,143,144],[26,146],{"id":248,"uuid":249,"slug":250,"title":251,"description":252,"author_id":9,"author_name":10,"author_avatar":11,"token_estimate":12,"time_saved":12,"model_used":13,"fork_count":12,"vote_count":12,"view_count":253,"parent_id":12,"parent_uuid":13,"lang_type":14,"steps":254,"tags":255,"has_voted":28,"visibility":18,"share_token":13,"is_featured":12,"content_hash":257,"asset_kind":30,"target_tools":258,"install_mode":97,"entrypoint":259,"risk_profile":260,"dependencies":262,"verification":267,"agent_metadata":270,"agent_fit":282,"trust":284,"provenance":287,"created_at":289,"updated_at":290,"__relatedScore":291,"__relatedReasons":292,"__sharedTags":293},2350,"2d2e9eaa-43a5-11f1-9bc6-00163e2b0d79","numba-jit-compiler-makes-python-code-run-c-speed-2d2e9eaa","Numba — JIT Compiler That Makes Python Code Run at C Speed","Numba is an open-source JIT compiler that translates Python and NumPy code into fast machine code using LLVM. It accelerates numerical functions by orders of magnitude with minimal code changes.",142,[],[256],{"id":24,"name":25,"slug":26,"icon":27},"556611ed3a5f6827512e10951adde2af5d3266517d08220cfe8bc028d85a5400",[32,33,34],"Numba",{"executes_code":28,"modifies_global_config":28,"requires_secrets":261,"uses_absolute_paths":28,"network_access":28},[],{"npm":263,"pip":264,"brew":265,"system":266},[],[],[],[],{"commands":268,"expected_files":269},[],[259],{"asset_kind":30,"target_tools":271,"install_mode":97,"entrypoint":259,"risk_profile":272,"dependencies":274,"content_hash":257,"verification":279},[32,33,34],{"executes_code":28,"modifies_global_config":28,"requires_secrets":273,"uses_absolute_paths":28,"network_access":28},[],{"npm":275,"pip":276,"brew":277,"system":278},[],[],[],[],{"commands":280,"expected_files":281},[],[259],{"target":33,"score":122,"status":123,"policy":124,"why":283,"asset_kind":30,"install_mode":97},[64,65,126,127,128,129,70],{"author_trust_level":72,"verified_publisher":28,"asset_signed_hash":257,"signature_status":73,"install_count":12,"report_count":12,"dangerous_capability_badges":285,"review_status":76,"signals":286},[],[133,78,79,134],{"owner_uuid":9,"owner_name":10,"source_url":288,"content_hash":257,"visibility":18,"created_at":289,"updated_at":290},"https:\u002F\u002Ftokrepo.com\u002Fen\u002Fworkflows\u002Fnumba-jit-compiler-makes-python-code-run-c-speed-2d2e9eaa","2026-04-29 16:26:53","2026-05-13 01:30:59",91.23300405619759,[141,142,143,144],[26,146]]