Skip to content

Commit 9962aa3

Browse files
committed
Merge branch 'master' of github.com:EventRegistry/event-registry-python
2 parents a512978 + cfd868d commit 9962aa3

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## Accessing Event Registry data through Python
1+
## Accessing Event Registry's News API through Python
22

3-
This library contains classes that allow one to obtain from Event Registry (http://eventregistry.org) all available data, such as news articles, events, trends, etc.
3+
This library contains classes and methods that allow one to obtain from Event Registry (http://eventregistry.org) all available data, such as news articles, events, trends, etc.
44

55
The detailed documentation on how to use the library is available at the [project's wiki page](https://github.com/EventRegistry/event-registry-python/wiki). Examples of use are in the [Examples folder in the repository](https://github.com/EventRegistry/event-registry-python/tree/master/eventregistry/examples).
66

@@ -38,6 +38,18 @@ When making queries to Event Registry you will have to use an API key that you c
3838

3939
## Three simple examples to make you interested
4040

41+
**Find news articles that mention Tesla in the article title**
42+
43+
```python
44+
from eventregistry import *
45+
er = EventRegistry(apiKey = YOUR_API_KEY)
46+
# print at most 500 articles
47+
MAX_ITEMS = 500
48+
q = QueryArticlesIter(keywords = "tesla", keywordsLoc="title")
49+
for art in q.execQuery(er, sortBy = "date", maxItems = MAX_ITEMS):
50+
print(art)
51+
```
52+
4153
**Print a list of recently added articles mentioning George Clooney**
4254

4355
```python
@@ -58,15 +70,11 @@ q.setRequestedResult(RequestEventsInfo(sortBy = "date", count=10)) # return ev
5870
print er.execQuery(q)
5971
```
6072

61-
**What are the currently trending topics**
73+
## Run a Jupyter notebook
6274

63-
```python
64-
from eventregistry import *
65-
er = EventRegistry(apiKey = YOUR_API_KEY)
66-
# top 10 trending concepts in the news
67-
q = GetTrendingConcepts(source = "news", count = 10)
68-
print er.execQuery(q)
69-
```
75+
We've also prepared an interactive Jupyter notebook where we demonstrate how you can use the SDK. You can run it online and modify the individual examples.
76+
77+
**[Run Jupyter notebook with examples](https://mybinder.org/v2/gh/EventRegistry/event-registry-python-intro/master)**
7078

7179
## Where to next?
7280

0 commit comments

Comments
 (0)