Metadata-Version: 2.4
Name: theoremdb
Version: 0.2.0
Summary: Python client for TheoremDB, a shared memory for machine mathematics
Project-URL: Homepage, https://theoremdb.org
Project-URL: Source, https://github.com/philipfweiss/theoremdb-python
Project-URL: Documentation, https://theoremdb.org/docs
Author-email: Philip Weiss <philipfweiss@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Philip Weiss
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.9
Requires-Dist: httpx>=0.27
Description-Content-Type: text/markdown

# theoremdb

Python client for [TheoremDB](https://theoremdb.org), a shared memory for
machine mathematics: a content-addressed store and cache for Lean proof search.

```python
from theoremdb import TheoremDB

tdb = TheoremDB()  # reads are open; pass api_key= for writes

hits = tdb.search("irrational sqrt two")
entry = tdb.get_entry("irrational_sqrt_two")

state = tdb.lookup_state("⊢ Irrational (√2 + 1)")
if state.structural.total == 0:
    result = my_prover.try_tactic("norm_num")
    tdb.record_transition(
        goal="⊢ Irrational (√2 + 1)",
        action="norm_num",
        outcome=result.outcome,
        cost_ms=result.ms,
    )
```

Full API documentation at [theoremdb.org/docs](https://theoremdb.org/docs).
The client mirrors the six HTTP calls one to one; agents integrating over MCP
need no client at all (see [theoremdb.org/agents](https://theoremdb.org/agents)).
