blpapi.Identity
- class blpapi.Identity(handle, sessions)
Provides access to the entitlements for a specific user.
An unauthorized Identity is created using
createIdentity(). Once anIdentityhas been created it can be authorized usingsendAuthorizationRequest(). The authorizedIdentitycan then be queried or used insubscribe()orsendRequest()calls.Once authorized, an
Identityhas access to the entitlements of the user which it was validated for.Identityobjects are always created by the API, never directly by the application.The class attributes represent the various seat types.
- BPS = 0
Bloomberg Professional Service
- INVALID_SEAT = -1
Unknown seat type
- NONBPS = 1
Non-BPS
- getFailedEntitlements(service, entitlements)
- Parameters
service – Service to check authorization for
entitlements – EIDs to check authorization for
- Returns
Tuple where the boolean is True if this
Identityis authorized for the specifiedserviceand all of the specifiedentitlements, and the list is a subset ofentitlementsfor which thisIdentityis not authorized.
Note
The contents of the returned list are not specified if this identity is not authorized for
service.
- getSeatType()
- Return type
- Returns
Seat type of this identity.
The class attributes of
Identityrepresent the seat types.
- hasEntitlements(service, entitlements)
- Parameters
service – Service to check authorization for
entitlements – EIDs to check authorization for
- Returns
Trueif thisIdentityis authorized for the specifiedserviceand for each of the entitlement IDs contained in the specifiedentitlements.
If
Elementis supplied forentitlements, it must be an array of integers.