跳转到主要内容

使用Python查询GLEIF API

项目描述

PyPI version

此库使用Python查询GLEIF.org的API。目前,该库支持

  • 获取特定API的数据
  • 使用组织编号搜索LEI

该库使用Pydantic进行严格类型化。

安装库

pip install pygleif

示例:获取特定LEI的数据

from pygleif import PyGleif

gleif_response = PyGleif("549300MLUDYVRQOOXS22")

# Print the name of the company with the LEI above
print(gleif_response.response.data.attributes.entity.legal_name.name)
# prints UK EQUITY FUND (OFFSHORE)

示例:使用组织编号搜索LEI

from pygleif import Search

gleif_response = Search("5560142720")

# Print the LEI of the company with the LEI above
print(response.data[0].attributes.lei)

# prints 213800T8PC8Q4FYJZR07

支持者