Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

py10x-core

Unified, identity-driven, dependency-aware object model for Python
—with lazy dependency graph, persistence, automatic UI editors, and more

Python 3.11–3.13 License: MIT

Jerboa Logo

🚀 Why py10x?

Standard Python objects have no shared identity layer and no automatic dependency tracking.
py10x-core turns them into a coherent, dependency-aware graph of connected identifiable objects — a single shared layer that feels unified across modules, files and processes.

Key superpowers:

  • Global Identity & Sharing
    Objects with identical ID Traits are automatically the same logical entity.
    Change a value in one place → every reference sees the update instantly (global cache).

  • Lazy Dependency Graph
    Computed traits (derived values) are calculated only when accessed.
    Dependencies are tracked automatically — no manual invalidation, no recompute storms.

  • Deep Persistence
    Complex nested object graphs saved to Traitable Store (MongoDB, PostgreSQL, or in-memory DuckDB).
    Built-in versioning, history tracking, transparent lazy loading.

  • Automatic UI Editors
    Define your data model once → get native two-way editors for Rio (web) or Qt (desktop).
    No manual UI code for viewing/editing traitables.

This approach dramatically reduces boilerplate while giving you fine-grained control over computation timing and persistence behavior.


🏁 Hello World

By default, the Traitable constructor accepts only ID traits. For how the framework uses identity and storage to resolve or create instances, see How Traitables Are Created in the Getting Started guide.

from core_10x.traitable import Traitable, T, RT
from core_10x.exec_control import GRAPH_ON, CACHE_ONLY

class Developer(Traitable):
    handle: str      = T(T.ID)           # ← identity trait → global sharing
    coffee_cups: int = T(default=0)      # persistent
    energy: int      = RT()              # runtime-only (not stored)

    def energy_get(self) -> int:
        return self.coffee_cups * 20

# In-memory mode (no storage), dependency graph on.
with CACHE_ONLY(), GRAPH_ON():
    dev = Developer(handle="ghost")
    dev.coffee_cups = 5
    print(dev.energy)           # 100 ← computed lazily on first access

    dev.coffee_cups = 6
    print(dev.energy)           # 120  ← recomputed due to dependency change

    # Same identity → same object
    dev2 = Developer(handle="ghost")
    print(dev2.energy)          # 120  ← shared via global cache

Want automatic persistence, per-class stores, store unions, querying, nested objects, UI generation, verifiers, and more? → Dive into GETTING_STARTED.md for the full technical manual.


🧠 When Should You Use py10x?

py10x-core is a good fit when:

  • Your application has rich domain models with derived fields
  • You need deterministic object identity
  • You want automatic dependency tracking
  • You want persistence and UI derived from the same model

It may be overkill for simple scripts, stateless APIs, or lightweight validation-only use cases.

If your system has evolving state and relationships, py10x-core removes a large amount of manual synchronization code.


🔍 How Is This Different?

Unlike dataclasses or Pydantic:

  • Objects have deterministic identity based on ID traits
  • Identical identity traits resolve to the same logical entity
  • Derived fields are lazily computed and dependency-tracked

Unlike traditional ORMs:

  • Identity is not tied to a database row
  • Persistence is optional and pluggable

Unlike reactive frameworks:

  • Dependencies are tracked automatically
  • Computation is lazy by default

Documentation map

I want to… Read
Install py10x INSTALLATION.md
Learn the Traitable framework GETTING_STARTED.md
Install / use fin-base (xxfin) xx_fin/README.md
Contribute code CONTRIBUTING.md
Cut a release / sync dev deps dev_10x/README.md

🤝 Contact & Support

Download files

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

Source Distribution

py10x_core-0.3.0rc2.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

py10x_core-0.3.0rc2-py3-none-any.whl (578.2 kB view details)

Uploaded Python 3

File details

Details for the file py10x_core-0.3.0rc2.tar.gz.

File metadata

  • Download URL: py10x_core-0.3.0rc2.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for py10x_core-0.3.0rc2.tar.gz
Algorithm Hash digest
SHA256 558509d041152fae096e0d6e710383c5acbb0b6fa142c822232d5b843d51c69f
MD5 2cb1a3089786f7806077e9eaeda99812
BLAKE2b-256 33a525ac4c75f9ab3868baf52019df26f1b5a60fd1be4ed5db197f2a44c5050e

See more details on using hashes here.

File details

Details for the file py10x_core-0.3.0rc2-py3-none-any.whl.

File metadata

  • Download URL: py10x_core-0.3.0rc2-py3-none-any.whl
  • Upload date:
  • Size: 578.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for py10x_core-0.3.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 d3a7ffa2a3304c179d2ba29583fbb73533717582012357dedb1b9d150394ec1e
MD5 f0adb70f53d7db16e0561c3164fb052a
BLAKE2b-256 fc0f73c00e26a3f2aebb6d96e7be6a7863fa0a21ac2a733c1ea112dbb9fbc0ca

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.1

2 files

0.3.0

2 files

This release

0.3.0rc2 This release

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.15

2 files

0.1.14

2 files

0.1.12

2 files

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