blpapi.Name
- class blpapi.Name(nameString, internalHandle=None)
Namerepresents a string in a form which is efficient for comparison.Nameobjects are used to identify and access the classes which define the schema -SchemaTypeDefinition,SchemaElementDefinition,Constant,ConstantList. They are also used to access the values inElementobjects andMessageobjects.The
Nameclass is an efficient substitute for a string when used as a key, providing constant time comparison and ordering operations. TwoNameobjects constructed from equal strings will always compare equally.Where possible,
Nameobjects should be initialized once and then reused. Creating aNameobject involves a search in a container requiring multiple string comparison operations.Note
Each
Nameinstance refers to an entry in a global static table.Nameinstances for identical strings will refer to the same data. There is no provision for removing entries from the static table soNameobjects should only be used when the set of input strings is bounded.For example, creating a
Namefor every possible field name and type in a data model is reasonable (in fact, the API will do this whenever it receives schema information). However converting sequence numbers on incoming messages to strings and creating aNamefrom each one of those strings will cause the static table to grow in an unbounded manner.- static findName(nameString)