跳转到主要内容

使用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

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

pygleif-2024.8.2.tar.gz (7.9 kB 查看哈希值)

上传时间

构建分布

pygleif-2024.8.2-py3-none-any.whl (7.5 kB 查看哈希值)

上传时间 Python 3

支持者