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:
  • token (str) – Activation token. If running in localhost, use email as token

  • content (dict) – Content of the profile to activate

Returns:

Dictionary containing user information and the authentication token

Return type:

dict

Example:

>>> res = client.activate_user('new@user.com', {
    'names': [
            {
                'fullname': 'New User',
                'username': '~New_User1'
            }
        ],
    'emails': ['new@user.com'],
    'preferredEmail': 'new@user.com'
    })
add_members_to_group(group, members)[source]

Adds members to a group

Parameters:
  • group (Group or str) – Group (or Group’s id) to which the members will be added

  • members (str, list, unicode) – Members that will be added to the group. Members should be in a string, unicode or a list format

Returns:

Group with the members added

Return type:

Group

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:

dict

delete_group(group_id)[source]

Deletes the group

Parameters:

group_id (str) – ID of Group to be deleted

Returns:

a {status = ‘ok’} in case of a successful deletion and an OpenReview exception otherwise

Return type:

dict

delete_institution(institution_id)[source]

Deletes the institution

Parameters:

institution_id (str) – ID of Institution to be deleted

Returns:

a {status = ‘ok’} in case of a successful deletion and an OpenReview exception otherwise

Return type:

dict

delete_note(note_id)[source]

Deletes the note

Parameters:

note_id (str) – ID of Note to be deleted

Returns:

a {status = ‘ok’} in case of a successful deletion and an OpenReview exception otherwise

Return type:

dict

delete_profile_reference(reference_id)[source]

Deletes the Profile Reference specified by reference_id.

Parameters:

reference_id (str) – ID of the Profile Reference to be deleted.

Returns:

a {status = ‘ok’} in case of a successful deletion and an OpenReview exception otherwise

Return type:

dict

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:

list[Group]

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:

list[Invitation]

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:

list[Note]

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:

list[Note]

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:

list[Tag]

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:
  • id (str) – Note id or Reference id of the pdf

  • field_name (str) – name of the field associated with the attachment file

Returns:

The binary content of a pdf

Return type:

bytes

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:

Group

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:

list[Group]

get_institutions(id=None, domain=None)[source]

Get a single Institution by id or domain if available

Parameters:
  • id (str) – id of the Institution as saved in the database

  • domain (str) – domain of the Institution

Returns:

Dictionary with the Institution information

Return type:

dict

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:

Invitation

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:

list[Invitation]

get_jobs_status()[source]

Only for Super User. Retrieves the jobs status of the queue

Returns:

Jobs status

Return type:

dict

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:
  • to (list[str], optional) – Tilde user names or emails

  • subject (str, optional) – Subject of the e-mail

  • status (str, optional) – Commad separated list of status values corresponding to the message: delivered, bounce, droppped, etc

Returns:

Messages that match the passed parameters

Return type:

dict

get_note(id)[source]

Get a single Note by id if available

Parameters:

id (str) – id of the note

Returns:

Note matching the passed id

Return type:

Note

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:

list[Note]

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:
  • id (str) – Note id or Reference id of the pdf

  • is_reference (bool, optional) – Indicates that the passed id is a reference id instead of a note id

Returns:

The binary content of a pdf

Return type:

bytes

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

Parameters:
  • id (str, optional) – Note id

  • invitation (str, optional) – Invitation id that executed the process function that produced the logs

Returns:

Logs of the process

Return type:

dict

get_profile(email_or_id=None)[source]

Get a single Profile by id, if available

Parameters:

email_or_id (str, optional) – e-mail confirmed or id of the profile

Returns:

Profile object with its information

Return type:

Profile

get_reference(id)[source]

Get a single reference by id if available

Parameters:

id (str) – id of the reference

Returns:

reference matching the passed id

Return type:

Note

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:

list[Note]

get_tag(id)[source]

Get a single Tag by id if available

Parameters:

id (str) – id of the Tag

Returns:

Tag with the Tag information

Return type:

Tag

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:

list[Tag]

get_tildeusername(fullname)[source]

Gets next possible tilde user name corresponding to the specified full name

Parameters:

fullname (str) – Full name of the user

Returns:

next possible tilde user name corresponding to the specified full name

Return type:

dict

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:

list[dict]

infer_note(note_id)[source]

Posts the note. If the note is unsigned, signs it using the client’s default signature.

Parameters:

note (Note) – Note to be posted

Returns:

The posted Note

Return type:

Note

login_user(username=None, password=None, expiresIn=None)[source]

Logs in a registered user

Parameters:
  • username (str, optional) – OpenReview username

  • password (str, optional) – OpenReview password

  • 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.

Returns:

Dictionary containing user information and the authentication token

Return type:

dict

merge_profiles(profileTo, profileFrom)[source]

Merges two Profiles

Parameters:
  • profileTo (Profile) – Profile object to merge to

  • profileFrom – Profile object to merge from (this profile will be deleted)

Type:

profileFrom: Profile

Returns:

The new updated Profile

Return type:

Profile

moderate_profile(profile_id, decision)[source]

Updates a Profile

Parameters:

profile (Profile) – Profile object

Returns:

The new updated Profile

Return type:

Profile

post_direct_message(subject, recipients, message, sender=None)[source]

Posts a message to the recipients and consequently sends them emails

Parameters:
  • subject (str) – Subject of the e-mail

  • 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

Returns:

Contains the message that was sent to each Group

Return type:

dict

post_edge(edge)[source]

Posts the edge. Upon success, returns the posted Edge object.

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.

Parameters:
  • group (Group) – Group to be posted

  • overwrite (bool, optional) – Determines whether to overwrite an existing group or not

Returns:

The posted Group

Return type:

Group

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.

Parameters:

institution (dict) – institution to be posted

Returns:

The posted institution

Return type:

dict

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:

Invitation

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:
  • subject (list[str]) – Subject of the e-mail

  • 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:

dict

post_note(note)[source]

Posts the note. If the note is unsigned, signs it using the client’s default signature.

Parameters:

note (Note) – Note to be posted

Returns:

The posted Note

Return type:

Note

post_profile(profile)[source]

Updates a Profile

Parameters:

profile (Profile) – Profile object

Returns:

The new updated Profile

Return type:

Profile

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

post_venue(venue)[source]

Posts the venue. Upon success, returns the posted Venue object.

put_attachment(file_path, invitation, name)[source]

Uploads a file to the openreview server

Parameters:
  • file (str) – Path to the file

  • invitation – Invitation of the note that required the attachment

  • file – name of the note field to save the attachment url

Returns:

A relative URL for the uploaded file

Return type:

str

register_user(email=None, fullname=None, password=None)[source]

Registers a new user

Parameters:
  • email (str, optional) – email that will be used as id to log in after the user is registered

  • fullname (str, optional) – Full name of the user

  • password (str, optional) – Password used to log into OpenReview

Returns:

Dictionary containing the new user information including his id, username, email(s), readers, writers, etc.

Return type:

dict

remove_members_from_group(group, members)[source]

Removes members from a group

Parameters:
  • group (Group or str) – Group (or Group’s id) from which the members will be removed

  • members (str, list, unicode) – Members that will be removed. Members should be in a string, unicode or a list format

Returns:

Group without the members that were removed

Type:

Group

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 Profile

Parameters:

profile (Profile) – Profile object

Returns:

The new updated Profile

Return type:

Profile

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:

list[Note]

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:

list[Profile]

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

Parameters:

member (str) – Member to add to the group

Returns:

Group with the new member added

Return type:

Group

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

Parameters:

g (dict) – Dictionary containing key-value pairs, where the keys values are equivalent to the name of the instance variables in the Group class

Returns:

Group whose instance variables contain the values from the dictionary

Return type:

Group

post(client)[source]

Posts a group to OpenReview

Parameters:

client (Client) – Client that will post the Group

remove_member(member)[source]

Removes a member from 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

Parameters:

member (str) – Member to remove from the group

Returns:

Group after the member was removed

Return type:

Group

to_json()[source]

Converts Group instance to a dictionary. The instance variable names are the keys and their values the values of the dictinary.

Returns:

Dictionary containing all the parameters of a Group instance

Return type:

dict

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:

Invitation

to_json()[source]

Converts Invitation instance to a dictionary. The instance variable names are the keys and their values the values of the dictinary.

Returns:

Dictionary containing all the parameters of a Invitation instance

Return type:

dict

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

to_json()[source]

Converts Note instance to a dictionary. The instance variable names are the keys and their values the values of the dictinary. :return: Dictionary containing all the parameters of a Note instance :rtype: dict

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

  • replyto (list[str], optional) – Note id

  • nonreaders (list[str], optional) – List of nonreaders in the Invitation, each nonreader is a Group id

classmethod from_json(t)[source]

Creates a Tag object from a dictionary that contains keys values equivalent to the name of the instance variables of the Tag class

Parameters:

n (dict) – Dictionary containing key-value pairs, where the keys values are equivalent to the name of the instance variables in the Tag class

Returns:

Tag whose instance variables contain the values from the dictionary

Return type:

Tag

to_json()[source]

Converts Tag instance to a dictionary. The instance variable names are the keys and their values the values of the dictinary.

Returns:

Dictionary containing all the parameters of a Tag instance

Return type:

dict

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)[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

classmethod from_json(n)[source]

Creates a Profile object from a dictionary that contains keys values equivalent to the name of the instance variables of the Profile class

Parameters:

i (dict) – Dictionary containing key-value pairs, where the keys values are equivalent to the name of the instance variables in the Profile class

Returns:

Profile whose instance variables contain the values from the dictionary

Return type:

Profile

to_json()[source]

Converts Profile instance to a dictionary. The instance variable names are the keys and their values the values of the dictinary.

Returns:

Dictionary containing all the parameters of a Profile instance

Return type:

dict

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:
  • token (str) – Activation token. If running in localhost, use email as token

  • content (dict) – Content of the profile to activate

Returns:

Dictionary containing user information and the authentication token

Return type:

dict

Example:

>>> res = client.activate_user('new@user.com', {
    'names': [
            {
                'first': 'New',
                'last': 'User',
                'username': '~New_User1'
            }
        ],
    'emails': ['new@user.com'],
    'preferredEmail': 'new@user.com'
    })
add_members_to_group(group, members)[source]

Adds members to a group

Parameters:
  • group (Group or str) – Group (or Group’s id) to which the members will be added

  • members (str, list, unicode) – Members that will be added to the group. Members should be in a string, unicode or a list format

Returns:

Group with the members added

Return type:

Group

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:

dict

delete_group(group_id)[source]

Deletes the group

Parameters:

group_id (str) – ID of Group to be deleted

Returns:

a {status = ‘ok’} in case of a successful deletion and an OpenReview exception otherwise

Return type:

dict

delete_institution(institution_id)[source]

Deletes the institution

Parameters:

institution_id (str) – ID of Institution to be deleted

Returns:

a {status = ‘ok’} in case of a successful deletion and an OpenReview exception otherwise

Return type:

dict

delete_note(note_id)[source]

Deletes the note

Parameters:

note_id (str) – ID of Note to be deleted

Returns:

a {status = ‘ok’} in case of a successful deletion and an OpenReview exception otherwise

Return type:

dict

delete_profile_reference(reference_id)[source]

Deletes the Profile Reference specified by reference_id.

Parameters:

reference_id (str) – ID of the Profile Reference to be deleted.

Returns:

a {status = ‘ok’} in case of a successful deletion and an OpenReview exception otherwise

Return type:

dict

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, 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 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.

  • after (str, optional) – Group id to start getting the list of groups from.

Returns:

List of Groups

Return type:

list[Group]

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:

list[Invitation]

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:

list[Note]

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:

list[Tag]

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:
  • id (str) – Note id or Reference id of the pdf

  • field_name (str) – name of the field associated with the attachment file

Returns:

The binary content of a pdf

Return type:

bytes

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)[source]

Get a single Group by id if available

Parameters:

id (str) – id of the group

Returns:

Dictionary with the group information

Return type:

Group

Example:

>>> group = client.get_group('your-email@domain.com')
get_group_edit(id)[source]

Get a single edit by id if available

Parameters:

id (str) – id of the edit

Returns:

edit matching the passed id

Return type:

Group

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, 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 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.

Returns:

List of Groups

Return type:

list[Group]

get_institutions(id=None, domain=None)[source]

Get a single Institution by id or domain if available

Parameters:
  • id (str) – id of the Institution as saved in the database

  • domain (str) – domain of the Institution

Returns:

Dictionary with the Institution information

Return type:

dict

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:

Invitation

get_invitation_edit(id)[source]

Get a single edit by id if available

Parameters:

id (str) – id of the edit

Returns:

edit matching the passed id

Return type:

Note

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.

Returns:

List of edits

Return type:

list[Edit]

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:

list[Invitation]

get_jobs_status()[source]

Only for Super User. Retrieves the jobs status of the queue

Returns:

Jobs status

Return type:

dict

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:
  • to (list[str], optional) – Tilde user names or emails

  • subject (str, optional) – Subject of the e-mail

  • status (str, optional) – Commad separated list of status values corresponding to the message: delivered, bounce, droppped, etc

Returns:

Messages that match the passed parameters

Return type:

dict

get_note(id, details=None)[source]

Get a single Note by id if available

Parameters:

id (str) – id of the note

Returns:

Note matching the passed id

Return type:

Note

get_note_edit(id, trash=None)[source]

Get a single edit by id if available

Parameters:

id (str) – id of the edit

Returns:

edit matching the passed id

Return type:

Note

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.

Returns:

List of edits

Return type:

list[Edit]

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:

list[Note]

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:
  • id (str) – Note id or Reference id of the pdf

  • is_reference (bool, optional) – Indicates that the passed id is a reference id instead of a note id

Returns:

The binary content of a pdf

Return type:

bytes

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

Parameters:
  • id (str, optional) – Note id

  • invitation (str, optional) – Invitation id that executed the process function that produced the logs

Returns:

Logs of the process

Return type:

dict

get_profile(email_or_id=None)[source]

Get a single Profile by id, if available

Parameters:

email_or_id (str, optional) – e-mail or id of the profile

Returns:

Profile object with its information

Return type:

Profile

get_tag(id)[source]

Get a single Tag by id if available

Parameters:

id (str) – id of the Tag

Returns:

Tag with the Tag information

Return type:

Tag

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:

list[Tag]

get_tildeusername(first, last, middle=None)[source]

Gets next possible tilde user name corresponding to the specified first, middle and last name

Parameters:
  • first (str) – First name of the user

  • last (str) – Last name of the user

  • middle (str, optional) – Middle name of the user

Returns:

next possible tilde user name corresponding to the specified first, middle and last name

Return type:

dict

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:

list[dict]

login_user(username=None, password=None, expiresIn=None)[source]

Logs in a registered user

Parameters:
  • username (str, optional) – OpenReview username

  • password (str, optional) – OpenReview password

Returns:

Dictionary containing user information and the authentication token

Return type:

dict

merge_profiles(profileTo, profileFrom)[source]

Merges two Profiles

Parameters:
  • profileTo (Profile) – Profile object to merge to

  • profileFrom – Profile object to merge from (this profile will be deleted)

Type:

profileFrom: Profile

Returns:

The new updated Profile

Return type:

Profile

post_direct_message(subject, recipients, message, sender=None)[source]

Posts a message to the recipients and consequently sends them emails

Parameters:
  • subject (str) – Subject of the e-mail

  • 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

Returns:

Contains the message that was sent to each Group

Return type:

dict

post_edge(edge)[source]

Posts the edge. Upon success, returns the posted Edge object.

post_edges(edges)[source]

Posts the list of Edges. Returns a list Edge objects updated with their ids.

post_edit(edit)[source]
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.

Parameters:

institution (dict) – institution to be posted

Returns:

The posted institution

Return type:

dict

post_invitation_edit(invitations, readers=None, writers=None, signatures=None, invitation=None, content=None, replacement=None)[source]
post_message(subject, recipients, message, ignoreRecipients=None, sender=None, replyTo=None, parentGroup=None)[source]

Posts a message to the recipients and consequently sends them emails

Parameters:
  • subject (list[str]) – Subject of the e-mail

  • 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:

dict

post_note_edit(invitation, signatures, note=None, readers=None, writers=None, nonreaders=None, content=None)[source]
post_profile(profile)[source]

Updates a Profile

Parameters:

profile (Profile) – Profile object

Returns:

The new updated Profile

Return type:

Profile

post_venue(venue)[source]

Posts the venue. Upon success, returns the posted Venue object.

put_attachment(file_path, invitation, name)[source]

Uploads a file to the openreview server

Parameters:
  • file (str) – Path to the file

  • invitation – Invitation of the note that required the attachment

  • file – name of the note field to save the attachment url

Returns:

A relative URL for the uploaded file

Return type:

str

register_user(email=None, fullname=None, password=None)[source]

Registers a new user

Parameters:
  • email (str, optional) – email that will be used as id to log in after the user is registered

  • fullname (str, optional) – Full name of the user

  • password (str, optional) – Password used to log into OpenReview

Returns:

Dictionary containing the new user information including his id, username, email(s), readers, writers, etc.

Return type:

dict

remove_members_from_group(group, members)[source]

Removes members from a group

Parameters:
  • group (Group or str) – Group (or Group’s id) from which the members will be removed

  • members (str, list, unicode) – Members that will be removed. Members should be in a string, unicode or a list format

Returns:

Group without the members that were removed

Type:

Group

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:

Profile

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:

list[Note]

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:

list[Profile]

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

Parameters:

member (str) – Member to add to the group

Returns:

Group with the new member added

Return type:

Group

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

Parameters:

g (dict) – Dictionary containing key-value pairs, where the keys values are equivalent to the name of the instance variables in the Group class

Returns:

Group whose instance variables contain the values from the dictionary

Return type:

Group

post(client)[source]

Posts a group to OpenReview

Parameters:

client (Client) – Client that will post the Group

remove_member(member)[source]

Removes a member from 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

Parameters:

member (str) – Member to remove from the group

Returns:

Group after the member was removed

Return type:

Group

to_json()[source]

Converts Group instance to a dictionary. The instance variable names are the keys and their values the values of the dictinary.

Returns:

Dictionary containing all the parameters of a Group instance

Return type:

dict

class openreview.api.Invitation(id=None, invitations=None, domain=None, readers=None, writers=None, invitees=None, signatures=None, edit=None, edge=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:

Invitation

to_json()[source]

Converts Invitation instance to a dictionary. The instance variable names are the keys and their values the values of the dictinary.

Returns:

Dictionary containing all the parameters of a Invitation instance

Return type:

dict

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

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

Parameters:

n (dict) – Dictionary containing key-value pairs, where the keys values are equivalent to the name of the instance variables in the Note class

Returns:

Note whose instance variables contain the values from the dictionary

Return type:

Note

to_json()[source]

Converts Note instance to a dictionary. The instance variable names are the keys and their values the values of the dictinary.

Returns:

Dictionary containing all the parameters of a Note instance

Return type:

dict

class openreview.api.Edit(id=None, domain=None, invitations=None, readers=None, writers=None, signatures=None, note=None, group=None, invitation=None, nonreaders=None, cdate=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

classmethod from_json(e)[source]

Creates an Edit object from a dictionary that contains keys values equivalent to the name of the instance variables of the Edit class

Parameters:

i (dict) – Dictionary containing key-value pairs, where the keys values are equivalent to the name of the instance variables in the Edit class

Returns:

Edit whose instance variables contain the values from the dictionary

Return type:

Edit

to_json()[source]

Converts Edit instance to a dictionary. The instance variable names are the keys and their values the values of the dictinary.

Returns:

Dictionary containing all the parameters of a Edit instance

Return type:

dict

Tools

openreview.tools.concurrent_get(client, get_function, **params)[source]

Given a function that takes a single parameter, returns a list of results.

Parameters:
  • client – Client used to make requests

  • get_function (function) – Function that takes a that performs the request

  • params (dict) – Parameters to pass to the get_function

Returns:

List of results

Return type:

list

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:
  • request_func (function) – a function to execute for each value of the list.

  • params (list) – a list of values to be executed by request_func.

  • max_workers (int) – number of workers to use in the multiprocessing tool, default value is 6.

Returns:

A list of results given for each func value execution

Return type:

list

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:

Profile

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:

int

openreview.tools.decision_to_venue(venue_id, decision_option)[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)

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:

str

openreview.tools.get_all_venues(client)[source]

Returns a list of all the venues

Parameters:

client (Client) – Client used to get all the venues

Returns:

List of all the venues represented by a their corresponding Group id

Return type:

list[str]

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:

list[str]

openreview.tools.get_current_submissions_profile_info(profile, n_years=None, submission_venueid=None)[source]

Gets only submissions submitted to the current venue

Parameters:
  • profile (Profile) – Profile from which all publications will be obtained

  • submission_venue_id (str) – venue_id of submissions we want to obtain

Returns:

Dictionary with the current publications associated with the passed Profile

Return type:

dict

openreview.tools.get_group(client, id)[source]

Get a single Group by id if available

Parameters:
  • client (Client) – User that will retrieve the group

  • id (str) – id of the group

Returns:

Group that matches the passed id

Return type:

Group

openreview.tools.get_invitation(client, id)[source]

Get a single Invitation by id if available

Parameters:
  • client (Client) – User that will retrieve the invitation

  • id (str) – id of the invitation

Returns:

Invitation that matches the passed id or None if it does not exist or it is expired

Return type:

Invitation

openreview.tools.get_neurips_profile_info(profile, n_years=None)[source]

Gets all the domains, emails, relations associated with a Profile

Parameters:
  • profile (Profile) – Profile from which all the relations will be obtained

  • n_years (int, optional) – Number of years to consider when getting the profile information

Returns:

Dictionary with the domains, emails, and relations associated with the passed Profile

Return type:

dict

openreview.tools.get_paperhash(first_author, title)[source]

Returns the paperhash of a paper, given the title and first author.

Parameters:
  • first_author (str) – First author that appears on the paper

  • title (str) – Title of the paper

Returns:

paperhash, see example

Return type:

str

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

Parameters:

profile (Profile) – Profile from which the preferred name will be retrieved

Returns:

User’s preferred name, if available, or the first listed name if not available.

Return type:

str

openreview.tools.get_profile(client, value, with_publications=False)[source]

Get a single profile (a note) by id, if available

Parameters:
  • client (Client) – User that will retrieve the profile

  • value (str) – e-mail or id of the profile

Returns:

Profile with that matches the value passed as parameter

Return type:

Profile

openreview.tools.get_profile_info(profile, n_years=None)[source]

Gets all the domains, emails, relations associated with a Profile

Parameters:
  • profile (Profile) – Profile from which all the relations will be obtained

  • n_years (int, optional) – Number of years to consider when getting the profile information

Returns:

Dictionary with the domains, emails, and relations associated with the passed Profile

Return type:

dict

openreview.tools.get_profiles(client, ids_or_emails, with_publications=False, with_relations=False, 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)

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:

iterget

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:

iterget

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:

iterget

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:

iterget

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:

iterget

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:

iterget

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)[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 sent

  • baseurl (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.

Parameters:
  • client (Client) – Client used to get the Profiles and to post the new Group

  • group (Group) – Group for which the profiles will be updated

Returns:

Group with the emails replaced by Profile ids

Return type:

Group

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:

list[str]

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:
  • year (int) – year >= 1970

  • month (int) – value from 1 to 12

  • day (int) – value from 1 to 28, 29, 30, or 31; depending on the month value.

  • hour (int, optional) – value from 0 to 23

  • minute (int, optional) – value from 0 to 59

  • second (int, optional) – value from 0 to 59

Returns:

Number of milliseconds between the passed date and Epoch Time (Jan 1, 1970)

Return type:

int

>>> timestamp_GMT(1990, 12, 20, hour=12, minute=30, second=24)
661696224000