DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to use Py Idp: what you can do with it

What is Py Idp? py-idp is an open-source Python library for intelligent document processing that uses LLM backends and Pydantic schemas to pull structured fields out of documents.

How do I use it? Run pip install py-idp to install the core package. No API key is needed for this step; then Place invoice.pdf in the current directory and run python examples/00_zero_to_extraction.py to see extracted fields from the mock backend; run export OPENAI_API_KEY=... with your own key. Full steps below.

Trended earlier

View repo on GitHub

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer

4 use cases

  • Extract invoice fields into a validated schema

    Turn invoice PDFs into Pydantic-validated fields using one pipeline call or one CLI command.

    View prompt
    Using the py-idp repo, run the idp CLI on <path to invoice PDF> with --schema Invoice and --backend openai, then print the extracted fields. Verify that the output is a dict whose keys match the Invoice schema fields and that no validation errors are reported.
  • Route low-confidence fields to a human reviewer

    Send fields below the confidence threshold to a Streamlit review screen and save the corrections.

    View prompt
    In the py-idp repo, run one document through the pipeline and find which fields fall below the confidence threshold. Use the Streamlit HITL review screen to correct them, then confirm the corrections are saved in storage. Report the list of corrected fields.
  • Measure extraction accuracy with the eval harness

    Score a backend on field F1 and schema-valid rate before you trust it in production.

    View prompt
    In the py-idp repo, run `idp eval` on the labeled set at <path to eval data> using the <backend name> backend. Output the field F1 and schema-valid rate per field. Verify that the report lists every schema field.
  • Serve document extraction through a FastAPI endpoint

    Run the production FastAPI server so other systems can send documents and get fields back.

    View prompt
    In the py-idp repo, start the FastAPI server with `idp serve`, then send <path to document> to the /extract endpoint. Return the JSON response. Verify that /healthz returns a healthy status before you send the document.

Quick start with Py Idp

  1. Check you have what it needs: Python with pip available; An API key for a hosted LLM backend such as OpenAI, or a local backend such as Ollama (the zero-config path runs on the in-tree mock backend without a key); A sample PDF or text file to test with, such as invoice.pdf.
  2. Open rollroyces/py-idp on GitHub and read the README and license.
  3. Run pip install py-idp to install the core package. No API key is needed for this step.
  4. Place invoice.pdf in the current directory and run python examples/00_zero_to_extraction.py to see extracted fields from the mock backend.
  5. Run export OPENAI_API_KEY=... with your own key.
  6. Run idp run invoice.pdf --schema Invoice --backend openai to extract the fields with a hosted model.

These steps come from our top use case, Extract invoice fields into a validated schema, which also has a copy-paste agent prompt.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for rollroyces/py-idp

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Best AI repos for Work and operations

About this repo

  • Who it is forPython developers and back-office teams who turn invoices, contracts, and other PDFs into validated structured data.
  • Why it is hot297 stars, launched 70 days ago
  • LanguagePython
  • Sourcegithub.com/rollroyces/py-idp · Back to Hot repos

Requirements

  • Python with pip available
  • An API key for a hosted LLM backend such as OpenAI, or a local backend such as Ollama (the zero-config path runs on the in-tree mock backend without a key)
  • A sample PDF or text file to test with, such as invoice.pdf

Add this badge to your README

Maintain Py Idp? Show readers where to find these use cases. Use cases on Deduped

Markdown

[![Use cases on Deduped](https://dedupedai.com/badge/rollroyces/py-idp.svg)](https://dedupedai.com/use-cases/rollroyces-py-idp/?utm_source=github&utm_medium=badge&utm_campaign=rollroyces-py-idp)

HTML

<a href="https://dedupedai.com/use-cases/rollroyces-py-idp/?utm_source=github&amp;utm_medium=badge&amp;utm_campaign=rollroyces-py-idp"><img src="https://dedupedai.com/badge/rollroyces/py-idp.svg" alt="Use cases on Deduped" height="20"></a>

A static image, no tracking script. About the badge

Questions about Py Idp

What is Py Idp?

py-idp is an open-source Python library for intelligent document processing that uses LLM backends and Pydantic schemas to pull structured fields out of documents. It is an open-source project on GitHub: https://github.com/rollroyces/py-idp.

How do I use Py Idp?

Run pip install py-idp to install the core package. No API key is needed for this step; then Place invoice.pdf in the current directory and run python examples/00_zero_to_extraction.py to see extracted fields from the mock backend; run export OPENAI_API_KEY=... with your own key. The use cases on this page give the full steps and a copy-paste agent prompt for each job.

Who is Py Idp for?

Python developers and back-office teams who turn invoices, contracts, and other PDFs into validated structured data.

What can I do with Py Idp?

4 use cases so far, for example: Extract invoice fields into a validated schema; Route low-confidence fields to a human reviewer; Measure extraction accuracy with the eval harness. Each has steps and a copy-paste agent prompt.

What do I need to run Py Idp?

Python with pip available; An API key for a hosted LLM backend such as OpenAI, or a local backend such as Ollama (the zero-config path runs on the in-tree mock backend without a key); A sample PDF or text file to test with, such as invoice.pdf.

What are alternatives to Py Idp?

Other hot AI repos in Work and operations: Open Maus Bot, Career Ops, Paperclip, n8n Skills, Nocodb.

Is Py Idp safe to run?

Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.