Package Documentation
Client
- class openreview.Client(baseurl=None, username=None, password=None, token=None, tokenExpiresIn=None)[source]
- Parameters:
baseurl (str, optional) – URL to the host, example: https://api.openreview.net (should be replaced by ‘host’ name). If none is provided, it defaults to the environment variable OPENREVIEW_BASEURL
username (str, optional) – OpenReview username. If none is provided, it defaults to the environment variable OPENREVIEW_USERNAME
password (str, optional) – OpenReview password. If none is provided, it defaults to the environment variable OPENREVIEW_PASSWORD
token (str, optional) – Session token. This token can be provided instead of the username and password if the user had already logged in
tokenExpiresIn – Time in seconds before the token expires. This parameter only works when providing a username and a password. If none is set, the value will be set automatically to one day. The max value that it can be set to is 1 week.
- activate_user(token, content)[source]
Activates a newly registered user
- Parameters:
- Returns:
Dictionary containing user information and the authentication token
- Return type:
Example:
>>> res = client.activate_user('new@user.com', { 'names': [ { 'fullname': 'New User', 'username': '~New_User1' } ], 'emails': ['new@user.com'], 'preferredEmail': 'new@user.com' })
- delete_edges(invitation, id=None, label=None, head=None, tail=None, wait_to_finish=False, soft_delete=False)[source]
Deletes edges by a combination of invitation id and one or more of the optional filters.
- Parameters:
invitation (str) – an invitation ID
label (str, optional) – a matching label ID
head (str, optional) – id of the edge head (head type defined by the edge invitation)
tail (str, optional) – id of the edge tail (tail type defined by the edge invitation)
wait_to_finish (bool, optional) – True if execution should pause until deletion of edges is finished
- Returns:
a {status = ‘ok’} in case of a successful deletion and an OpenReview exception otherwise
- Return type:
- delete_profile_reference(reference_id)[source]
Deletes the Profile Reference specified by reference_id.
- get_all_edges(id=None, invitation=None, head=None, tail=None, label=None, limit=None, offset=None, sort=None, with_count=False, trash=None)[source]
Returns a list of Edge objects based on the filters provided.
- Parameters:
id – a Edge ID. If provided, returns Edge whose ID matches the given ID.
invitation – an Invitation ID. If provided, returns Edges whose “invitation” field is this Invitation ID.
head – Profile ID of the Profile that is connected to the Note ID in tail
tail – Note ID of the Note that is connected to the Profile ID in head
label – Label ID of the match
- get_all_groups(id=None, parent=None, regex=None, member=None, signatory=None, web=None, sort=None, with_count=False)[source]
Gets list of Group objects based on the filters provided. The Groups that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – id of the Group
parent (str, optional) – id of the parent Group
regex (str, optional) – Regex that matches several Group ids
member (str, optional) – Groups that contain this member
signatory (str, optional) – Groups that contain this signatory
web (bool, optional) – Groups that contain a web field value
after (str, optional) – Group id to start getting the list of groups from.
- Returns:
List of Groups
- Return type:
- get_all_invitations(id=None, ids=None, invitee=None, replytoNote=None, replyForum=None, signature=None, note=None, regex=None, tags=None, minduedate=None, duedate=None, pastdue=None, replyto=None, details=None, expired=None, super=None, sort=None, with_count=False, type=None)[source]
Gets list of Invitation objects based on the filters provided. The Invitations that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – id of the Invitation
ids (str, optional) – Comma separated Invitation IDs. If provided, returns invitations whose “id” value is any of the passed Invitation IDs.
invitee (str, optional) – Invitations that contain this invitee
replytoNote (str, optional) – Invitations that contain this replytoNote
replyForum (str, optional) – Invitations that contain this replyForum
signature (optional) – Invitations that contain this signature
note (str, optional) – Invitations that contain this note
regex (str, optional) – Invitation ids that match this regex
tags (Tag, optional) – Invitations that contain these tags
minduedate (int, optional) – Invitations that have at least this value as due date
duedate (int, optional) – Invitations that contain this due date
pastdue (bool, optional) – Invitaions that are past due
replyto (optional) – Invitations that contain this replyto
details (dict, optional) – TODO: What is a valid value for this field?
expired (bool, optional) – If true, retrieves the Invitations that have expired, otherwise, the ones that have not expired
- Returns:
List of Invitations
- Return type:
- get_all_notes(id=None, paperhash=None, forum=None, original=None, invitation=None, replyto=None, tauthor=None, signature=None, signatures=None, writer=None, trash=None, number=None, content=None, mintcdate=None, details=None, sort=None, select=None, with_count=False)[source]
Gets list of Note objects based on the filters provided. The Notes that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – a Note ID. If provided, returns Notes whose ID matches the given ID.
paperhash (str, optional) – A “paperhash” for a note. If provided, returns Notes whose paperhash matches this argument. (A paperhash is a human-interpretable string built from the Note’s title and list of authors to uniquely identify the Note)
forum (str, optional) – A Note ID. If provided, returns Notes whose forum matches the given ID.
invitation (str, optional) – An Invitation ID. If provided, returns Notes whose “invitation” field is this Invitation ID.
replyto (str, optional) – A Note ID. If provided, returns Notes whose replyto field matches the given ID.
signature (str, optional) – A Group ID. If provided, returns Notes whose signatures field contains the given Group ID.
signatures (list[str], optional) – Group IDs. If provided, returns Notes whose signatures field contains the given Group IDs.
writer (str, optional) – A Group ID. If provided, returns Notes whose writers field contains the given Group ID.
trash (bool, optional) – If True, includes Notes that have been deleted (i.e. the ddate field is less than the current date)
number (int, optional) – If present, includes Notes whose number field equals the given integer.
content (dict, optional) – If present, includes Notes whose each key is present in the content field and it is equals the given value.
after (str, optional) – Note id to start getting the list of notes from.
mintcdate (int, optional) – Represents an Epoch time timestamp, in milliseconds. If provided, returns Notes whose “true creation date” (tcdate) is at least equal to the value of mintcdate.
details (optional) – Comma separated values of fields to add to details. Valid values are: replyCount: Number of replies in a forum. Only available if the Note is a forum. original: Include original Note if available. revisions: Boolean indicating whether the Note has revisions. writable: Boolean indicating whether the Note is writable by the user. originalWritable: Boolean indicating whether the original Note is writable by the user. tags: Tags of the Note. invitation: Invitation of the Note. originalInvitation: Invitation of the original Note. directReplyCount: Number of direct replies to the Note. directReplies: Direct replies to the Note. replies: Replies to the Note. Only available if the Note is a forum.
sort (str, optional) – Sorts the output by field depending on the string passed. Possible values: number, cdate, ddate, tcdate, tmdate, replyCount (Invitation id needed in the invitation field).
- Returns:
List of Notes
- Return type:
- get_all_references(referent=None, invitation=None, content=None, mintcdate=None, limit=None, offset=None, original=False, trash=None, with_count=False)[source]
Gets a list of revisions for a note. The revisions that will be returned match all the criteria passed in the parameters.
Refer to the section of Mental Models and then click on Blind Submissions for more information.
- Parameters:
referent (str, optional) – A Note ID. If provided, returns references whose “referent” value is this Note ID.
invitation (str, optional) – An Invitation ID. If provided, returns references whose “invitation” field is this Invitation ID.
mintcdate (int, optional) – Represents an Epoch time timestamp, in milliseconds. If provided, returns references whose “true creation date” (tcdate) is at least equal to the value of mintcdate.
original (bool, optional) – If True then get_references will additionally return the references to the original note.
- Returns:
List of revisions
- Return type:
- get_all_tags(id=None, invitation=None, forum=None, signature=None, tag=None, limit=None, offset=None, with_count=False)[source]
Gets a list of Tag objects based on the filters provided. The Tags that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – A Tag ID. If provided, returns Tags whose ID matches the given ID.
forum (str, optional) – A Note ID. If provided, returns Tags whose forum matches the given ID.
invitation (str, optional) – An Invitation ID. If provided, returns Tags whose “invitation” field is this Invitation ID.
- Returns:
List of tags
- Return type:
- get_attachment(id, field_name)[source]
Gets the binary content of a attachment using the provided note id If the pdf is not found then this returns an error message with “status”:404.
- Parameters:
- Returns:
The binary content of a pdf
- Return type:
Example:
>>> f = get_attachment(id='Place Note-ID here', field_name='pdf') >>> with open('output.pdf','wb') as op: op.write(f)
- get_edge(id)[source]
Get a single Edge by id if available
- Parameters:
id (str) – id of the Edge
return: Edge object with its information :rtype: Edge
- get_edges(id=None, invitation=None, head=None, tail=None, label=None, limit=None, offset=None, sort=None, with_count=False, trash=None)[source]
Returns a list of Edge objects based on the filters provided.
- Parameters:
id – a Edge ID. If provided, returns Edge whose ID matches the given ID.
invitation – an Invitation ID. If provided, returns Edges whose “invitation” field is this Invitation ID.
head – Profile ID of the Profile that is connected to the Note ID in tail
tail – Note ID of the Note that is connected to the Profile ID in head
label – Label ID of the match
- get_edges_count(id=None, invitation=None, head=None, tail=None, label=None)[source]
Returns a list of Edge objects based on the filters provided.
- Parameters:
id – a Edge ID. If provided, returns Edge whose ID matches the given ID.
invitation – an Invitation ID. If provided, returns Edges whose “invitation” field is this Invitation ID.
head – Profile ID of the Profile that is connected to the Note ID in tail
tail – Note ID of the Note that is connected to the Profile ID in head
label – Label ID of the match
- get_group(id, details=None)[source]
Get a single Group by id if available
- Parameters:
id (str) – id of the group
- Returns:
Dictionary with the group information
- Return type:
Example:
>>> group = client.get_group('your-email@domain.com')
- get_grouped_edges(invitation=None, head=None, tail=None, label=None, groupby='head', select='tail', limit=None, offset=None)[source]
Returns a list of JSON objects where each one represents a group of edges. For example calling this method with default arguments will give back a list of groups where each group is of the form: {id: {head: paper-1} values: [ {tail: user-1}, {tail: user-2} ]} Note: The limit applies to the number of groups returned. It does not apply to the number of edges within the groups.
- Parameters:
invitation
groupby
select
limit
offset
- Returns:
- get_groups(id=None, ids=None, parent=None, regex=None, member=None, members=None, signatory=None, web=None, limit=None, offset=None, after=None, stream=None, sort=None, with_count=False, select=None)[source]
Gets list of Group objects based on the filters provided. The Groups that will be returned match all the criteria passed in the parameters.
- Parameters:
id (list, optional) – id of the Group
ids – Group ids
regex (str, optional) – Regex that matches several Group ids
member (str, optional) – Groups that contain this member
signatory (str, optional) – Groups that contain this signatory
web (bool, optional) – Groups that contain a web field value
limit (int, optional) – Maximum amount of Groups that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Groups will be returned
offset (int, optional) – Indicates the position to start retrieving Groups. For example, if there are 10 Groups and you want to obtain the last 3, then the offset would need to be 7.
select (str, optional) – Specific field of the group. Only this field would be returned for all the groups
- Returns:
List of Groups
- Return type:
- get_institutions(id=None, domain=None)[source]
Get a single Institution by id or domain if available
- Parameters:
- Returns:
Dictionary with the Institution information
- Return type:
Example:
>>> institution = client.get_institutions(domain='umass.edu')
- get_invitation(id)[source]
Get a single invitation by id if available
- Parameters:
id (str) – id of the invitation
- Returns:
Invitation matching the passed id
- Return type:
- get_invitations(id=None, ids=None, invitee=None, replytoNote=None, replyForum=None, signature=None, note=None, regex=None, tags=None, limit=None, offset=None, after=None, minduedate=None, duedate=None, pastdue=None, replyto=None, details=None, expired=None, sort=None, super=None, with_count=False, select=None, type=None)[source]
Gets list of Invitation objects based on the filters provided. The Invitations that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – id of the Invitation
ids (str, optional) – Comma separated Invitation IDs. If provided, returns invitations whose “id” value is any of the passed Invitation IDs.
invitee (str, optional) – Invitations that contain this invitee
replytoNote (str, optional) – Invitations that contain this replytoNote
replyForum (str, optional) – Invitations that contain this replyForum
signature (optional) – Invitations that contain this signature
note (str, optional) – Invitations that contain this note
regex (str, optional) – Invitation ids that match this regex
tags (Tag, optional) – Invitations that contain these tags
limit (int, optional) – Maximum amount of Invitations that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Invitations will be returned
offset (int, optional) – Indicates the position to start retrieving Invitations. For example, if there are 10 Invitations and you want to obtain the last 3, then the offset would need to be 7.
after (str, optional) – Invitation id to start getting the list of invitations from.
minduedate (int, optional) – Invitations that have at least this value as due date
duedate (int, optional) – Invitations that contain this due date
pastdue (bool, optional) – Invitaions that are past due
replyto (optional) – Invitations that contain this replyto
details (dict, optional) – TODO: What is a valid value for this field?
expired (bool, optional) – If true, retrieves the Invitations that have expired, otherwise, the ones that have not expired
select (str, optional) – Specific field of the group. Only this field would be returned for all the groups
- Returns:
List of Invitations
- Return type:
- get_jobs_status()[source]
Only for Super User. Retrieves the jobs status of the queue
- Returns:
Jobs status
- Return type:
- get_messages(to=None, subject=None, status=None, offset=None, limit=None, with_count=False)[source]
Only for Super User. Retrieves all the messages sent to a list of usernames or emails and/or a particular e-mail subject
- Parameters:
- Returns:
Messages that match the passed parameters
- Return type:
- get_notes(id=None, paperhash=None, forum=None, original=None, invitation=None, replyto=None, tauthor=None, signature=None, signatures=None, writer=None, trash=None, number=None, content=None, limit=None, offset=None, after=None, mintcdate=None, details=None, sort=None, with_count=False, select=None)[source]
Gets list of Note objects based on the filters provided. The Notes that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – a Note ID. If provided, returns Notes whose ID matches the given ID.
paperhash (str, optional) – A “paperhash” for a note. If provided, returns Notes whose paperhash matches this argument. (A paperhash is a human-interpretable string built from the Note’s title and list of authors to uniquely identify the Note)
forum (str, optional) – A Note ID. If provided, returns Notes whose forum matches the given ID.
original (str, optional) – A Note ID. If provided, returns Notes whose original matches the given ID.
invitation (str, optional) – An Invitation ID. If provided, returns Notes whose “invitation” field is this Invitation ID.
replyto (str, optional) – A Note ID. If provided, returns Notes whose replyto field matches the given ID.
tauthor (bool, optional) – If provided, returns Notes whose true author is the user requesting the Notes.
signature (str, optional) – A Group ID. If provided, returns Notes whose signatures field contains the given Group ID.
signatures (list[str], optional) – Group IDs. If provided, returns Notes whose signatures field contains the given Group IDs.
writer (str, optional) – A Group ID. If provided, returns Notes whose writers field contains the given Group ID.
trash (bool, optional) – If True, includes Notes that have been deleted (i.e. the ddate field is less than the current date)
number (int, optional) – If present, includes Notes whose number field equals the given integer.
content (dict, optional) – If present, includes Notes whose each key is present in the content field and it is equals the given value.
limit (int, optional) – Maximum amount of Notes that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Notes will be returned
offset (int, optional) – Indicates the position to start retrieving Notes. For example, if there are 10 Notes and you want to obtain the last 3, then the offset would need to be 7.
after (str, optional) – Note id to start getting the list of notes from.
mintcdate (int, optional) – Represents an Epoch time timestamp, in milliseconds. If provided, returns Notes whose “true creation date” (tcdate) is at least equal to the value of mintcdate.
details (str, optional) – Comma separated values of fields to add to details. Valid values are: replyCount: Number of replies in a forum. Only available if the Note is a forum. original: Include original Note if available. revisions: Boolean indicating whether the Note has revisions. writable: Boolean indicating whether the Note is writable by the user. originalWritable: Boolean indicating whether the original Note is writable by the user. tags: Tags of the Note. invitation: Invitation of the Note. originalInvitation: Invitation of the original Note. directReplyCount: Number of direct replies to the Note. directReplies: Direct replies to the Note. replies: Replies to the Note. Only available if the Note is a forum.
sort (str, optional) – Sorts the output by field depending on the string passed. Possible values: number, cdate, ddate, tcdate, tmdate, replyCount (Invitation id needed in the invitation field).
select (str, optional) – Specific field of the group. Only this field would be returned for all the groups
- Returns:
List of Notes
- Return type:
- get_pdf(id, is_reference=False)[source]
Gets the binary content of a pdf using the provided note/reference id If the pdf is not found then this returns an error message with “status”:404.
Use the note id when trying to get the latest pdf version and reference id when trying to get a previous version of the pdf
- Parameters:
- Returns:
The binary content of a pdf
- Return type:
Example:
>>> f = get_pdf(id='Place Note-ID here') >>> with open('output.pdf','wb') as op: op.write(f)
- get_process_logs(id=None, invitation=None, status=None)[source]
Only for Super User. Retrieves the logs of the process function executed by an Invitation
- get_references(referent=None, invitation=None, content=None, mintcdate=None, limit=None, offset=None, original=False, trash=None, with_count=False)[source]
Gets a list of revisions for a note. The revisions that will be returned match all the criteria passed in the parameters.
Refer to the section of Mental Models and then click on Blind Submissions for more information.
- Parameters:
referent (str, optional) – A Note ID. If provided, returns references whose “referent” value is this Note ID.
invitation (str, optional) – An Invitation ID. If provided, returns references whose “invitation” field is this Invitation ID.
mintcdate (int, optional) – Represents an Epoch time timestamp, in milliseconds. If provided, returns references whose “true creation date” (tcdate) is at least equal to the value of mintcdate.
original (bool, optional) – If True then get_references will additionally return the references to the original note.
- Returns:
List of revisions
- Return type:
- get_tags(id=None, invitation=None, forum=None, signature=None, tag=None, limit=None, offset=None, with_count=False)[source]
Gets a list of Tag objects based on the filters provided. The Tags that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – A Tag ID. If provided, returns Tags whose ID matches the given ID.
forum (str, optional) – A Note ID. If provided, returns Tags whose forum matches the given ID.
invitation (str, optional) – An Invitation ID. If provided, returns Tags whose “invitation” field is this Invitation ID.
- Returns:
List of tags
- Return type:
- get_tildeusername(fullname)[source]
Gets next possible tilde user name corresponding to the specified full name
- get_venues(id=None, ids=None, invitations=None)[source]
Gets list of Note objects based on the filters provided. The Notes that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – a Venue ID. If provided, returns Notes whose ID matches the given ID.
ids (list, optional) – A list of Venue IDs. If provided, returns Notes containing these IDs.
invitations (list, optional) – A list of Invitation IDs. If provided, returns Venues whose “invitation” field is this Invitation ID.
- Returns:
List of Venues
- Return type:
- infer_note(note_id)[source]
Posts the note. If the note is unsigned, signs it using the client’s default signature.
- login_user(username=None, password=None, expiresIn=None)[source]
Logs in a registered user
- Parameters:
- Returns:
Dictionary containing user information and the authentication token
- Return type:
- post_direct_message(subject, recipients, message, sender=None)[source]
Posts a message to the recipients and consequently sends them emails
- post_edges(edges)[source]
Posts the list of Edges. Returns a list Edge objects updated with their ids.
- post_group(group, overwrite=True)[source]
Posts the group. If the group is unsigned, signs it using the client’s default signature.
- post_institution(institution)[source]
Requires Super User permission. Adds an institution if the institution id is not found in the database, otherwise, the institution is updated.
- post_invitation(invitation)[source]
Posts the invitation. If the invitation is unsigned, signs it using the client’s default signature.
- Parameters:
invitation (Invitation) – Invitation to be posted
- Returns:
The posted Invitation
- Return type:
- post_message(subject, recipients, message, ignoreRecipients=None, sender=None, replyTo=None, parentGroup=None, useJob=False)[source]
Posts a message to the recipients and consequently sends them emails
- Parameters:
recipients (list[str]) – Recipients of the e-mail. Valid inputs would be tilde username or emails registered in OpenReview
message (str) – Message in the e-mail
ignoreRecipients – List of groups ids to be ignored from the recipient list
sender (dict) – Specify the from address and name of the email, the dictionary should have two keys: ‘name’ and ‘email’
replyTo (str) – e-mail address used when recipients reply to this message
parentGroup (str) – parent group recipients of e-mail belong to
- Returns:
Contains the message that was sent to each Group
- Return type:
- post_note(note)[source]
Posts the note. If the note is unsigned, signs it using the client’s default signature.
- post_tag(tag)[source]
Posts the tag. If the tag is unsigned, signs it using the client’s default signature.
- Parameters:
tag (Tag) – Tag to be posted
- Return Tag:
The posted Tag
- register_user(email=None, fullname=None, password=None)[source]
Registers a new user
- Parameters:
- Returns:
Dictionary containing the new user information including his id, username, email(s), readers, writers, etc.
- Return type:
- rename_edges(current_id, new_id)[source]
Updates an Edge
- Parameters:
profile – Edge object
- Returns:
The new updated Edge
- Return type:
Edge
- search_notes(term, content='all', group='all', source='all', limit=None, offset=None)[source]
Searches notes based on term, content, group and source as the criteria. Unlike
get_notes()
, this method uses Elasticsearch to retrieve the Notes- Parameters:
term (str) – Term used to look for the Notes
content (str, optional) – Specifies whether to look in all the content, authors, or keywords. Valid inputs: ‘all’, ‘authors’, ‘keywords’
group (str, optional) – Specifies under which Group to look. E.g. ‘all’, ‘ICLR’, ‘UAI’, etc.
source (str, optional) – Whether to look in papers, replies or all
limit (int, optional) – Maximum amount of Notes that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Notes will be returned
offset (int, optional) – Indicates the position to start retrieving Notes. For example, if there are 10 Notes and you want to obtain the last 3, then the offset would need to be 7.
- Returns:
List of notes
- Return type:
- search_profiles(confirmedEmails=None, emails=None, ids=None, term=None, first=None, middle=None, last=None, fullname=None, relation=None, use_ES=False)[source]
Gets a list of profiles using either their ids or corresponding emails
- Parameters:
confirmedEmails (list, optional) – List of confirmed emails registered in OpenReview
emails (list, optional) – List of emails registered in OpenReview
ids (list, optional) – List of OpenReview username ids
term (str, optional) – Substring in the username or e-mail to be searched
first (str, optional) – First name of user
middle (str, optional) – Middle name of user
last (str, optional) – Last name of user
- Returns:
List of profiles, if emails is present then a dictionary of { email: profiles } is returned. If confirmedEmails is present then a dictionary of { email: profile } is returned
- Return type:
- class openreview.Group(id, readers, writers, signatories, signatures, invitation=None, parent=None, cdate=None, ddate=None, tcdate=None, tmdate=None, members=None, nonreaders=None, impersonators=None, web=None, web_string=None, anonids=None, deanonymizers=None, host=None, domain=None, details=None)[source]
When a user is created, it is automatically assigned to certain groups that give him different privileges. A username is also a group, therefore, groups can be members of other groups.
- Parameters:
id (str) – id of the Group
readers (list[str]) – List of readers in the Group, each reader is a Group id
writers (list[str]) – List of writers in the Group, each writer is a Group id
signatories (list[str]) – List of signatories in the Group, each writer is a Group id
signatures (list[str]) – List of signatures in the Group, each signature is a Group id
cdate (int, optional) – Creation date of the Group
ddate (int, optional) – Deletion date of the Group
tcdate (int, optional) – true creation date of the Group
tmdate (int, optional) – true modification date of the Group
members (list[str], optional) – List of members in the Group, each member is a Group id
nonreaders (list[str], optional) – List of nonreaders in the Group, each nonreader is a Group id
web (optional) – Path to a file that contains the webfield
web_string (str, optional) – String containing the webfield for this Group
details (optional)
- add_member(member)[source]
Adds a member to the group. This is done only on the object not in OpenReview. Another method like
post()
is needed for the change to show in OpenReview
- add_webfield(web)[source]
Adds a webfield to the group
- Parameters:
web (str) – Path to the file that contains the webfield
- classmethod from_json(g)[source]
Creates a Group object from a dictionary that contains keys values equivalent to the name of the instance variables of the Group class
- post(client)[source]
Posts a group to OpenReview
- Parameters:
client (Client) – Client that will post the Group
- class openreview.Invitation(id=None, readers=None, writers=None, invitees=None, signatures=None, reply=None, edit=None, super=None, noninvitees=None, nonreaders=None, web=None, web_string=None, process=None, process_string=None, preprocess=None, duedate=None, expdate=None, cdate=None, ddate=None, tcdate=None, tmdate=None, multiReply=None, taskCompletionCount=None, transform=None, bulk=None, reply_forum_views=[], responseArchiveDate=None, details=None)[source]
- Parameters:
id (str) – Invitation id
readers (list[str], optional) – List of readers in the Invitation, each reader is a Group id
writers (list[str], optional) – List of writers in the Invitation, each writer is a Group id
invitees (list[str], optional) – List of invitees in the Invitation, each invitee is a Group id
signatures (list[str], optional) – List of signatures in the Invitation, each signature is a Group id
reply (dict, optional) – Template of the Note that will be created
super (str, optional) – Parent Invitation id
noninvitees (list[str], optional) – List of noninvitees in the Invitation, each noninvitee is a Group id
nonreaders (list[str], optional) – List of nonreaders in the Invitation, each nonreader is a Group id
web (str, optional) – Path to a file containing a webfield
web_string (str, optional) – String containing the webfield
process (str, optional) – Path to a file containing the process function
process_string (str, optional) – String containing the process function
duedate (int, optional) – Due date
expdate (int, optional) – Expiration date
cdate (int, optional) – Creation date
ddate (int, optional) – Deletion date
tcdate (int, optional) – True creation date
tmdate (int, optional) – Modification date
multiReply (bool, optional) – If true, allows for multiple Notes created from this Invitation (e.g. comments in a forum), otherwise, only one Note may be created (e.g. paper submission)
taskCompletionCount (int, optional) – Keeps count of the number of times the Invitation has been used
transform (str, optional) – Path to a file that contains the transform function
details (dict, optional)
- classmethod from_json(i)[source]
Creates an Invitation object from a dictionary that contains keys values equivalent to the name of the instance variables of the Invitation class
- Parameters:
i (dict) – Dictionary containing key-value pairs, where the keys values are equivalent to the name of the instance variables in the Invitation class
- Returns:
Invitation whose instance variables contain the values from the dictionary
- Return type:
- class openreview.Note(invitation, readers, writers, signatures, content, id=None, original=None, number=None, cdate=None, pdate=None, odate=None, mdate=None, tcdate=None, tmdate=None, ddate=None, forum=None, referent=None, replyto=None, nonreaders=None, details=None, tauthor=None)[source]
- Parameters:
invitation (str) – Invitation id
readers (list[str]) – List of readers in the Invitation, each reader is a Group id
writers (list[str]) – List of writers in the Invitation, each writer is a Group id
signatures (list[str]) – List of signatures in the Invitation, each signature is a Group id
content (dict) – Content of the Note
id (str, optional) – Note id
original (str, optional) – If this Note is a blind copy of a Note, then this contains the id of that Note
number (int, optional) – Note number. E.g. when the Note is a paper submission, this value is the paper number
cdate (int, optional) – Creation date
pdate (int, optional) – Publication date
tcdate (int, optional) – True creation date
tmdate (int, optional) – Modification date
ddate (int, optional) – Deletion date
forum (str, optional) – Forum id
referent (str, optional) – If this Note is used as a ref, this field points to the Profile
replyto (str, optional) – A Note ID. If provided, returns Notes whose replyto field matches the given ID
nonreaders (list[str], optional) – List of nonreaders in the Invitation, each nonreader is a Group id
details (dict, optional)
tauthor (str, optional) – True author
- classmethod from_json(n)[source]
Creates a Note object from a dictionary that contains keys values equivalent to the name of the instance variables of the Note class :param n: Dictionary containing key-value pairs, where the keys values are equivalent to the name of the instance variables in the Note class :type n: dict :return: Note whose instance variables contain the values from the dictionary :rtype: Note
- class openreview.Tag(tag, invitation, readers, signatures, id=None, cdate=None, tcdate=None, ddate=None, forum=None, replyto=None, nonreaders=None)[source]
- Parameters:
tag (str) – Content of the tag
invitation (str) – Invitation id
readers (list[str]) – List of readers in the Invitation, each reader is a Group id
signatures (list[str]) – List of signatures in the Invitation, each signature is a Group id
id (str, optional) – Tag id
cdate (int, optional) – Creation date
tcdate (int, optional) – True creation date
ddate (int, optional) – Deletion date
forum (str, optional) – Forum id
nonreaders (list[str], optional) – List of nonreaders in the Invitation, each nonreader is a Group id
- class openreview.Profile(id=None, active=None, password=None, number=None, tcdate=None, tmdate=None, referent=None, packaging=None, invitation=None, readers=None, nonreaders=None, signatures=None, writers=None, content=None, metaContent=None, tauthor=None, state=None)[source]
- Parameters:
id (str, optional) – Profile id
tcdate (int, optional) – True creation date
tmdate (int, optional) – Modification date
referent (str, optional) – If this is a ref, it contains the Profile id that it points to
packaging (dict, optional) – Contains previous versions of this Profile
invitation (str, optional) – Invitation id
readers (str, optional) – List of readers in the Invitation, each reader is a Group id
nonreaders (str, optional) – List of nonreaders in the Invitation, each nonreader is a Group id
signatures (str, optional) – List of signatures in the Invitation, each signature is a Group id
writers (str, optional) – List of writers in the Invitation, each writer is a Group id
content (dict, optional) – Dictionary containing the information of the Profile
metaContent (dict, optional) – Contains information of the entities that have changed the Profile
active (bool, optional) – If true, the Profile is active in OpenReview
password (bool, optional) – If true, the Profile has a password, otherwise, it was automatically created and the person that it belongs to has not set a password yet
tauthor (str, optional) – True author
API 2 Client
- class openreview.api.OpenReviewClient(baseurl=None, username=None, password=None, token=None, tokenExpiresIn=None)[source]
- Parameters:
baseurl (str, optional) – URL to the host, example: https://api.openreview.net (should be replaced by ‘host’ name). If none is provided, it defaults to the environment variable OPENREVIEW_BASEURL
username (str, optional) – OpenReview username. If none is provided, it defaults to the environment variable OPENREVIEW_USERNAME
password (str, optional) – OpenReview password. If none is provided, it defaults to the environment variable OPENREVIEW_PASSWORD
token (str, optional) – Session token. This token can be provided instead of the username and password if the user had already logged in
expiresIn (number, optional) – Time in seconds before the token expires. If none is set the value will be set automatically to one hour. The max value that it can be set to is 1 week.
- activate_user(token, content)[source]
Activates a newly registered user
- Parameters:
- Returns:
Dictionary containing user information and the authentication token
- Return type:
Example:
>>> res = client.activate_user('new@user.com', { 'names': [ { 'first': 'New', 'last': 'User', 'username': '~New_User1' } ], 'emails': ['new@user.com'], 'preferredEmail': 'new@user.com' })
- confirm_alternate_email(profile_id, alternate_email, activation_token=None)[source]
Confirms an alternate email address
- delete_edges(invitation, id=None, label=None, head=None, tail=None, wait_to_finish=False, soft_delete=False)[source]
Deletes edges by a combination of invitation id and one or more of the optional filters.
- Parameters:
invitation (str) – an invitation ID
label (str, optional) – a matching label ID
head (str, optional) – id of the edge head (head type defined by the edge invitation)
tail (str, optional) – id of the edge tail (tail type defined by the edge invitation)
wait_to_finish (bool, optional) – True if execution should pause until deletion of edges is finished
- Returns:
a {status = ‘ok’} in case of a successful deletion and an OpenReview exception otherwise
- Return type:
- delete_profile_reference(reference_id)[source]
Deletes the Profile Reference specified by reference_id.
- get_all_edges(id=None, invitation=None, head=None, tail=None, label=None, limit=None, offset=None, with_count=False, trash=None)[source]
Returns a list of Edge objects based on the filters provided.
- Parameters:
id – a Edge ID. If provided, returns Edge whose ID matches the given ID.
invitation – an Invitation ID. If provided, returns Edges whose “invitation” field is this Invitation ID.
head – Profile ID of the Profile that is connected to the Note ID in tail
tail – Note ID of the Note that is connected to the Profile ID in head
label – Label ID of the match
- get_all_groups(id=None, parent=None, prefix=None, member=None, members=None, domain=None, signatory=None, web=None, sort=None, with_count=False)[source]
Gets list of Group objects based on the filters provided. The Groups that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – id of the Group
parent (str, optional) – id of the parent Group
prefix (str, optional) – Prefix that matches several Group ids
member (str, optional) – Groups that that are trasitive members of the member value
members (str, optional) – Groups that contain the value members in the members field
signatory (str, optional) – Groups that contain this signatory
web (bool, optional) – Groups that contain a web field value
limit (int, optional) – Maximum amount of Groups that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Groups will be returned
offset (int, optional) – Indicates the position to start retrieving Groups. For example, if there are 10 Groups and you want to obtain the last 3, then the offset would need to be 7.
after (str, optional) – Group id to start getting the list of groups from.
- Returns:
List of Groups
- Return type:
- get_all_invitations(id=None, ids=None, invitee=None, replytoNote=None, replyForum=None, signature=None, note=None, prefix=None, tags=None, minduedate=None, duedate=None, pastdue=None, replyto=None, details=None, expired=None, sort=None, type=None, with_count=False, invitation=None)[source]
Gets list of Invitation objects based on the filters provided. The Invitations that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – id of the Invitation
ids (str, optional) – Comma separated Invitation IDs. If provided, returns invitations whose “id” value is any of the passed Invitation IDs.
invitee (str, optional) – Invitations that contain this invitee
replytoNote (str, optional) – Invitations that contain this replytoNote
replyForum (str, optional) – Invitations that contain this replyForum
signature (optional) – Invitations that contain this signature
note (str, optional) – Invitations that contain this note
prefix (str, optional) – Invitation ids that match this prefix
tags (Tag, optional) – Invitations that contain these tags
minduedate (int, optional) – Invitations that have at least this value as due date
duedate (int, optional) – Invitations that contain this due date
pastdue (bool, optional) – Invitaions that are past due
replyto (optional) – Invitations that contain this replyto
details (dict, optional) – TODO: What is a valid value for this field?
expired (bool, optional) – If true, retrieves the Invitations that have expired, otherwise, the ones that have not expired
- Returns:
List of Invitations
- Return type:
- get_all_notes(id=None, paperhash=None, forum=None, invitation=None, replyto=None, signature=None, transitive_members=None, signatures=None, writer=None, trash=None, number=None, content=None, mintcdate=None, details=None, select=None, sort=None, with_count=False)[source]
Gets list of Note objects based on the filters provided. The Notes that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – a Note ID. If provided, returns Notes whose ID matches the given ID.
paperhash (str, optional) – A “paperhash” for a note. If provided, returns Notes whose paperhash matches this argument. (A paperhash is a human-interpretable string built from the Note’s title and list of authors to uniquely identify the Note)
forum (str, optional) – A Note ID. If provided, returns Notes whose forum matches the given ID.
invitation (str, optional) – An Invitation ID. If provided, returns Notes whose “invitation” field is this Invitation ID.
replyto (str, optional) – A Note ID. If provided, returns Notes whose replyto field matches the given ID.
signature (str, optional) – A Group ID. If provided, returns Notes whose signatures field contains the given Group ID.
transitive_members (bool, optional) – If true, returns Notes whose tauthor field is a transitive member of the Group represented by the given Group ID.
signatures (list[str], optional) – Group IDs. If provided, returns Notes whose signatures field contains the given Group IDs.
writer (str, optional) – A Group ID. If provided, returns Notes whose writers field contains the given Group ID.
trash (bool, optional) – If True, includes Notes that have been deleted (i.e. the ddate field is less than the current date)
number (int, optional) – If present, includes Notes whose number field equals the given integer.
content (dict, optional) – If present, includes Notes whose each key is present in the content field and it is equals the given value.
after (str, optional) – Note id to start getting the list of notes from.
mintcdate (int, optional) – Represents an Epoch time timestamp, in milliseconds. If provided, returns Notes whose “true creation date” (tcdate) is at least equal to the value of mintcdate.
details (optional) – TODO: What is a valid value for this field?
sort (str, optional) – Sorts the output by field depending on the string passed. Possible values: number, cdate, ddate, tcdate, tmdate, replyCount (Invitation id needed in the invitation field).
- Returns:
List of Notes
- Return type:
- get_all_tags(id=None, invitation=None, forum=None, signature=None, tag=None, limit=None, offset=None, with_count=False)[source]
Gets a list of Tag objects based on the filters provided. The Tags that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – A Tag ID. If provided, returns Tags whose ID matches the given ID.
forum (str, optional) – A Note ID. If provided, returns Tags whose forum matches the given ID.
invitation (str, optional) – An Invitation ID. If provided, returns Tags whose “invitation” field is this Invitation ID.
- Returns:
List of tags
- Return type:
- get_archived_edges(invitation)[source]
Returns a list of Edge objects based on the filters provided.
- Parameters:
invitation – an Invitation ID. If provided, returns Edges whose “invitation” field is this Invitation ID.
- get_attachment(id, field_name)[source]
Gets the binary content of a attachment using the provided note id If the pdf is not found then this returns an error message with “status”:404.
- Parameters:
- Returns:
The binary content of a pdf
- Return type:
Example:
>>> f = get_attachment(id='Place Note-ID here', field_name='pdf') >>> with open('output.pdf','wb') as op: op.write(f)
- get_edge(id, trash=False)[source]
Get a single Edge by id if available
- Parameters:
id (str) – id of the Edge
return: Edge object with its information :rtype: Edge
- get_edges(id=None, invitation=None, head=None, tail=None, label=None, limit=None, offset=None, with_count=False, trash=None)[source]
Returns a list of Edge objects based on the filters provided.
- Parameters:
id – a Edge ID. If provided, returns Edge whose ID matches the given ID.
invitation – an Invitation ID. If provided, returns Edges whose “invitation” field is this Invitation ID.
head – Profile ID of the Profile that is connected to the Note ID in tail
tail – Note ID of the Note that is connected to the Profile ID in head
label – Label ID of the match
- get_edges_count(id=None, invitation=None, head=None, tail=None, label=None)[source]
Returns a list of Edge objects based on the filters provided.
- Parameters:
id – a Edge ID. If provided, returns Edge whose ID matches the given ID.
invitation – an Invitation ID. If provided, returns Edges whose “invitation” field is this Invitation ID.
head – Profile ID of the Profile that is connected to the Note ID in tail
tail – Note ID of the Note that is connected to the Profile ID in head
label – Label ID of the match
- get_group(id, details=None)[source]
Get a single Group by id if available
- Parameters:
id (str) – id of the group
- Returns:
Dictionary with the group information
- Return type:
Example:
>>> group = client.get_group('your-email@domain.com')
- get_group_edits(group_id=None, invitation=None, with_count=False, sort=None, trash=None)[source]
Gets a list of edits for a group. The edits that will be returned match all the criteria passed in the parameters.
- get_grouped_edges(invitation=None, head=None, tail=None, label=None, groupby='head', select=None, limit=None, offset=None, trash=None)[source]
Returns a list of JSON objects where each one represents a group of edges. For example calling this method with default arguments will give back a list of groups where each group is of the form: {id: {head: paper-1} values: [ {tail: user-1}, {tail: user-2} ]} Note: The limit applies to the number of groups returned. It does not apply to the number of edges within the groups.
- Parameters:
invitation
groupby
select
limit
offset
- Returns:
- get_groups(id=None, prefix=None, member=None, members=None, signatory=None, web=None, limit=None, offset=None, after=None, stream=None, sort=None, with_count=False)[source]
Gets list of Group objects based on the filters provided. The Groups that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – id of the Group
prefix (str, optional) – Prefix that matches several Group ids
member (str, optional) – Groups that that are transitive members of the member value
members (str, optional) – Groups that contain the value members in the members field
signatory (str, optional) – Groups that contain this signatory
web (bool, optional) – Groups that contain a web field value
limit (int, optional) – Maximum amount of Groups that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Groups will be returned
offset (int, optional) – Indicates the position to start retrieving Groups. For example, if there are 10 Groups and you want to obtain the last 3, then the offset would need to be 7.
- Returns:
List of Groups
- Return type:
- get_institutions(id=None, domain=None)[source]
Get a single Institution by id or domain if available
- Parameters:
- Returns:
Dictionary with the Institution information
- Return type:
Example:
>>> institution = client.get_institutions(domain='umass.edu')
- get_invitation(id)[source]
Get a single invitation by id if available
- Parameters:
id (str) – id of the invitation
- Returns:
Invitation matching the passed id
- Return type:
- get_invitation_edits(invitation_id=None, invitation=None, with_count=False, sort=None)[source]
Gets a list of edits for a note. The edits that will be returned match all the criteria passed in the parameters.
- get_invitations(id=None, ids=None, invitee=None, replytoNote=None, replyForum=None, signature=None, note=None, prefix=None, tags=None, limit=None, offset=None, after=None, minduedate=None, duedate=None, pastdue=None, replyto=None, details=None, expired=None, sort=None, type=None, with_count=False, invitation=None)[source]
Gets list of Invitation objects based on the filters provided. The Invitations that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – id of the Invitation
ids (str, optional) – Comma separated Invitation IDs. If provided, returns invitations whose “id” value is any of the passed Invitation IDs.
invitee (str, optional) – Invitations that contain this invitee
replytoNote (str, optional) – Invitations that contain this replytoNote
replyForum (str, optional) – Invitations that contain this replyForum
signature (optional) – Invitations that contain this signature
note (str, optional) – Invitations that contain this note
prefix (str, optional) – Invitation ids that match this prefix
tags (Tag, optional) – Invitations that contain these tags
limit (int, optional) – Maximum amount of Invitations that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Invitations will be returned
offset (int, optional) – Indicates the position to start retrieving Invitations. For example, if there are 10 Invitations and you want to obtain the last 3, then the offset would need to be 7.
after (str, optional) – Invitation id to start getting the list of invitations from.
minduedate (int, optional) – Invitations that have at least this value as due date
duedate (int, optional) – Invitations that contain this due date
pastdue (bool, optional) – Invitaions that are past due
replyto (optional) – Invitations that contain this replyto
details (dict, optional) – TODO: What is a valid value for this field?
expired (bool, optional) – If true, retrieves the Invitations that have expired, otherwise, the ones that have not expired
- Returns:
List of Invitations
- Return type:
- get_jobs_status()[source]
Only for Super User. Retrieves the jobs status of the queue
- Returns:
Jobs status
- Return type:
- get_message_requests(id=None, invitation=None)[source]
Posts a message to the recipients and consequently sends them emails
- get_messages(to=None, subject=None, status=None, offset=None, limit=None)[source]
Only for Super User. Retrieves all the messages sent to a list of usernames or emails and/or a particular e-mail subject
- Parameters:
- Returns:
Messages that match the passed parameters
- Return type:
- get_note_edits(note_id=None, invitation=None, with_count=False, sort=None, trash=None)[source]
Gets a list of edits for a note. The edits that will be returned match all the criteria passed in the parameters.
- get_notes(id=None, paperhash=None, forum=None, invitation=None, replyto=None, tauthor=None, signature=None, transitive_members=None, signatures=None, writer=None, trash=None, number=None, content=None, limit=None, offset=None, after=None, mintcdate=None, details=None, sort=None, with_count=False)[source]
Gets list of Note objects based on the filters provided. The Notes that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – a Note ID. If provided, returns Notes whose ID matches the given ID.
paperhash (str, optional) – A “paperhash” for a note. If provided, returns Notes whose paperhash matches this argument. (A paperhash is a human-interpretable string built from the Note’s title and list of authors to uniquely identify the Note)
forum (str, optional) – A Note ID. If provided, returns Notes whose forum matches the given ID.
invitation (str, optional) – An Invitation ID. If provided, returns Notes whose “invitation” field is this Invitation ID.
replyto (str, optional) – A Note ID. If provided, returns Notes whose replyto field matches the given ID.
tauthor (str, optional) – A Group ID. If provided, returns Notes whose tauthor field (“true author”) matches the given ID, or is a transitive member of the Group represented by the given ID.
signature (str, optional) – A Group ID. If provided, returns Notes whose signatures field contains the given Group ID.
transitive_members (bool, optional) – If true, returns Notes whose tauthor field is a transitive member of the Group represented by the given Group ID.
signatures (list[str], optional) – Group IDs. If provided, returns Notes whose signatures field contains the given Group IDs.
writer (str, optional) – A Group ID. If provided, returns Notes whose writers field contains the given Group ID.
trash (bool, optional) – If True, includes Notes that have been deleted (i.e. the ddate field is less than the current date)
number (int, optional) – If present, includes Notes whose number field equals the given integer.
content (dict, optional) – If present, includes Notes whose each key is present in the content field and it is equals the given value.
limit (int, optional) – Maximum amount of Notes that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Notes will be returned
offset (int, optional) – Indicates the position to start retrieving Notes. For example, if there are 10 Notes and you want to obtain the last 3, then the offset would need to be 7.
after (str, optional) – Note id to start getting the list of notes from.
mintcdate (int, optional) – Represents an Epoch time timestamp, in milliseconds. If provided, returns Notes whose “true creation date” (tcdate) is at least equal to the value of mintcdate.
details (optional) – TODO: What is a valid value for this field?
sort (str, optional) – Sorts the output by field depending on the string passed. Possible values: number, cdate, ddate, tcdate, tmdate, replyCount (Invitation id needed in the invitation field).
- Returns:
List of Notes
- Return type:
- get_pdf(id, is_reference=False)[source]
Gets the binary content of a pdf using the provided note/reference id If the pdf is not found then this returns an error message with “status”:404.
Use the note id when trying to get the latest pdf version and reference id when trying to get a previous version of the pdf
- Parameters:
- Returns:
The binary content of a pdf
- Return type:
Example:
>>> f = get_pdf(id='Place Note-ID here') >>> with open('output.pdf','wb') as op: op.write(f)
- get_process_logs(id=None, invitation=None, status=None, min_sdate=None)[source]
Only for Super User. Retrieves the logs of the process function executed by an Invitation
- get_profiles(trash=None, with_blocked=None, offset=None, limit=None, sort=None)[source]
Get a list of Profiles
- Parameters:
trash (bool, optional) – Indicates if the returned profiles are trashed
with_blocked (bool, optional) – Indicates if the returned profiles are blocked
offset (int, optional) – Indicates the position to start retrieving Profiles
limit (int, optional) – Maximum amount of Profiles that this method will return
- Returns:
List of Profile objects
- Return type:
- get_tags(id=None, invitation=None, forum=None, signature=None, tag=None, limit=None, offset=None, with_count=False, mintmdate=None)[source]
Gets a list of Tag objects based on the filters provided. The Tags that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – A Tag ID. If provided, returns Tags whose ID matches the given ID.
forum (str, optional) – A Note ID. If provided, returns Tags whose forum matches the given ID.
invitation (str, optional) – An Invitation ID. If provided, returns Tags whose “invitation” field is this Invitation ID.
- Returns:
List of tags
- Return type:
- get_tildeusername(first, last, middle=None)[source]
Gets next possible tilde user name corresponding to the specified first, middle and last name
- get_venues(id=None, ids=None, invitations=None)[source]
Gets list of Note objects based on the filters provided. The Notes that will be returned match all the criteria passed in the parameters.
- Parameters:
id (str, optional) – a Venue ID. If provided, returns Notes whose ID matches the given ID.
ids (list, optional) – A list of Venue IDs. If provided, returns Notes containing these IDs.
invitations (list, optional) – A list of Invitation IDs. If provided, returns Venues whose “invitation” field is this Invitation ID.
- Returns:
List of Venues
- Return type:
- post_direct_message(subject, recipients, message, sender=None)[source]
Posts a message to the recipients and consequently sends them emails
- post_edges(edges)[source]
Posts the list of Edges. Returns a list Edge objects updated with their ids.
- post_group_edit(invitation, signatures=None, group=None, readers=None, writers=None, content=None, replacement=None)[source]
- post_institution(institution)[source]
Requires Super User permission. Adds an institution if the institution id is not found in the database, otherwise, the institution is updated.
- post_invitation_edit(invitations, readers=None, writers=None, signatures=None, invitation=None, content=None, replacement=None, domain=None)[source]
- post_message(subject, recipients, message, invitation=None, signature=None, ignoreRecipients=None, sender=None, replyTo=None, parentGroup=None, use_job=False)[source]
Posts a message to the recipients and consequently sends them emails
- Parameters:
recipients (list[str]) – Recipients of the e-mail. Valid inputs would be tilde username or emails registered in OpenReview
message (str) – Message in the e-mail
invitation (str) – Invitation ID of the invitation that allows to send the message
signature (str) – Signature of the user sending the message
ignoreRecipients – List of groups ids to be ignored from the recipient list
sender (dict) – Specify the from address and name of the email, the dictionary should have two keys: ‘name’ and ‘email’
replyTo (str) – e-mail address used when recipients reply to this message
parentGroup (str) – parent group recipients of e-mail belong to
use_job (bool) – If True, the message will be sent using the job queue
- Returns:
Contains the message that was sent to each Group
- Return type:
- post_message_request(subject, recipients, message, invitation=None, signature=None, ignoreRecipients=None, sender=None, replyTo=None, parentGroup=None, use_job=False)[source]
Posts a message to the recipients and consequently sends them emails
- Parameters:
recipients (list[str]) – Recipients of the e-mail. Valid inputs would be tilde username or emails registered in OpenReview
message (str) – Message in the e-mail
invitation (str) – Invitation ID of the invitation that allows to send the message
signature (str) – Signature of the user sending the message
ignoreRecipients – List of groups ids to be ignored from the recipient list
sender (dict) – Specify the from address and name of the email, the dictionary should have two keys: ‘name’ and ‘email’
replyTo (str) – e-mail address used when recipients reply to this message
parentGroup (str) – parent group recipients of e-mail belong to
use_job (bool) – If True, the message will be sent using the job queue
- Returns:
Contains the message that was sent to each Group
- Return type:
- post_note_edit(invitation, signatures, note=None, readers=None, writers=None, nonreaders=None, content=None)[source]
- post_tag(tag)[source]
Posts the tag.
- Parameters:
tag (Tag) – Tag to be posted
- Return Tag:
The posted Tag
- register_user(email=None, fullname=None, password=None)[source]
Registers a new user
- Parameters:
- Returns:
Dictionary containing the new user information including his id, username, email(s), readers, writers, etc.
- Return type:
- rename_edges(current_id, new_id)[source]
Updates an Edge
- Parameters:
profile – Edge object
- Returns:
The new updated Edge
- Return type:
Edge
- rename_profile(current_id, new_id)[source]
Updates a the profile id of a Profile
- Parameters:
current_id – Current profile id
new_id – New profile id
- Returns:
The new updated Profile
- Return type:
- search_notes(term, content='all', group='all', source='all', limit=None, offset=None)[source]
Searches notes based on term, content, group and source as the criteria. Unlike
get_notes()
, this method uses Elasticsearch to retrieve the Notes- Parameters:
term (str) – Term used to look for the Notes
content (str, optional) – Specifies whether to look in all the content, authors, or keywords. Valid inputs: ‘all’, ‘authors’, ‘keywords’
group (str, optional) – Specifies under which Group to look. E.g. ‘all’, ‘ICLR’, ‘UAI’, etc.
source (str, optional) – Whether to look in papers, replies or all
limit (int, optional) – Maximum amount of Notes that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Notes will be returned
offset (int, optional) – Indicates the position to start retrieving Notes. For example, if there are 10 Notes and you want to obtain the last 3, then the offset would need to be 7.
- Returns:
List of notes
- Return type:
- search_profiles(confirmedEmails=None, emails=None, ids=None, term=None, first=None, middle=None, last=None, fullname=None, relation=None, use_ES=False)[source]
Gets a list of profiles using either their ids or corresponding emails
- Parameters:
confirmedEmails (list, optional) – List of confirmed emails registered in OpenReview
emails (list, optional) – List of emails registered in OpenReview
ids (list, optional) – List of OpenReview username ids
term (str, optional) – Substring in the username or e-mail to be searched
first (str, optional) – First name of user
middle (str, optional) – Middle name of user
last (str, optional) – Last name of user
- Returns:
List of profiles, if emails is present then a dictionary of { emails: profiles } is returned. If confirmedEmails is present then a dictionary of { confirmedEmails: profile } is returned
- Return type:
- class openreview.api.Group(id=None, content=None, readers=None, writers=None, signatories=None, signatures=None, invitation=None, invitations=None, cdate=None, ddate=None, tcdate=None, tmdate=None, members=None, nonreaders=None, impersonators=None, web=None, anonids=None, deanonymizers=None, host=None, domain=None, parent=None, details=None)[source]
When a user is created, it is automatically assigned to certain groups that give him different privileges. A username is also a group, therefore, groups can be members of other groups.
- Parameters:
id (str) – id of the Group
readers (list[str]) – List of readers in the Group, each reader is a Group id
writers (list[str]) – List of writers in the Group, each writer is a Group id
signatories (list[str]) – List of signatories in the Group, each writer is a Group id
signatures (list[str]) – List of signatures in the Group, each signature is a Group id
cdate (int, optional) – Creation date of the Group
ddate (int, optional) – Deletion date of the Group
tcdate (int, optional) – true creation date of the Group
tmdate (int, optional) – true modification date of the Group
members (list[str], optional) – List of members in the Group, each member is a Group id
nonreaders (list[str], optional) – List of nonreaders in the Group, each nonreader is a Group id
web (optional) – Path to a file that contains the webfield
web_string (str, optional) – String containing the webfield for this Group
details (optional)
- add_member(member)[source]
Adds a member to the group. This is done only on the object not in OpenReview. Another method like
post()
is needed for the change to show in OpenReview
- add_webfield(web)[source]
Adds a webfield to the group
- Parameters:
web (str) – Path to the file that contains the webfield
- classmethod from_json(g)[source]
Creates a Group object from a dictionary that contains keys values equivalent to the name of the instance variables of the Group class
- post(client)[source]
Posts a group to OpenReview
- Parameters:
client (Client) – Client that will post the Group
- class openreview.api.Invitation(id=None, invitations=None, domain=None, readers=None, writers=None, invitees=None, signatures=None, edit=None, edge=None, message=None, type='Note', noninvitees=None, nonreaders=None, web=None, process=None, preprocess=None, date_processes=None, duedate=None, expdate=None, cdate=None, ddate=None, tcdate=None, tmdate=None, minReplies=None, maxReplies=None, bulk=None, content=None, reply_forum_views=[], responseArchiveDate=None, details=None)[source]
- classmethod from_json(i)[source]
Creates an Invitation object from a dictionary that contains keys values equivalent to the name of the instance variables of the Invitation class
- Parameters:
i (dict) – Dictionary containing key-value pairs, where the keys values are equivalent to the name of the instance variables in the Invitation class
- Returns:
Invitation whose instance variables contain the values from the dictionary
- Return type:
- class openreview.api.Note(invitations=None, readers=None, writers=None, signatures=None, content=None, id=None, number=None, cdate=None, pdate=None, odate=None, mdate=None, tcdate=None, tmdate=None, ddate=None, forum=None, replyto=None, nonreaders=None, domain=None, details=None, license=None)[source]
TODO: write docs
- class openreview.api.Edit(id=None, domain=None, invitations=None, readers=None, writers=None, signatures=None, content=None, note=None, group=None, invitation=None, nonreaders=None, cdate=None, tcdate=None, tmdate=None, ddate=None, tauthor=None)[source]
- Parameters:
id (str) – Edit id
readers (list[str], optional) – List of readers in the Edit, each reader is a Group id
writers (list[str], optional) – List of writers in the Edit, each writer is a Group id
signatures (list[str], optional) – List of signatures in the Edit, each signature is a Group id
note (dict, optional) – Template of the Note that will be created
invitation (dict, optional) – Template of the Invitation that will be created
nonreaders (list[str], optional) – List of nonreaders in the Edit, each nonreader is a Group id
cdate (int, optional) – Creation date
ddate (int, optional) – Deletion date
tcdate (int, optional) – True creation date
tmdate (int, optional) – Modification date
Tools
- openreview.tools.concurrent_get(client, get_function, **params)[source]
Given a function that takes a single parameter, returns a list of results.
- openreview.tools.concurrent_requests(request_func, params, desc='Gathering Responses')[source]
Returns a list of results given for each request_func param execution. It shows a progress bar to know the progress of the task.
- Parameters:
- Returns:
A list of results given for each func value execution
- Return type:
- openreview.tools.create_profile(client, email, fullname, url='http://no_url', allow_duplicates=False)[source]
Given email, first name, last name, and middle name (optional), creates a new profile.
- Parameters:
client (Client) – User that will create the Profile
email (str) – Preferred e-mail in the Profile
first (str) – First name of the user
last (str) – Last name of the user
middle (str, optional) – Middle name of the user
url (str, optional) – Homepage url
allow_duplicates (bool, optional) – If a profile with the same name exists, and allow_duplicates is False, an exception is raised. If a profile with the same name exists and allow_duplicates is True, a profile is created with the next largest number (e.g. if ~Michael_Spector1 exists, ~Michael_Spector2 will be created)
- Returns:
The created Profile
- Return type:
- openreview.tools.datetime_millis(dt)[source]
Converts a datetime to milliseconds.
- Parameters:
dt (datetime) – A date that want to be converted to milliseconds
- Returns:
The time from Jan 1, 1970 to the passed date in milliseconds
- Return type:
- openreview.tools.decision_to_venue(venue_id, decision_option, accept_options=None)[source]
Returns the venue for a submission based on its decision
- Parameters:
venue_id (string) – venue’s short name (i.e., ICLR 2022)
decision_option (string) – paper decision (i.e., Accept, Reject)
accept_options (list) – accept decisions (i.e., [ Accept (Best Paper), Invite to Archive ])
- class openreview.tools.efficient_iterget(get_function, desc='Gathering Responses', **params)[source]
This class can create an iterator from a getter method that returns a list. Below all the iterators that can be created from a getter method:
openreview.Client.get_tags()
–>tools.iterget_tags()
openreview.Client.get_notes()
–>tools.iterget_notes()
openreview.Client.get_references()
–>tools.iterget_references()
openreview.Client.get_invitations()
–>tools.iterget_invitations()
openreview.Client.get_groups()
–>tools.iterget_groups()
- Parameters:
get_function (function) – Any of the aforementioned methods
params (dict) – Dictionary containing parameters for the corresponding method. Refer to the passed method documentation for details
- openreview.tools.generate_bibtex(note, venue_fullname, year, url_forum=None, paper_status='under review', anonymous=True, names_reversed=False, baseurl='https://openreview.net', editor=None)[source]
Generates a bibtex field for a given Note.
- Parameters:
note (Note) – Note from which the bibtex is generated
venue_fullname (str) – Full name of the venue to be placed in the book title field
year (str) – Note year
url_forum (str, optional) – Forum id, if none is provided, it is obtained from the note parameter: note.forum
paper_status (string, optional) – Used to indicate the status of a paper: [“accepted”, “rejected” or “under review”]
anonymous (bool, optional) – Used to indicate whether or not the paper’s authors should be revealed
names_reversed (bool, optional) – If true, it indicates that the last name is written before the first name
baseurl (str, optional) – Base url where the bibtex is from. Default https://openreview.net
- Returns:
Note bibtex
- Return type:
- openreview.tools.get_conflicts(author_profiles, user_profile, policy='default', n_years=None)[source]
Finds conflicts between the passed user Profile and the author Profiles passed as arguments
- Parameters:
author_profiles (list[Profile]) – List of Profiles for which an association is to be found
user_profile (Profile) – Profile for which the conflicts will be found
policy (str or function, optional) – Policy can be either a function or a string. If it is a function, it will be called with the user Profile and the author Profile as arguments. If it is a string, it will be used to find the corresponding function in the default policy dictionary. If no policy is passed, the default policy will be used.
n_years (int, optional) – Number of years to be considered for conflict detection.
- Returns:
List containing all the conflicts between the user Profile and the author Profiles
- Return type:
- openreview.tools.get_current_submissions_profile_info(profile, n_years=None, submission_venueid=None)[source]
Gets only submissions submitted to the current venue
- openreview.tools.get_invitation(client, id)[source]
Get a single Invitation by id if available
- Parameters:
- Returns:
Invitation that matches the passed id or None if it does not exist or it is expired
- Return type:
- openreview.tools.get_neurips_profile_info(profile, n_years=None)[source]
Gets all the domains, emails, relations associated with a Profile
- openreview.tools.get_paperhash(first_author, title)[source]
Returns the paperhash of a paper, given the title and first author.
- Parameters:
- Returns:
paperhash, see example
- Return type:
Example:
>>> get_paperhash('David Soergel', 'Open Scholarship and Peer Review: a Time for Experimentation') u'soergel|open_scholarship_and_peer_review_a_time_for_experimentation'
- openreview.tools.get_preferred_name(profile, last_name_only=False)[source]
Accepts openreview.Profile object
- openreview.tools.get_profile(client, value, with_publications=False)[source]
Get a single profile (a note) by id, if available
- openreview.tools.get_profile_info(profile, n_years=None)[source]
Gets all the domains, emails, relations associated with a Profile
- openreview.tools.get_profiles(client, ids_or_emails, with_publications=False, with_relations=False, with_preferred_emails=None, as_dict=False)[source]
Helper function that repeatedly queries for profiles, given IDs and emails. Useful for getting more Profiles than the server will return by default (1000)
- Parameters:
with_preferred_emails (str) – invitation id to get the edges where the preferred emails are stored
- openreview.tools.is_accept_decision(decision, accept_options=None)[source]
Checks if decision is an accept decision
- Parameters:
decision (string) – paper decision (i.e., Accept, Reject)
accept_options (list) – accept decisions (i.e., [ Accept (Best Paper), Invite to Archive ])
- class openreview.tools.iterget(get_function, **params)[source]
This class can create an iterator from a getter method that returns a list. Below all the iterators that can be created from a getter method:
openreview.Client.get_tags()
–>tools.iterget_tags()
openreview.Client.get_notes()
–>tools.iterget_notes()
openreview.Client.get_references()
–>tools.iterget_references()
openreview.Client.get_invitations()
–>tools.iterget_invitations()
openreview.Client.get_groups()
–>tools.iterget_groups()
- Parameters:
get_function (function) – Any of the aforementioned methods
params (dict) – Dictionary containing parameters for the corresponding method. Refer to the passed method documentation for details
- openreview.tools.iterget_grouped_edges(client, invitation=None, groupby='head', select='id,tail,label,weight', logger=None)[source]
Helper function for retrieving and parsing all edges in bulk
- openreview.tools.iterget_groups(client, id=None, regex=None, member=None, host=None, signatory=None, web=None)[source]
Returns an iterator over groups filtered by the provided parameters ignoring API limit.
- Parameters:
client (Client) – Client used to get the Groups
id (str, optional) – a Note ID. If provided, returns groups whose “id” value is this Group ID.
regex (str, optional) – a regular expression string to match Group IDs. If provided, returns groups whose “id” value matches the given regex.
member (str, optional) – Essentially, members field contains Group Ids that are members of this Group object. If provided, returns groups whose “members” field contains the given string.
host (str, optional)
signatory (str, optional) – a Group ID. If provided, returns Groups whose signatory field contains the given Group ID.
web (bool, optional) – Groups that contain a web field value
- Returns:
Iterator over Groups filtered by the provided parameters
- Return type:
- openreview.tools.iterget_invitations(client, id=None, ids=None, invitee=None, regex=None, tags=None, minduedate=None, duedate=None, pastdue=None, replytoNote=None, replyForum=None, signature=None, note=None, replyto=None, details=None, expired=None, super=None, sort=None)[source]
Returns an iterator over invitations, filtered by the provided parameters, ignoring API limit.
- Parameters:
client (Client) – Client used to get the Invitations
id (str, optional) – an Invitation ID. If provided, returns invitations whose “id” value is this Invitation ID.
ids (str, optional) – Comma separated Invitation IDs. If provided, returns invitations whose “id” value is any of the passed Invitation IDs.
invitee (str, optional) – Essentially, invitees field in an Invitation object contains Group Ids being invited using the invitation. If provided, returns invitations whose “invitee” field contains the given string.
regex (str, optional) – a regular expression string to match Invitation IDs. If provided, returns invitations whose “id” value matches the given regex.
tags (list[str], optional) – If provided, returns Invitations whose Tags field contains the given Tag IDs.
minduedate (int, optional) – Represents an Epoch time timestamp in milliseconds. If provided, returns Invitations whose duedate is at least equal to the value of minduedate.
duedate (int, optional) – Represents an Epoch time timestamp in milliseconds. If provided, returns Invitations whose duedate field matches the given duedate.
pastdue (bool, optional)
replytoNote (str, optional) – a Note ID. If provided, returns Invitations whose replytoNote field contains the given Note ID.
replyForum (str, optional) – a forum ID. If provided, returns Invitations whose forum field contains the given forum ID.
signature (str, optional) – a Group ID. If provided, returns Invitations whose signature field contains the given Group ID.
note (str, optional) – a Note ID. If provided, returns Invitations whose note field contains the given Note ID.
replyto (str, optional) – a Note ID. If provided, returns Invitations whose replyto field matches the given Note ID.
details (str, optional)
expired (bool, optional) – get also expired invitions, by default returns ‘active’ invitations.
- Returns:
Iterator over Invitations filtered by the provided parameters
- Return type:
- openreview.tools.iterget_messages(client, to=None, subject=None, status=None)[source]
Returns an iterator over Messages ignoring API limit.
Example:
>>> iterget_messages(client, to='melisa@mail.com')
- Returns:
Iterator over Messages filtered by the provided parameters
- Return type:
- openreview.tools.iterget_notes(client, id=None, paperhash=None, forum=None, invitation=None, replyto=None, tauthor=None, signature=None, writer=None, trash=None, number=None, mintcdate=None, content=None, details=None, sort=None)[source]
Returns an iterator over Notes filtered by the provided parameters ignoring API limit.
- Parameters:
client (Client) – Client used to get the Notes
id (str, optional) – a Note ID. If provided, returns Notes whose ID matches the given ID.
paperhash (str, optional) – a “paperhash” for a note. If provided, returns Notes whose paperhash matches this argument. (A paperhash is a human-interpretable string built from the Note’s title and list of authors to uniquely identify the Note)
forum (str, optional) – a Note ID. If provided, returns Notes whose forum matches the given ID.
invitation (str, optional) – an Invitation ID. If provided, returns Notes whose “invitation” field is this Invitation ID.
replyto (str, optional) – a Note ID. If provided, returns Notes whose replyto field matches the given ID.
tauthor (str, optional) – a Group ID. If provided, returns Notes whose tauthor field (“true author”) matches the given ID, or is a transitive member of the Group represented by the given ID.
signature (str, optional) – a Group ID. If provided, returns Notes whose signatures field contains the given Group ID.
writer (str, optional) – a Group ID. If provided, returns Notes whose writers field contains the given Group ID.
trash (bool, optional) – If True, includes Notes that have been deleted (i.e. the ddate field is less than the current date)
number (int, optional) – If present, includes Notes whose number field equals the given integer.
mintcdate (int, optional) – Represents an Epoch time timestamp in milliseconds. If provided, returns Notes whose “true creation date” (tcdate) is at least equal to the value of mintcdate.
content (dict, optional) – If present, includes Notes whose each key is present in the content field and it is equals the given value.
details (str, optional) – TODO: What is a valid value for this field?
- Returns:
Iterator over Notes filtered by the provided parameters
- Return type:
- openreview.tools.iterget_references(client, referent=None, invitation=None, mintcdate=None)[source]
Returns an iterator over references filtered by the provided parameters ignoring API limit.
- Parameters:
client (Client) – Client used to get the references
referent (str, optional) – a Note ID. If provided, returns references whose “referent” value is this Note ID.
invitation (str, optional) – an Invitation ID. If provided, returns references whose “invitation” field is this Invitation ID.
mintcdate (int, optional) – Represents an Epoch time timestamp in milliseconds. If provided, returns references whose “true creation date” (tcdate) is at least equal to the value of mintcdate.
- Returns:
Iterator over references filtered by the provided parameters
- Return type:
- openreview.tools.iterget_tags(client, id=None, invitation=None, forum=None, signature=None, tag=None)[source]
Returns an iterator over Tags ignoring API limit.
Example:
>>> iterget_tags(client, invitation='MyConference.org/-/Bid_Tags')
- Parameters:
client (Client) – Client used to get the Tags
id (str, optional) – a Tag ID. If provided, returns Tags whose ID matches the given ID.
forum (str, optional) – a Note ID. If provided, returns Tags whose forum matches the given ID.
invitation (str, optional) – an Invitation ID. If provided, returns Tags whose “invitation” field is this Invitation ID.
- Returns:
Iterator over Tags filtered by the provided parameters
- Return type:
- openreview.tools.overwrite_pdf(client, note_id, file_path)[source]
Overwrite all the references of a note with the new pdf file. If the note has an original note then update original references
- openreview.tools.recruit_reviewer(client, user, first, hash_seed, recruit_reviewers_id, recruit_message, recruit_message_subj, reviewers_invited_id, contact_info='info@openreview.net', verbose=True, replyTo=None, invitation=None, signature=None)[source]
Recruit a reviewer. Sends an email to the reviewer with a link to accept or reject the recruitment invitation.
- Parameters:
client (Client) – Client used to send the e-mail
user (str) – User to whom the e-mail will be sent
first (str) – First name of the person to whom e-mail will be sent
hash_seed (int) – a random number for seeding the hash.
recruit_message (str) – a formattable string containing the following string variables: (name, accept_url, decline_url)
recruit_message_subj (str) – subject line for the recruitment email
reviewers_invited_id (str) – group ID for the “Reviewers Invited” group, often used to keep track of which reviewers have already been emailed. str
contact_info (str) – The information used to contact support for questions
verbose (bool, optional) – Shows response of
openreview.Client.post_message()
and shows the body of the message sentbaseurl (str, optional) – Use this baseUrl instead of client.baseurl to create recruitment links
- openreview.tools.replace_members_with_ids(client, group)[source]
Given a Group object, iterates through the Group’s members and, for any member represented by an email address, attempts to find a profile associated with that email address. If a profile is found, replaces the email with the profile id.
- openreview.tools.run_once(f)[source]
Decorator to run a function only once and return its output for any subsequent call to the function without running it again
- openreview.tools.subdomains(domain)[source]
Given an email address, returns a list with the domains and subdomains.
- Parameters:
domain (str) – e-mail address or domain of the e-mail address
- Returns:
List of domains and subdomains
- Return type:
Example:
>>> subdomains('johnsmith@iesl.cs.umass.edu') [u'iesl.cs.umass.edu', u'cs.umass.edu', u'umass.edu']
- openreview.tools.timestamp_GMT(year, month, day, hour=0, minute=0, second=0)[source]
Given year, month, day, and (optionally) hour, minute, second in GMT time zone: returns the number of milliseconds between this date and Epoch Time (Jan 1, 1970).
- Parameters:
- Returns:
Number of milliseconds between the passed date and Epoch Time (Jan 1, 1970)
- Return type:
>>> timestamp_GMT(1990, 12, 20, hour=12, minute=30, second=24) 661696224000