Skip to main content

metabook-py

Book Structure API — analyses the structural metadata of Project Gutenberg books. Given a title, ISBN, or Gutenberg ID, it locates the book via Gutendex, downloads and cleans the text, detects its structural schema (scripture, sectioned book, standard book, essay collection, or flat), and returns counts of chapters, paragraphs, sentences, and words per node. No book text is ever included in a response.

Two interfaces share the same service layer:

  • REST API (FastAPI) — GET /api/books/structure, GET /api/books/structure/schemas, GET /health; docs at /api/docs
  • MCP server (FastMCP) — mounted at /mcp with tools search_book_structure and list_supported_schemas

Quick start

make setup              # install dependencies (uv sync)
make dev                # run the API with auto-reload on :8000
make test               # run the test suite
make docker-up          # or run it via docker compose

CI/release pipeline scaffolded from exegia/corpora-py: same branch model, GitHub Actions workflows, composite actions, and make-driven release automation.

Branching and release

See .github/WORKFLOW.md for the full branch model, versioning rules, and workflow reference. Quick summary:

<type>/<slug> --PR--> dev --(daily/manual)--> next --cut--> release/vX.Y.Z --draft PR--> main
                 (deleted on merge)         (preview)                       (deleted on release)

Common commands

make help              # list all targets
make setup              # install dependencies (uv sync)
make ci                 # everything CI runs on a PR (lint + test)
make pack                # build the publishable wheel
make rulesets-diff       # rulesets GitHub currently has
make rulesets-apply      # push .github/rulesets/*.json

Bootstrap

There are no dev / next branches until the first wrapup. Run the Release workflow manually (Actions → Release → Run workflow), or locally:

make bootstrap-lanes

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metabook_py-1.0.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file metabook_py-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: metabook_py-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for metabook_py-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2086be8cb35bea13d5ea7616878c63e57d6fd97ce01cff52495874a5c8315191
MD5 ffc57cf9b936568097820524cd180ed2
BLAKE2b-256 b961ac186a45bbb2d555a2d23fa9d7579ff23dfbba4556b2315cf71bbd10131c

See more details on using hashes here.

Release history Release notifications | RSS feed

3.0.0

2 files

2.0.0

2 files

1.0.1

2 files

This release

1.0.0 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page