Skip to main content

Almasi

What if your codebase was already your runtime architecture? Almasi is an open-source Python foundation that turns source structure into a live, composable namespace—without a separate layer of registration and wiring. For developers: fewer moving parts, lazy components, natural composition. For ambitious products: a common foundation for persistent state and AI agents. Almasi — the winged white elephant dancing with its trunk held high

Watch the 2-minute overview · Persistent objects: Almasi O · Agents: Almasi Do

See it in 30 seconds

Install from PyPI (Python 3.11+):

python -m pip install almasi

Use a library as if it were part of the runtime:

from almasi import o

print(o)  # <Library 'almasi.o'>

On first access, Almasi retrieves the library's Git source, installs its declared dependencies and publishes its canonical Python namespace. Repeated imports reuse that instance. The core stays small; libraries arrive when needed. Git and internet access are required for first acquisition.

Or define a filesystem-native library yourself:

mylib.py
root/
└── greetings.py
# mylib.py
import almasi

mylib = almasi.extend('mylib')
# root/greetings.py
import mylib

class Greetings(mylib.Module):

	def hello(self):
		return 'Hello from the filesystem'
import mylib

print(mylib.greetings().hello())

A file becomes a module in the runtime namespace when it is needed. No manual registry of greetings, no generated integration layer.

The idea

Most frameworks describe the same system repeatedly: files, package exports, service registries, plugin registries, dependency wiring and application configuration. Each representation can drift from the others.

Almasi makes the filesystem a first-class source of runtime structure. Its libraries are canonical instances of classes, with inheritance, lazily resolved components and extensible file-type plugins.

Capability What it changes
Filesystem-native namespaces A root/ tree resolves naturally into a Python library namespace
Library inheritance Extend a library without copying its components
Lazy resolution Discover and cache components on access
Pluggable file semantics Load Python, JSON, text and other supported resource types through plugins
Named forks Isolate runtime classes, services and module globals within a library lineage
On-demand library acquisition Retrieve WordWield libraries and their dependencies on first import

A family, not a monolith

Almasi Core — runtime identity, filesystem-native discovery and library composition.

Almasi O — a persistent Python ontology: typed entities, identity, relationships, nested collections, schemas and LMDB-backed state.

Almasi Do — AI agents, structured outputs and provider orchestration that build on the same runtime and object model.

The larger opportunity is architectural: applications and agents can build on shared native primitives instead of maintaining an ever-growing web of translations. Almasi is active infrastructure research and development, not a claim that every integration has already been completed.

How it works

A library entry point declares its name through extend():

import almasi

mylib = almasi.extend('mylib')

The entry file and library name must match, and a sibling root/ directory must exist. Components stored under root/ are resolved by their names, loaded when accessed and cached. Python components are classes derived from Module; other supported files use registered plugins.

Libraries inherit the capabilities of their parent:

from almasi import o

# In the entry point of an appropriately named child library:
# child = o.extend('child')

When a library is extended from __main__, Almasi also selects it as the active application. Application selection is process-wide; services do not implicitly initialize merely because a library is extended.

Named forks

alice = mylib.fork('alice')
bob   = mylib.fork('bob')

assert alice is not bob
assert mylib['alice'] is alice

Forks isolate Python-side runtime namespaces and service instances. They do not automatically duplicate external databases or other application-owned resources. Those lifecycle choices belong to the consuming library.

Filesystem operations

The runtime also provides join(), mkdir(), read(), write(), copy() and link() on directory faces and library roots. Writes and copies use atomic replacement, and successful mutations invalidate affected cached filesystem carriers. Read the detailed invariants.

Acquisition and security

from almasi import o, do

Missing libraries are resolved from the default Git base https://github.com/WordWield and stored under ~/.cache/almasi/libraries. Existing checkouts may be fast-forwarded on first import in a process. The loader installs a library's requirements.txt into the active Python environment.

Setting Effect
ALMASI_PATH Choose the directory for library checkouts
ALMASI_GIT_BASE Choose a Git source base, including SSH URLs

Only libraries accessible with your Git credentials can be acquired. Git revisions are currently not pinned or cryptographically verified; imports execute source code and may install Python packages. Use only repositories you trust. This is convenient for development and experimentation, not a sandbox for untrusted code.

The supported library entry layouts are <checkout>/<name>.py and <checkout>/almasi/<name>.py, each with a root/ directory. The latter preserves unrelated top-level packages such as the official Python mcp SDK. The supported lazy-import contract is from almasi import name, not direct import almasi.name.

For builders and collaborators

Almasi explores a focused thesis: complexity should emerge from necessity, not from duplicate representations of the same concept.

This is relevant to AI-native applications, agent infrastructure, developer tooling and software that needs persistent, inspectable structure. The three libraries demonstrate distinct layers of that thesis; there are no claimed adoption or benchmark numbers beyond published project tests.

Project status

Python 3.11+; Apache-2.0. The core builds as a wheel and is tested in CI on Python 3.11 and 3.12. Published on PyPI; install with pip install almasi.

Created by Alexander Podgorny — AI systems architect and researcher. Connect on LinkedIn.

Metadata

Release files for almasi 0.1.1

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

Source distribution (sdist)

Source distribution for almasi 0.1.1
File Size Uploaded Provenance Actions
almasi-0.1.1.tar.gz 65.4 kB With provenance Details for almasi-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for almasi 0.1.1
File Interpreter ABI Platform Actions
almasi-0.1.1-py3-none-any.whl Python 3 none any Details for almasi-0.1.1-py3-none-any.whl

Total release size: 149.5 kB

Release files / almasi-0.1.1.tar.gz

Download URL almasi-0.1.1.tar.gz
Size 65.4 kB
Tags Source
SHA-256 checksum
How to use checksums
482270355259177cf07c3cd0b3aee0f60fa5453e43c0cec49f3588586d0b8bfb
BLAKE2b-256 checksum
How to use checksums
813a2f89ae2d77c2bca6516bb3e5714416e64c4f4ed4efdba118bc27166ad503
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / almasi-0.1.1-py3-none-any.whl

Download URL almasi-0.1.1-py3-none-any.whl
Size 84.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
710ae9c62b4a7fb83e525617486fdad7a80675366200548d80b35eb59eabb8f2
BLAKE2b-256 checksum
How to use checksums
446ccf06bdba57130db4d94615d1d6395914adefbb48a67446e355ac99688925
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for almasi 0.1.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for almasi-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

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.1 This release

2 release files Full 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