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 Distribution

metabook_py-1.0.1.tar.gz (137.9 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file metabook_py-1.0.1.tar.gz.

File metadata

  • Download URL: metabook_py-1.0.1.tar.gz
  • Upload date:
  • Size: 137.9 kB
  • Tags: Source
  • 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.1.tar.gz
Algorithm Hash digest
SHA256 2e490c70ce993ba85a0646e4996770c2810f440d6e0c8b109e7382af5b8ffa6c
MD5 3f464cc043e092a96d3aa14eb64b7605
BLAKE2b-256 30abd08357ce47d482a412d6db22bb989f6b5df445892c3f7fe8e0d2224f71f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: metabook_py-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77e48653ba7430ab0c24de6626f13a4e846630596344c4267fde6ba1f5f6e7f0
MD5 5922d1ac2a9aaf00a96a264a764c8fc1
BLAKE2b-256 7e88c37c37efe7c43e796c0c53c905fda0f824cae95caa1eec60d75c3efab480

See more details on using hashes here.

Release history Release notifications | RSS feed

3.0.0

2 files

2.0.0

2 files

This release

1.0.1 This release

2 files

1.0.0

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