asta-theorizer
A Python library that generates literature-grounded scientific theories from a corpus of papers. You run it a stage at a time (plan, import papers, extract, generate theories), and every stage saves its output to a project directory.
pip install asta-theorizer
Symbolic law discovery needs the symbolic extra: pip install "asta-theorizer[symbolic]".
Keys. It calls OpenAI or Anthropic models through litellm. Set OPENAI_API_KEY or ANTHROPIC_API_KEY,
or put {"openai": "sk-...", "anthropic": "sk-ant-..."} in api_keys.donotcommit.json in the working
directory or ~/.config/asta/, which th.Config.init() loads; a key already in the environment wins
over the file. With LITELLM_BASE_URL and LITELLM_USER_KEY set, every call goes through that
LiteLLM proxy instead. The default models are OpenAI's (gpt-6-sol, gpt-6-luna);
th.Config.set_models(primary=..., extraction=...) changes them.
Papers are markdown or text files. Convert PDFs to markdown first, or import them with
ocr="mistral" (Mistral OCR, needs MISTRAL_API_KEY).
import theorizer as th
th.Config.init(project_dir="vip-run")
plan = th.Pipeline.plan_theory_query("Build a theory of how VIP interneurons control V1 gain")
query = plan["output"]
papers = th.PaperImport.import_papers("/path/to/papers")["papers"]
ext = th.Pipeline.extract_from_papers(papers, query["extraction_query"],
query["extraction_schema"])
records = th.Pipeline.flatten_records(ext)
theories = th.Pipeline.generate_theories(records, query["theory_request_normalized"])
found = theories["theory_response"]["theories_general"] + theories["theory_response"]["theories_specific"]
th.Pipeline.to_theorystore(found, query["theory_request_normalized"]) # into the project's theorystore.json
for t in found:
print(t["theory_name"])
th.Export.export_html() # vip-run/html/index.html: the theories, their laws, and the evidence behind each
The same export from the shell: python -m theorizer.Export --project vip-run.
Metadata
Release files for asta-theorizer 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| asta_theorizer-0.2.0.tar.gz | 375.2 kB | Without provenance | Details for asta_theorizer-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| asta_theorizer-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for asta_theorizer-0.2.0-py3-none-any.whl |
Total release size: 686.3 kB
Release files / asta_theorizer-0.2.0.tar.gz
| Download URL | asta_theorizer-0.2.0.tar.gz |
|---|---|
| Size | 375.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c91f23c4ad0b7f99482e844de379604e58aca85f9bdb62e481eeaffe984c094e
|
|
BLAKE2b-256 checksum How to use checksums |
80c7776331d8c0093a01a739de61a2a79e2cd255fba86e67934d7bc5c9a06a19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Release files / asta_theorizer-0.2.0-py3-none-any.whl
| Download URL | asta_theorizer-0.2.0-py3-none-any.whl |
|---|---|
| Size | 311.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e50deb90d7f0314801d1de99ea6248a6bb0c6cd04a2c6455c6b4606ac6107b9e
|
|
BLAKE2b-256 checksum How to use checksums |
15a7930b1c31dbacb6052fbbd8d9fceb5480f4728deccc187a2e47de02f0c77b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Security for asta-theorizer 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.