Skip to content

Commit 201ba74

Browse files
authored
Update docs (#329)
1 parent a6a0cb8 commit 201ba74

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
11
[![PyPI version](https://badge.fury.io/py/pygleif.svg)](https://badge.fury.io/py/pygleif)
22

3-
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.
3+
This library uses Python to query the GLEIF.org's API. Currently, the library supports:
4+
- Fetching data for a specific API
5+
- Searching for a LEI using an organisation number
6+
7+
The library is strictly typed using [`Pydantic`](https://github.com/pydantic/pydantic).
8+
9+
### Example: fetching data for a specific LEI:
10+
11+
```python
12+
from pygleif import PyGleif
13+
14+
gleif_response = PyGleif("549300MLUDYVRQOOXS22")
15+
16+
# Print the name of the company with the LEI above
17+
print(gleif_response.response.data.attributes.entity.legal_name.name)
18+
# prints UK EQUITY FUND (OFFSHORE)
19+
```
20+
21+
### Example: search for a LEI using organisatio number:
22+
23+
```python
24+
from pygleif import Search
25+
26+
gleif_response = Search("5560142720")
27+
28+
# Print the LEI of the company with the LEI above
29+
print(response.data[0].attributes.lei)
30+
31+
# prints 213800T8PC8Q4FYJZR07
32+
```

0 commit comments

Comments
 (0)