Skip to main content

Universal ontological cube framework - represent any entity as a 5-layer cube (temporal, typology, ontology, causality, individuality)

Project description

ontocubes

Universal ontological cube framework for representing any entity as a 5-layer cube.

Concept

OntoCubes provides a unified model where any entity in the world can be represented as a cube with 5 layers:

Layer Purpose Example
Temporal Identity & versioning id, version, timestamp, name
Typology Type hierarchy TEXT.PROMPT.LLM
Ontology Semantic classification {"creative/storytelling": 0.95}
Causality Parent/ancestry chain Reference to parent cube
Individuality Actual data (delta from type) {prompts: {system: "...", user: "..."}}

Key Features

  • Self-referential: Same schema in → same schema out
  • Recursive resolution: {{ref}} syntax resolves cubes recursively
  • Type-aware processors: Transform data between types (TEXT → PROMPT)
  • Schema validation: Root cubes define schemas for their type hierarchy
  • SQLite persistence: Fast lookup with YAML as source of truth

Status

🚧 Under Development - API may change

Installation

pip install ontocubes

Quick Example

from ontocubes import Storage, Resolver

# Store a cube
storage = Storage.get()
storage.store({
    "name": "greeting",
    "typology": "TEXT",
    "individuality": {"content": "Hello, World!"}
})

# Resolve with refs
storage.store({
    "name": "prompt",
    "typology": "TEXT.PROMPT.LLM",
    "individuality": {
        "prompts": {
            "system": "{{greeting}}",  # Resolves to "Hello, World!"
            "user": ""
        }
    }
})

resolver = Resolver()
result = resolver.resolve("prompt")
print(result["individuality_resolved"]["prompts"]["system"])
# Output: Hello, World!

License

MIT

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

ontocubes-0.1.0.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

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

ontocubes-0.1.0-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file ontocubes-0.1.0.tar.gz.

File metadata

  • Download URL: ontocubes-0.1.0.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ontocubes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4591030f7590767e0a04b9e3452645d9385e1a12257d09560eb680ff192858cc
MD5 c11d4f9083437c2007c5848ad2d5cf30
BLAKE2b-256 4c4644b11378a118b2f2eb18f3a06c5024964645e8f056f892fe4289be219b64

See more details on using hashes here.

File details

Details for the file ontocubes-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ontocubes-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ontocubes-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3138ec481955bda6b6964cfdebddc1d503f160a00098f593fcfb48dcd6f312d6
MD5 83f722a10b8a8d2de207a6f4556d5ed3
BLAKE2b-256 d3a9bb404425a01e035aee32b4317922fc2a2fefd06b0ea2506b03d4607089cb

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