Skip to main content

OpenReviewIO Python API

Project description

/!\ Still in alpha stage and on its way to be stable. Every feedback is welcome!

Overview

OpenReviewIO is a standard that describes a format for sharing media (shots, animations...) review informations. It's main purpose is to guarantee review informations compatibility across media reviewing tools. Please read the specifications for more informations.

OpenReviewIO Python API is the main Python API for the ORIO standard, maintained by the designer of the standard.

Version

The version of the API is related to the version of the standard.
API 1.x.y <=> Standard 1.x

In Alpha stage, the API is 0.x.y but related to 1.x Standard. Will become 1.x.y when first stable release.

Last standard version: 1.0

Usage

import openreviewio as orio

Create a media review

review = orio.MediaReview("/path/to/media.ext")

Create a note

note = orio.Note(author="Alice")

Create content

Contents are defined by the standard version

There is a naming convention about the contents:
- Comment means something related to the whole media.
- Annotation means something related to a specific frame and duration of the media.

Text comment
text_comment = orio.Content.TextComment(body="My text comment")
Image comment
image = orio.Content.Image(path_to_image="/path/to/image_comment.png")
Image annotation
image_annotation = orio.Content.ImageAnnotation(
    frame=17,
    duration=20,
    path_to_image="/path/to/image_annotation.png"
)

Add content to note

# Single content
note.add_content(text_comment)

# Several contents
note.add_content([image, image_annotation])

Add note to review

review.add_note(note)

Write media review to disk

# Write next to the media
review.write()

# Specifying a directory
review.write("/path/to/review_dir")

Examples

From content to review

# Content
text = orio.Content.TextComment(body="Banana")

# Note
new_note = orio.Note("Michel", content=text)

# Review
review = orio.MediaReview("/path/to/media.ext", note=new_note)

Reply to a note

# Main note
text = orio.Content.TextComment(body="Make the logo bigger.")
main_note = orio.Note("Michel", content=text)

# Reply to the main note
reply = orio.Content.TextComment(body="Done, I'm waiting for my visibility payment.")
note_reply = orio.Note("Michel", content=reply, parent=main_note)

Copyright 2020, Félix David ©

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openreviewio-0.0.16.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openreviewio-0.0.16-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file openreviewio-0.0.16.tar.gz.

File metadata

  • Download URL: openreviewio-0.0.16.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for openreviewio-0.0.16.tar.gz
Algorithm Hash digest
SHA256 771b142ec442c517818334ed79512c17885e38c6b8a72a547f115600706f2c39
MD5 191def98ba91dc71a67f64311d278c3d
BLAKE2b-256 3853f0cecc4758cb5f1d9f915175cf3fe88639ba8bb7063c96f002129eec8539

See more details on using hashes here.

File details

Details for the file openreviewio-0.0.16-py3-none-any.whl.

File metadata

  • Download URL: openreviewio-0.0.16-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for openreviewio-0.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 0c7c3a6663a7a0b8361d4d7a912b97d9855e60fafc7a96ea70c0e35bc72174db
MD5 b577790e8a3a42080664f031ff9598b6
BLAKE2b-256 7cff15ab783326366dad05097f5a72f9f9eb67b2d1c4aab99680b3685e197c80

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page