Metadata-Version: 2.5
Name: tacet-api
Version: 0.1.2
Summary: Find the frontend code a backend API change breaks: Python bindings and FastMCP tools for Tacet (TypeScript frontend + Spring Boot backend)
Project-URL: Homepage, https://github.com/as950118/tacet
Project-URL: Repository, https://github.com/as950118/tacet
Project-URL: Issues, https://github.com/as950118/tacet/issues
Author: Heonjin Jeong
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: api,breaking-changes,contract,fastmcp,mcp,spring-boot,tacet,typescript
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Python: >=3.10
Provides-Extra: fastmcp
Requires-Dist: fastmcp>=2.10; extra == 'fastmcp'
Description-Content-Type: text/markdown

# tacet (Python)

Python bindings for [Tacet](../README.md): check a TypeScript frontend against a Spring Boot API and see what
an API, file or field change would affect, plus ready-made tools for [FastMCP](https://gofastmcp.com).

The package drives the Tacet CLI (`--format json`), so the machine running it needs Node.js 22.13+
(and Java 17+ for `extract_backend`). Point it at the CLI with `TACET_CLI` or put `tacet` on `PATH`.

```python
from tacet import Tacet

lens = Tacet(index=".tacet/index.db", frontend_dir="./frontend", backend_dir="./backend")
lens.index_frontend()
lens.extract_backend()

report = lens.check(changed_since="origin/main")      # PASS / WARNING / FAIL + issues with file:line
lens.impact_of_api("GET /users/{id}", graph="mermaid")
lens.page_apis(api="GET /users/{id}")      # which pages use this API, and through what
lens.impact_of_file("src/api/user.ts")
lens.impact_of_field("UserResponse.name")
```

## FastMCP

```python
from fastmcp import FastMCP
from tacet.fastmcp import register_tools

mcp = FastMCP("my-server")
register_tools(mcp, frontend_dir="./frontend", backend_dir="./backend", prefix="tacet_")
mcp.run()
```

Tools: `index_frontend`, `extract_backend`, `check_contract`, `impact_of_api`, `impact_of_file`,
`impact_of_field`, `search`, `impact_summary`, `render_graph`, `page_apis`, `ontology`.

## Tests

```bash
npm run build && npm run build:jar   # from the repository root
uv run --group dev pytest
```
