DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to serve document extraction through a FastAPI endpoint with Py Idp

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

Who it is forA backend developer who needs other internal services to submit documents over HTTP instead of running the Python library directly.

The problemEach service that needs extraction would otherwise have to install and configure the pipeline on its own.

The outcomeA running HTTP server with /extract, /templates, /healthz, and /metrics endpoints.

What you need first

  • 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

Steps

  1. Run pip install py-idp[api] to install the FastAPI server extra.
  2. Run idp serve to start the server. (inferred, check the README)
  3. Send a document to the /extract endpoint with an HTTP client.
  4. Call /healthz to confirm the server is up.

Prompt for your agent

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.

Caveat. The README does not document the request format for /extract, so read the API docs before writing a client.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page