Skip to main content

PyPI version

This library uses Python to query the GLEIF.org's API.

Documentation

Full documentation, including the complete API reference, is available at pygleif.readthedocs.io.

Installing the library

pip install pygleif

To install the latest in-development version from main (may be ahead of the last PyPI release): pip install git+https://github.com/ggravlingen/pygleif.git@main

Example: fetching data for a specific LEI:

from pygleif import GleifClient

client = GleifClient()
response = client.get_lei_record("549300MLUDYVRQOOXS22")

# Print the name of the company with the LEI above
print(response.data.attributes.entity.legal_name.name)
# prints UK EQUITY FUND (OFFSHORE)

Example: search for a LEI using organisation number:

from pygleif import GleifClient

client = GleifClient()
response = client.search_fulltext("5560142720")

# Print the LEI of the company with the LEI above
print(response.data[0].attributes.lei)

# prints 213800T8PC8Q4FYJZR07

Example: iterating over a full result set

iter_search follows the API's pagination for you (async: aiter_search):

from pygleif import GleifClient

client = GleifClient(retries=2)
for record in client.iter_search(
    filters={"entity.legalAddress.country": "SE"},
    max_records=500,
):
    print(record.attributes.lei, record.attributes.entity.legal_name.name)

Command line

The package also installs a pygleif console command:

$ pygleif get 5493001KJTIIGC8Y1R12
$ pygleif search "bank" --page-size 5

Async usage

Every GleifClient method has an a-prefixed async counterpart (e.g. search_fulltext / asearch_fulltext), backed by httpx2:

import asyncio

from pygleif import GleifClient


async def main() -> None:
    async with GleifClient() as client:
        response = await client.aget_lei_record("549300MLUDYVRQOOXS22")
        print(response.data.attributes.entity.legal_name.name)


asyncio.run(main())

Metadata

Release files for pygleif 2026.11.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygleif 2026.11.1
File Size Uploaded Provenance Actions
pygleif-2026.11.1.tar.gz 35.8 kB Without provenance Details for pygleif-2026.11.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pygleif 2026.11.1
File Interpreter ABI Platform Actions
pygleif-2026.11.1-py3-none-any.whl Python 3 none any Details for pygleif-2026.11.1-py3-none-any.whl

Total release size: 77.5 kB

Release files / pygleif-2026.11.1.tar.gz

Download URL pygleif-2026.11.1.tar.gz
Size 35.8 kB
Tags Source
SHA-256 checksum
How to use checksums
855f53372d561f00988c4a78537458e16952820b1eb9031efd5ffee62f485c35
BLAKE2b-256 checksum
How to use checksums
07037c11a15abd49e060ea7a14dfc3154ab3dd8615ab2f0e6c672de07646f6f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pygleif-2026.11.1-py3-none-any.whl

Download URL pygleif-2026.11.1-py3-none-any.whl
Size 41.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99ca3facacd5b9c4d125cd989b7d45ff657bf74a2a7ea40a54be890a172c3229
BLAKE2b-256 checksum
How to use checksums
22b0b11de316f19fce4d967826570f3fd9a71ffdaa97c8ea2c0e3917978b76ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pygleif 2026.11.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page