NameSpace¶
- class dsviper.NameSpace(uuid, name)¶
Bases:
objectA UUID and a name, under which a model’s types are registered.
The uuid is the model’s lasting identity. Every type declared here takes its runtime_id from it, and a database holds documents under those ids, so the same uuid is what lets a later run read what an earlier one wrote. Pin it as a literal wherever the model is declared, for that reason. The name is free to change: two namespaces are equal when their uuids are, whatever they are called.
GLOBAL is the one the runtime’s own primitive types carry - Type.STRING and Type.INT32 answer it, a structure you declare answers yours. It is not a namespace to register into: create_concept and its siblings refuse it. Its uuid is the invalid one, which is why the constructor refuses that uuid - a namespace built on it would be the global one.
The name is an identifier: a letter, then letters, digits and underscores.
- GLOBAL = ::¶
- name() str¶
Return the namespace name, empty for the global one.