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 organisatio 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-2024.7.1.tar.gz
(7.8 kB
view hashes)
Built Distribution
Close
Hashes for pygleif-2024.7.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69a0aa0963eb312bc122987497887b0cad86d768828e9332a268c98ee6e419ff |
|
MD5 | b7269ce3eb52040355ebcf5fdc768e32 |
|
BLAKE2b-256 | dd1e061410010bc73071dc36fd9af172d3f793af60e2b3ad0899eeb83c7a226f |