Support
The Support module contains shared utilities that other Titanspan modules can use without importing database, queue, AI, or web infrastructure.
The current implementation includes:
Arrhelpers for Python mappings, sequences, and iterables.- Shared value, nested-data, escaping, and exception helpers.
Fluentfor typed, mutable attribute data and nested path access.ForwardsCallsfor explicit delegation from wrappers to composed objects.Optionalfor null-safe access and explicit method delegation.Envandenvfor normalized process environment access, scoped adapters, and explicit dotenv file updates.Strfor tested string transformations and validators.Stringablefor explicit chainable transformations overStr.Numberfor locale-aware formatting, parsing, spelling, and summaries; Babel andnum2wordsare mandatory runtime dependencies.BinaryCodecfor UUID and ULID conversion between text and 16-byte identifiers, with process-local custom codec registration.ConfigurationUrlParserfor database connection URLs, nested query options, driver aliases, and SQL Server DSN parsing.NamespacedItemResolverfor resolving dotted and namespaced keys with a per-instance parsed-value cache.HtmlStringandEncodedHtmlStringfor trusted markup and escaped text.MessageBagfor keyed messages, wildcard reads, formatting, and JSON output.Benchmark,InteractsWithTime,Lottery,Sleep, andTimeboxfor measured execution, deadlines, probabilistic callbacks, explicit waiting, and minimum-duration operations.UriandUriQueryStringfor immutable URL components and nested query data, with Starlette redirect interoperability.Macroablefor explicit, typed macro registration and invocation.Conditionablefor synchronous and asynchronous conditional callbacks.Tappablefor callback observation while preserving instance identity.
These APIs follow Titanspan’s native Python specifications. They use Python collections, object protocols, and explicit method dispatch instead of emulating language-specific constructs from another ecosystem. The Support specification records ownership and verification boundaries.
Imports
Section titled “Imports”from titanspan.support import Arr, Conditionable, ForwardsCalls, MacroableValue helpers are available from the same package:
from titanspan.support import blank, data_get, env, optional, tap
profile = {"user": {"name": "Ada"}}assert data_get(profile, "user.name") == "Ada"assert blank(" ")assert optional(None).get("name") is Nonedebug = env("TITANSPAN_DEBUG", False)Support uses mandatory Babel and num2words for Number operations and remains
independent of Database, Queue, and AI modules. URI redirects reuse the
Starlette version already installed
through the web foundation; URI parsing and encoding otherwise use the Python
standard library and Titanspan’s Arr helpers.
Implementation status
Section titled “Implementation status”Support is under active development. The native specification and focused test suites describe implemented behavior. Do not infer availability from similar names in other libraries or from roadmap entries.
See arrays, environment utilities,
Fluent, forwarded calls,
helpers,
message bags,
optional values, strings, and extensions
for the implemented surface. See URI utilities and
fluent strings for the implemented Stringable methods and
their Python behavior, HTML values for context-aware rendering
guidance, timing utilities for Benchmark, InteractsWithTime,
Lottery, and Timebox, and Sleep for explicit synchronous and
asynchronous waiting. See Number utilities for numeric
formatting, locale scopes, and Python-specific behavior,
and binary codecs for UUID and ULID conversion. See
configuration URLs for parsing database URLs and SQL
Server DSN values, and namespaced item keys for dotted-key
parsing and cache control.
