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.0.1.tar.gz (4.1 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.0.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ontocubes-0.0.1.tar.gz
Algorithm Hash digest
SHA256 534979babfb900e78aab13ab416eadb64a5f34114b1b0e1ddfaa7e559e353417
MD5 fe8684e2be60122040160e8540b6dd1e
BLAKE2b-256 e73cf63f99c58772a55feaa491d7810450fad0eae574ff6b0c7ef7b8af60d4d3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ontocubes-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 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.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ec78613ea27e7f4e0a9bf7a755bfb6bf6208da713a9ae5f3b1b98bf963cc50c
MD5 574d14a615005dd507fe1b0d009b6c1a
BLAKE2b-256 725aadd8d00116e0b7f486b6d8a24f9386add6769e92e1fca149d4fe26797715

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