Skip to main content

Query the GLEIF API using Python

Project description

PyPI version

This library uses Python to query the GLEIF.org's API. Currently, the library supports:

  • Fetching data for a specific API
  • Searching for a LEI using an organisation number

The library is strictly typed using Pydantic.

Installing the library

pip install pygleif

Example: fetching data for a specific 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)

Example: search for a LEI using organisation number:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygleif-2024.8.2.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

pygleif-2024.8.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file pygleif-2024.8.2.tar.gz.

File metadata

  • Download URL: pygleif-2024.8.2.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pygleif-2024.8.2.tar.gz
Algorithm Hash digest
SHA256 d0209ebbcbed4db74a236fe2a29b18c58ca43557375b5bdea6fb06c58a62f228
MD5 de6669948918493c6de99218b6c46df8
BLAKE2b-256 383f64eb5cc9408b808d15210859763652b12ab1549b8c8b23ecaab4e681b486

See more details on using hashes here.

File details

Details for the file pygleif-2024.8.2-py3-none-any.whl.

File metadata

  • Download URL: pygleif-2024.8.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pygleif-2024.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec96c18cb2914aa0d50b59089ce44a39454fb8829186f4707e54d54bec2ee462
MD5 4c6209b3625b1db335b3d510317e6548
BLAKE2b-256 a2dfaca53ec39ddc8bf7a1b4e77dd1a468095d2b6ef6c002888b66cc78ae25d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page