-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6a0cb8
commit 201ba74
Showing
1 changed file
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,32 @@ | ||
[![PyPI version](https://badge.fury.io/py/pygleif.svg)](https://badge.fury.io/py/pygleif) | ||
|
||
This library queries the API of GLEIF.org to return data about a specific entity company. The result is typed using `Pydantic` It is also possible to search for organisation id to find LEI codes and also to get child notes for a specific LEI code. | ||
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`](https://github.com/pydantic/pydantic). | ||
|
||
### Example: fetching data for a specific LEI: | ||
|
||
```python | ||
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: | ||
|
||
```python | ||
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 | ||
``` |