-
Notifications
You must be signed in to change notification settings - Fork 54
EventRegistry class
EventRegistry
is the main class that you are going to need in order to send any kind of request to the Event Registry. You can create an instance of this class as follows:
from eventregistry import *
er = EventRegistry()
The constructor accepts several relevant parameters, that you can modify:
-
host
[default: "http://eventregistry.org"]. The URL where the Event Registry is available. When testing some new features, you might need to specify a different URL. -
logging
[default: False]. Should the executed web requests be logged in the requests_log.txt file in the package directory? -
minDelayBetweenRequests
[default: 0.5]. What should be the minimum delay in seconds between two requests sent to Event Registry. Remember that each user has a daily request limit so don't spend the requests too fast. -
repeatFailedRequestCount
[default: -1]. In case a request fails (for example, timeout), how many times should it be repeated before giving up. Use -1 to repeat indefinitely.
In case you are a registered user you might wish to log into Event Registry in order to be able to make more requests per day. You can achieve this by calling the EventRegistry.login()
method and passing in the username and password. Alternatively, you can also create a settings.json
file in the eventregistry
package directory. The content of the file should be a simple JSON object:
{
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
}
If this file will be found when creating the EventRegistry
instance it will be automatically used for logging you in.
Core Information
Usage tracking
Terminology
EventRegistry
class
ReturnInfo
class
Data models for returned information
Finding concepts for keywords
Filtering content by news sources
Text analytics
Semantic annotation, categorization, sentiment
Searching
Searching for events
Searching for articles
Article/event info
Get event information
Get article information
Other
Supported languages
Different ways to search using keywords
Feed of new articles/events
Social media shares
Daily trends
Find the event for your own text
Article URL to URI mapping