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
/mcpwith toolssearch_book_structureandlist_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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2086be8cb35bea13d5ea7616878c63e57d6fd97ce01cff52495874a5c8315191
|
|
| MD5 |
ffc57cf9b936568097820524cd180ed2
|
|
| BLAKE2b-256 |
b961ac186a45bbb2d555a2d23fa9d7579ff23dfbba4556b2315cf71bbd10131c
|