Skip to main content

Teleos

Plain-language logic engine — write rules in English, query from any language.

Think of it like SQL, but for rules instead of data. Instead of writing business logic as if/else code buried in your application, you write it in a .teleos file that reads like English. Any language — Python, Go, JavaScript, C++, C#, Java — can load that file and query it.

fact: alice is admin
fact: charlie is user
fact: charlie is banned
rule: if X is admin then X can access Y
rule: if X is user and not X is banned then X can access Y

ask:  alice can access document    → true
ask:  charlie can access document  → false
why:  charlie can access document  → Cannot prove: charlie can access document
                                      Nearest rule failed because: charlie is banned

Install

pip install teleos

Quick start

import teleos

engine = teleos.load("rules.teleos")

engine.ask("alice can access document")   # True
engine.why("alice can access document")   # proof string
engine.all("WHO can access report")       # ["alice", "bob"]
engine.add_fact("dave is admin")          # add at runtime

CLI

teleos run  rules.teleos   # run all ask:/why:/all: queries
teleos test rules.teleos   # run all assert: statements
teleos repl rules.teleos   # interactive session

.teleos syntax

# facts
fact: alice is admin
fact: alice has score 95

# rules — variables are ALL CAPS
rule: if X is admin then X can access Y
rule: if X has score S and S >= 90 then X gets distinction

# negation
rule: if X is user and not X is banned then X can post

# import another file
import: base-rules.teleos

# queries
ask: alice can access document     → true / false
why: alice can access document     → proof explanation
all: WHO gets distinction          → every matching value

# assertions (for teleos test)
assert: alice can access document
assert not: charlie can access document

Language bindings

Teleos includes a Rust core (teleos-core) that compiles to a shared library callable from any language via C FFI.

Bindings are available for Go, JavaScript/TypeScript, C++, C#, and Java. See https://github.com/teleos/teleos for details.

License

MIT

Metadata

Release files for py-teleos 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-teleos 0.1.0
File Size Uploaded Provenance Actions
py_teleos-0.1.0.tar.gz 13.8 kB Without provenance Details for py_teleos-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py-teleos 0.1.0
File Interpreter ABI Platform Actions
py_teleos-0.1.0-py3-none-any.whl Python 3 none any Details for py_teleos-0.1.0-py3-none-any.whl

Total release size: 27.4 kB

Release files / py_teleos-0.1.0.tar.gz

Download URL py_teleos-0.1.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5cb1293ddad00d70b6de920c0ff962c75e33d2c10d07ded1b32a1d030fe021e4
BLAKE2b-256 checksum
How to use checksums
26090ff31adbbad9467036b6b8b51b6f8d0018a639d79e0752869e84aa502bda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / py_teleos-0.1.0-py3-none-any.whl

Download URL py_teleos-0.1.0-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c3c43e159c8b4d3829fb1b76c8728ef677f2d147b4751c1f82df760fef1b30c
BLAKE2b-256 checksum
How to use checksums
234790758b5d85cbbc8287177816db1f4f0c7c60e29ac041a36453752a4676fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for py-teleos 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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