Query the GLEIF API using Python
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pygleif-2025.7.1.tar.gz
(7.9 kB
view details)
Built Distribution
File details
Details for the file pygleif-2025.7.1.tar.gz
.
File metadata
- Download URL: pygleif-2025.7.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
30ed819ab7886fe61f85deaf88d7b3e8c9b90e4b2a0555906839b13827248882
|
|
MD5 |
e9fbcff723fb80e90344950f9377ad9c
|
|
BLAKE2b-256 |
389f8f3efa5d2efe9df7298f360e73b0a9eef001fa98d1ef4b5aca0d7815f8dc
|
File details
Details for the file pygleif-2025.7.1-py3-none-any.whl
.
File metadata
- Download URL: pygleif-2025.7.1-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b13c2c9b39081c3619848480d31574f83d06e2d77124bd24f75b888005fa14a6
|
|
MD5 |
21aabee2ff7ee6e7b7bd2d79c3b90f09
|
|
BLAKE2b-256 |
2e4c3d8cc41c10d7daeca7c3b57bc0bd438469ced720055f856da077b83f5878
|