Skip to main content

Client SDK to interact with Kimina Lean server.

Project description

Kimina client

Client SDK to interact with Kimina Lean server.

Install:

pip install kimina-ast-client

Example use:

from kimina_client import KiminaClient

# Specify LEAN_SERVER_API_KEY in your .env or pass `api_key`.
# Default `api_url` is https://projectnumina.ai
client = KiminaClient()

# If running locally use:
# client = KiminaClient(api_url="http://localhost:80")

client.check("#check Nat")

AST endpoints

from kimina_client import KiminaClient

client = KiminaClient()

# Get AST for existing modules
mod_res = client.ast(["Mathlib", "Lean.Elab.Frontend"])  # POST /api/ast
print(mod_res.results[0].module, mod_res.results[0].error)

# Get AST from raw code
code = """import Mathlib
#check Nat
"""
code_res = client.ast_code(code, module="User.Code")  # POST /api/ast_code
print(code_res.results[0].module, code_res.results[0].ast is not None)

Backward client

from kimina_client import Lean4Client

client = Lean4Client()

client.verify("#check Nat")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kimina_ast_client-0.2.2.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

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

kimina_ast_client-0.2.2-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file kimina_ast_client-0.2.2.tar.gz.

File metadata

  • Download URL: kimina_ast_client-0.2.2.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kimina_ast_client-0.2.2.tar.gz
Algorithm Hash digest
SHA256 1bf6843d483300866f36bb8acdf0b012ba8184459d49e568933e8fbe5fe165f4
MD5 de44e6e6a2b9093523b48399edfd026f
BLAKE2b-256 6479f1c3bbad02672b6d3168f77549fe738fd5ae1c238f675e20599fdca9ea04

See more details on using hashes here.

File details

Details for the file kimina_ast_client-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for kimina_ast_client-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d50b6be1e4ab60bcb17eab58dc0dc42ea334ae39819df7420f6ebd7e0d086d48
MD5 b765913067100a94e38f4e16a030c1d4
BLAKE2b-256 54ffa6c89f07d04e36a4682edcd02418a74fc6b5ba8c34b3e506688e172c44d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page