Skip to main content
Pre-release

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

py10x-core

The Substratum of 10x Genaxy — a generative core for software, not a feature list.

Python 3.11–3.13 License: MIT

Jerboa Logo

🌌 Why Genaxy?

10x is about empowering engineers, researchers, and developers to become 10x more productive — not through better tooling at the edges, but by never rebuilding the same foundation twice. A genaxy is what makes that possible: a kind of system built around a small, generative core rather than assembled feature by feature. 10x Genaxy is this one. This package (py10x-core) is its substratum.

The substratum is that core: a handful of laws (principles), not a feature set. Today those are identity, dependency, persistence, and presentation; more may join them. Everything else follows from these. They aren't a checklist to memorize — they're vocabulary for describing a real-world problem, before any specific technology gets chosen.

That core is generative: you describe the entity — what it is, what it depends on, where it is stored, how it should be presented and interacted with — and the application, the report, the service you needed falls out of that description, largely for free.

Around the substratum sit subject domains — real fields of work, each built on the same core instead of reinventing it. Finance is the first (py10x-fin-base). More will follow. Domains surround the substratum the way planets surround a star — independent, distinct, but held by the same laws.

Most software is built domain-first: a finance system, a healthcare system, a logistics system — each reinventing identity, persistence, and UI from scratch. Genaxy inverts that. Build the substratum once. Let every domain grow from it.

10x Genaxy isn't the first genaxy — SecDb, Athena, and others came before it (See lineage).

Another way to see it. C++ took C and made objects first-class — data and behavior bundled together, without leaving C behind. 10x Genaxy does the same for Python, one level up: objects that know who they are (identity), what they depend on (dependency), where they live (persistence), and how they look (presentation). It is still Python — nothing new to compile, no new syntax — just with the four laws built in. If it helps, think of it as Python++.

In this README:


🏁 Identity and Dependency, in Nine Lines

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

Two of the four laws, in nine lines: handle is the identity, energy is a dependency on coffee_cups, tracked and recomputed automatically.


💾 Everything Is a Resource

Real systems rarely live in one database. 10x Genaxy treats every external dependency — a MongoDB cluster, a Postgres box, a DuckDB file, a credentials vault — as a Resource: addressed by a plain URI, resolved to a concrete driver through a small, pluggable registry. The Traitable Store you persist objects to is just one kind of Resource, alongside anything else your system depends on.

You define logical resources — names your code refers to, like "main" or "mkt_data" — and assign each one to a physical location (an actual URI) separately, per environment. Traitable classes associate themselves with a logical resource by name, so different parts of a system can live on different physical stores without any downstream code needing to know or care which.

Authentication follows the same shape. A user registers once: an RSA keypair is generated on their own machine, the private key is encrypted with their own master password, and everything lands in the OS keyring — never transmitted, never stored in plaintext. From that point on, every resource that user is entitled to just works, with no per-database credential wiring anywhere in application code.

Traitable Store

A Traitable Store is the Resource that persists objects. Traitable.store_from_uri opens it by URI and fills in credentials from the vault when the server requires them — no passwords in application code. MongoDB, PostgreSQL, and DuckDB are the same pattern:

from datetime import date
from core_10x.code_samples.person import Person
from core_10x.traitable import Traitable

with Traitable.store_from_uri("mongodb://localhost/myapp"):
    person = Person(first_name="Alice", last_name="Smith")
    person.dob = date(1990, 5, 15)
    person.save()

Identity still holds across the store: constructing Person(first_name="Alice", last_name="Smith") later resolves to the stored instance. Versioning, history, per-class stores, querying, and nested graphs are in Traitable Store in the Getting Started guide.


🎨 The UI Is Derived, Not Written

Presentation is the fourth law, and it works the same way: describe the shape of the thing, and the UI for viewing and editing it comes for free. A dropdown that only accepts valid values isn't a widget you configure — it falls out of typing the trait as a NamedConstant:

from core_10x.traitable import Traitable, RT, Ui
from ui_10x.examples.constants import COLOR, FONT

class StyleSheet(Traitable):
    foreground: COLOR   = RT(COLOR.LIGHTGREEN)
    background: COLOR   = RT(COLOR.BLACK,   ui_hint = Ui(flags = Ui.SEPARATOR))

    font: FONT          = RT(FONT.HELVETICA)
    italic: bool        = RT(True,          ui_hint = Ui('italic',  right_label = True))
    bold: bool          = RT(False,         ui_hint = Ui('bold',    right_label = True, flags = Ui.SEPARATOR))

    border: bool        = RT(True)
    border_color: COLOR = RT(COLOR.BLUE)
    border_width: int   = RT(2,             ui_hint = Ui(flags = Ui.SEPARATOR))

    show_me: str        = RT('This is how it will look...',  ui_hint = Ui('WYSIWYG', min_width = 50))

    def show_me_style_sheet(self) -> dict:
        return {
            Ui.FG_COLOR:        self.foreground.value,
            Ui.BG_COLOR:        self.background.value,
            Ui.FONT:            self.font.value,
            Ui.FONT_STYLE:      'italic'   if self.italic   else 'normal',
            Ui.FONT_WEIGHT:     'bold'     if self.bold     else 'normal',
            Ui.BORDER_WIDTH:    f'{self.border_width}px',
            Ui.BORDER_STYLE:    'solid'    if self.border   else '',
            Ui.BORDER_COLOR:    self.border_color.value,
        }

That's the entire program — no layout code, no widget wiring, no dropdown population logic. TraitableEditor(StyleSheet()).popup() generates the full dialog below: dropdowns, checkboxes, and a live preview that updates itself, because it's just another computed trait sharing the same dependency graph as everything else.

The entire StyleSheet trait class (left) and the auto-generated editor it produces (right) — the WYSIWYG preview updates live from the dependency graph, with no manual UI code anywhere.

The same class definition renders as a native Qt desktop dialog or a Rio web view, depending only on which backend is active.


🧭 When Should You Build a Subject Domain of 10x Genaxy?

10x Genaxy fits problems with:

  • Real-world entities with derived, computed state
  • A need for deterministic, shared identity across a whole system
  • Data that outlives a single process — persistence you don't want to hand-roll
  • A UI that should never drift out of sync with the model it displays

It's overkill for a simple script, a stateless API, or pure validation logic — those don't need a substratum, they need a function. 10x Genaxy pays off when a system's state and relationships keep evolving, and keeping everything in sync by hand is the actual cost center.


🔍 How Is This Different?

Compared to dataclasses or Pydantic — objects have deterministic identity from their ID traits; the same identity always resolves to the same logical entity; derived fields are lazily computed and dependency-tracked, not just validated once at construction.

Compared to traditional ORMs — identity isn't tied to a database row, and persistence is optional and pluggable per class, not baked into one schema.

Compared to reactive frameworks — dependencies are tracked automatically, computation is lazy by default, and the same graph drives persistence and UI, not just view updates.


Documentation map

I want to… Read
Install py10x INSTALLATION.md
Learn the Traitable framework GETTING_STARTED.md
Try Traitables interactively docs/notebooks/getting_started.py — a marimo notebook (similar to Jupyter). Open in molab (create a free account, choose a server session, and run)
Install / use the first subject domain of 10x Genaxy (xxfin) xx_fin/README.md
Contribute code CONTRIBUTING.md
Cut a release / sync dev deps dev_10x/README.md

🤝 Contact & Support

Metadata

Release files for py10x-core 0.4.0rc2

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

Source distribution (sdist)

Source distribution for py10x-core 0.4.0rc2
File Size Uploaded Provenance Actions
py10x_core-0.4.0rc2.tar.gz 580.1 kB Without provenance Details for py10x_core-0.4.0rc2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py10x-core 0.4.0rc2
File Interpreter ABI Platform Actions
py10x_core-0.4.0rc2-py3-none-any.whl Python 3 none any Details for py10x_core-0.4.0rc2-py3-none-any.whl

Total release size: 1.3 MB

Release files / py10x_core-0.4.0rc2.tar.gz

Download URL py10x_core-0.4.0rc2.tar.gz
Size 580.1 kB
Tags Source
SHA-256 checksum
How to use checksums
556f58958e115e619bd23b444f474ddc276018bc1e4dc248c6fe5d67c317d610
BLAKE2b-256 checksum
How to use checksums
b41d71fafb11bc0fc8e904b8787548322a47503ede048628416524b2e7c51ef6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / py10x_core-0.4.0rc2-py3-none-any.whl

Download URL py10x_core-0.4.0rc2-py3-none-any.whl
Size 711.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7467dc5627a5fcda46ddf0b7ab1cf975ca8aa8be69f061494ae7b4ebf85296a
BLAKE2b-256 checksum
How to use checksums
f0ea432854226cc610b15f95b4942fe532471b8805832f4170b1e03cad5e35a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for py10x-core 0.4.0rc2

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
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