unsprawl.core.regions¶
unsprawl.core.regions.
A nested namespace for region codes that supports IDE auto-complete.
Target syntax¶
Region.SG
Region.US.CA.SF
Each node exposes: - .CODE : a hyphenated ISO-like identifier (e.g., ‘US-CA-SF’) - .DOT : a dot-serialized identifier (e.g., ‘US.CA.SF’)
Design notes¶
This is intentionally data-light and import-safe. It is a convenience namespace, not a database of the world.
Attributes¶
Classes¶
Immutable region node. |
|
A simple namespace that supports attribute chaining. |
Module Contents¶
- class _RegionNode[source]¶
Immutable region node.
The node stores a tuple of path segments, e.g. (‘US’, ‘CA’, ‘SF’).
- class _RegionNamespace[source]¶
A simple namespace that supports attribute chaining.
This pattern keeps the ergonomics of Region.US.CA.SF without needing metaclasses or dynamic module generation.
- SG¶
- Region¶
- RegionNode¶