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-2024.8.1.tar.gz
(7.8 kB
view details)
Built Distribution
File details
Details for the file pygleif-2024.8.1.tar.gz
.
File metadata
- Download URL: pygleif-2024.8.1.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a4a2e6b0e854032baded46209052de72382e33b78c7b93172ec6a608506097a |
|
MD5 | d547c052e254d78a1a910f391bd44ae0 |
|
BLAKE2b-256 | fbf4ff4d60f40b833663cfd68117cdb9e2a47d43702258cb9d41995b50072a4a |
File details
Details for the file pygleif-2024.8.1-py3-none-any.whl
.
File metadata
- Download URL: pygleif-2024.8.1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa567b8524fd5788e4666a6d51ddbf32ebaa744a51817b6de1b6aaaefbca9219 |
|
MD5 | b9ebe1be35733872aefd3bbb8f0350c7 |
|
BLAKE2b-256 | f45b13980afb137dbfbf97b99f59fb5198fb5c2f3dc23ebb3c492458d8d7391e |