Python SDK for interacting with the Frame.io API.

Overview

python-frameio-client

PyPI version PyPI pyversions

artboard_small

Frame.io

Frame.io is a cloud-based collaboration hub that allows video professionals to share files, comment on clips real-time, and compare different versions and edits of a clip.

Overview

Installation

via Pip

$ pip install frameioclient

via Source

$ git clone https://github.com/frameio/python-frameio-client
$ pip install .

Developing

Install the package into your development environment and link to it by running the following:

pipenv install -e . -pre

Documentation

Frame.io API Documentation

Use CLI

When you install this package, a cli tool called fioctl will also be installed to your environment.

To upload a file or folder

fioctl \
--token fio-u-YOUR_TOKEN_HERE  \
--destination "YOUR TARGET FRAME.IO PROJECT OR FOLDER" \
--target "YOUR LOCAL SYSTEM DIRECTORY" \
--threads 8

To download a file, project, or folder

fioctl \
--token fio-u-YOUR_TOKEN_HERE  \
--destination "YOUR LOCAL SYSTEM DIRECTORY" \
--target "YOUR TARGET FRAME.IO PROJECT OR FOLDER" \
--threads 2

Links

Sphinx Documentation

Decorators

Usage

Note: A valid token is required to make requests to Frame.io. Go to our Developer Portal to get a token!

In addition to the snippets below, examples are included in /examples.

Get User Info

Get basic info on the authenticated user.

from frameioclient import FrameioClient

client = FrameioClient("TOKEN")
me = client.users.get_me()
print(me['id'])

Create and Upload Asset

Create a new asset and upload a file. For parent_asset_id you must have the root asset ID for the project, or an ID for a folder in the project. For more information on how assets work, check out our docs.

import os
from frameioclient import FrameioClient

client = FrameioClient("TOKEN")


# Create a new asset manually
asset = client.assets.create(
  parent_asset_id="1234abcd",
  name="MyVideo.mp4",
  type="file",
  filetype="video/mp4",
  filesize=os.path.getsize("sample.mp4")
)

# Create a new folder
client.assets.create(
  parent_asset_id="",
  name="Folder name",
  type="folder" # this kwarg is what makes it a folder
)

# Upload a file 
client.assets.upload(destination_id, "video.mp4")
Comments
  • Upload assets not working using Python

    Upload assets not working using Python

    I am using Python 3.7 on windows 10.

    from frameioclient import FrameioClient
    import os
    
    client = FrameioClient("MY_TOKEN_HERE")
    
    mov = "D:/Development/rc/frameio/a.mp4"
    filesize = os.path.getsize(mov)
    
    # Create a new asset.
    asset = client.create_asset(
      parent_asset_id="MY_ASSET_ID",
      name="MyVideo.mp4",
      type="file",
      filetype="video/mp4",
      filesize=filesize
    )
    
    # Upload the file at the target asset.
    file = open(mov, "rb")
    client.upload(asset, file)
    

    When I am trying to upload .mp4 file using python file getting error.

    D:\Development\rc\frameio\venv\Scripts\python.exe D:/Development/rc/frameio/demo01.py Traceback (most recent call last): File "D:/Development/rc/frameio/demo01.py", line 20, in client.upload(asset, file) File "D:\Development\rc\frameio\venv\lib\site-packages\frameioclient\client.py", line 238, in upload uploader.upload() File "D:\Development\rc\frameio\venv\lib\site-packages\frameioclient\upload.py", line 33, in upload proc.start() File "C:\Program Files\Python37\lib\multiprocessing\process.py", line 112, in start self._popen = self._Popen(self) File "C:\Program Files\Python37\lib\multiprocessing\context.py", line 223, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "C:\Program Files\Python37\lib\multiprocessing\context.py", line 322, in _Popen return Popen(process_obj) File "C:\Program Files\Python37\lib\multiprocessing\popen_spawn_win32.py", line 89, in init reduction.dump(process_obj, to_child) File "C:\Program Files\Python37\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) TypeError: cannot serialize '_io.BufferedReader' object

    opened by rajiv-hqvfx 4
  • Revamp Uploader for 2.7.x and 3.x

    Revamp Uploader for 2.7.x and 3.x

    Closes DEVREL-359, DEVREL-413, DEVREL-423

    Improves RAM usage in 3.x by more efficiently reading in chunks just in time, rather than during task creation and thread assignment.

    Also adds xxHash verification for integration tests, and a lot of fixes that go with that too in order to get our tests passing in 2.7.16 (default OSX version).

    Lastly, this PR standardizes our uploader around a single uploader.py and gets rid of the bifurcation of 2.x and 3.x uploaders.

    opened by jhodges10 3
  • 0.9.1 Release

    0.9.1 Release

    Contains a small fix to improve Uploader resiliency by retrying failed chunk PUT's.

    Jira Issues DEVREL-722 - Retry failed multi-part upload PUT requests

    opened by jhodges10 2
  • Adds client.get_team_members()

    Adds client.get_team_members()

    Closes DEVREL-431

    In testing the pagination from @strombergdev I had to add the get_team_members() and improve get_collaborators() in order for my code to work since it makes client._api_call() work a little bit differently.

    Also adds another function to the makefile to clean-up .pyc files.

    opened by jhodges10 2
  • Add create_team()

    Add create_team()

    The Developer site doesn't currently let you create a token with the team_create scope, so I have added a warning to the code for now that will be shown in the console when run, I'd love some feedback on this message (auto-generated but format can be tweaked).

    image

    For more on the warnings library, check out this link.

    opened by jhodges10 2
  • DEVREL-234, DEVREL-235, DEVREL-250: CircleCI setup, integration testing, improved dev tooling, and CODEOWNER setup

    DEVREL-234, DEVREL-235, DEVREL-250: CircleCI setup, integration testing, improved dev tooling, and CODEOWNER setup

    This is a big PR that adds a lot.

    The big item is CircleCI setup and testing for Python 2.7, 3.7.7, and 3.8+ (latest tag).

    There is now an integration test that tests both upload and download across that version matrix and makes sure that it succeeds before allowing code to merge into the master branch.

    There's also a Makefile now which includes functions for bumping the version up using semver syntax as well as tagging the version for git.

    If the version tag doesn't match the version in the setup.py file then it will not pass testing (disabled for now due to issues with the CIRCLE_TAG environment variable).

    CircleCI will only run the deploy stage on the master branch.

    This also separates our upload functions for Python 2 and 3 (and adds one for python 3!), as well as fixes some small bugs in the Python 2 uploader, and improves the PaginatedResponse object logic so it only returns a PaginatedResponse when there's actually more than 1 page of results, and not just every time results could potentially be paginated.

    Closes DEVREL-234, DEVREL-235, DEVREL-250.

    opened by jhodges10 2
  • Python3.8 serializing error: TypeError: cannot pickle '_io.BufferedReader' object

    Python3.8 serializing error: TypeError: cannot pickle '_io.BufferedReader' object

    When trying to upload a file using the docs recommendation the script triggers the following error:

    Traceback (most recent call last): File "frameio.py", line 26, in <module> client.upload(asset, file) File "/usr/local/lib/python3.8/site-packages/frameioclient/client.py", line 224, in upload uploader.upload() File "/usr/local/lib/python3.8/site-packages/frameioclient/upload.py", line 33, in upload proc.start() File "/usr/local/Cellar/[email protected]/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self) File "/usr/local/Cellar/[email protected]/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "/usr/local/Cellar/[email protected]/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 283, in _Popen return Popen(process_obj) File "/usr/local/Cellar/[email protected]/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__ super().__init__(process_obj) File "/usr/local/Cellar/[email protected]/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__ self._launch(process_obj) File "/usr/local/Cellar/[email protected]/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch reduction.dump(process_obj, fp) File "/usr/local/Cellar/[email protected]/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) TypeError: cannot pickle '_io.BufferedReader' object

    My quick guess would be the multiprocessing library used on the "upload.py" file, I'm not sure that works on py38.

    For the record, I've used python3.7 on the same script and worked fine.

    opened by brunohnq 2
  • Pagination is not supported

    Pagination is not supported

    How to reproduce:

    Add the parameter per_page to a call (for example get_asset_children(id, page_size=1)), This parameter is passed inside the payload (not the GET parameter) and it returns a page_size of 50.

    Moreover the PaginatedResponse class is not able to load next and previous pages.

    enhancement 
    opened by humberthardy 2
  • Introduce logging, telemetry, progress bars, transport layers, improved doc strings

    Introduce logging, telemetry, progress bars, transport layers, improved doc strings

    What's in this PR

    • Optional anonymous telemetry
    • Optional logging
    • Optional progress bars for upload and download jobs
    • Refactored Transport layers
    • Improved doc strings for functions
    enhancement 
    opened by jhodges10 1
  • Add Classifiers to setup.py to improve PyPI listing

    Add Classifiers to setup.py to improve PyPI listing

    Closes DEVREL-424.

    Adds Classifiers to our setup.py file which will tag our PyPI listing, and make the badge in the readme for supported Python versions actually work.

    Can be merged before or after #47, but has to happen before the next release!

    opened by jhodges10 1
  • Add comment scraper + asset scraper example code to python client

    Add comment scraper + asset scraper example code to python client

    There are improvements we could make here, I really liked the suggestion a reviewer left to output to stdout and not assume we're working with a .csv file. But that can come later and these will add value to have in the repo!

    opened by kylenstone 1
  • Update comment_scraper.py

    Update comment_scraper.py

    The comment scraper example resulted in a 404 error because comments.get() needed to be replaced with comments.list()

    [DEVREL-XXXX]

    Description:

    Changes comments.get() to comments.list()

    Depends on:

    N/A

    Includes changes from:

    N/A

    I'd like feedback on:

    N/A

    opened by jhurtadosandoval 0
  • Changed comments.update() API call from post to put

    Changed comments.update() API call from post to put

    [DEVREL-XXXX]

    Description:

    changed comments.updated() API request method from 'post' to 'put'

    Depends on:

    No

    Includes changes from:

    No

    I'd like feedback on:

    No

    opened by fadone 0
  • Added a new resource under Decorators

    Added a new resource under Decorators

    Added a new useful resource under 'Decorators' sections that explain all about Python Decorators. It will help users learn more about Python Decorators in detail. Link - https://www.scaler.com/topics/python/python-decorators/

    [DEVREL-XXXX]

    Description:

    Please provide a short description of what this PR does

    Depends on:

    • Does this PR depend on any other ones?

    Includes changes from:

    • Does this PR includ changes from another PR?

    I'd like feedback on:

    • What would you like feedback on?
    opened by sandeepmishratech 0
  • chore(CI): Clean-up for the v2.0.0 release

    chore(CI): Clean-up for the v2.0.0 release

    [DEVREL-XXXX]

    Description:

    • Fully adopt Poetry in lieu of Pipenv
    • Switch to wheels rather than sdist for package distribution
    • Improve CI by fixing tests
    opened by jhodges10 0
  • Release: 1.3.0

    Release: 1.3.0

    DEVREL-1096

    Description:

    Please provide a short description of what this PR does

    Depends on:

    • Does this PR depend on any other ones?

    Includes changes from:

    • #77
    • #78
    • #79
    • #81 <- maybe
    • #82
    • #83
    • #84
    • #85
    opened by jhodges10 0
Releases(v0.6.0)
Owner
Frame.io
The modern video workflow, (re)defined
Frame.io
qualysclient - a python SDK for interacting with the Qualys API

qualysclient - a python SDK for interacting with the Qualys API

null 5 Oct 28, 2022
Graviti-python-sdk - Graviti Data Platform Python SDK

Graviti Python SDK Graviti Python SDK is a python library to access Graviti Data

Graviti 13 Dec 15, 2022
Popcorn-time-api - Python API for interacting with the Popcorn Time Servers

Popcorn Time API ?? CONTRIBUTIONS Before doing any contribution read CONTRIBUTIN

Antonio 3 Oct 31, 2022
Python library for interacting with the Wunderlist 2 REST API

Overview Wunderpy2 is a thin Python library for accessing the official Wunderlist 2 API. What does a thin library mean here? Only the bare minimum of

mieubrisse 24 Dec 29, 2020
A python wrapper for interacting with the LabArchives API.

LabArchives API wrapper for Python A python wrapper for interacting with the LabArchives API. This very simple package makes it easier to make arbitra

Marek Cmero 3 Aug 1, 2022
Python 3 tools for interacting with Notion API

NotionDB Python 3 tools for interacting with Notion API: API client Relational database wrapper Installation pip install notiondb API client from noti

Viet Hoang 14 Nov 24, 2022
Python SDK for Facebook's Graph API

Facebook Python SDK This client library is designed to support the Facebook Graph API and the official Facebook JavaScript SDK, which is the canonical

Mobolic 2.7k Jan 7, 2023
The Official Dropbox API V2 SDK for Python

The offical Dropbox SDK for Python. Documentation can be found on Read The Docs. Installation Create an app via the Developer Console. Install via pip

Dropbox 828 Jan 5, 2023
Unofficial Medium Python Flask API and SDK

PyMedium - Unofficial Medium API PyMedium is an unofficial Medium API written in python flask. It provides developers to access to user, post list and

Engine Bai 157 Nov 11, 2022
Python SDK for the Buycoins API.

This library provides easy access to the Buycoins API using the Python programming language. It provides all the feature of the API so that you don't need to interact with the API directly. This library can be used with Python 3.6+

Musa Rasheed 48 May 4, 2022
A Python 2.7/3.x module for Amcrest Cameras using the SDK HTTP API.

A Python 2.7/3.x module for Amcrest Cameras using the SDK HTTP API. Amcrest and Dahua devices share similar firmwares. Dahua Cameras and NVRs also work with this module.

Marcelo Moreira de Mello 176 Dec 21, 2022
An Python SDK for QQ based on mirai-api-http v2.

Argon 一个基于 graia-broadcast 和 mirai-api-http v2 的 Python SDK。 本项目适用于 mirai-api-http 2.0 以上版本。 目前仍处于开发阶段,内部接口可能会有较大的变化。 The Stasis / 停滞 为维持 GraiaProject

BlueGlassBlock 1 Oct 29, 2021
An elegant mirai-api-http v2 Python SDK.

Ariadne 一个适用于 mirai-api-http v2 的 Python SDK。 本项目适用于 mirai-api-http 2.0 以上版本。 目前仍处于开发阶段,内部接口可能会有较大的变化。 安装 poetry add graia-ariadne 或 pip install graia

Graia Project 259 Jan 2, 2023
Python SDK for accessing the Hanko Authentication API

Hanko Authentication SDK for Python This package is maintained by Hanko. Contents Introduction Documentation Installation Usage Prerequisites Create a

Hanko.io 3 Mar 8, 2022
Balsam Python client API & SDK

balsam No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) This Python package is automatically

Darren Govoni 1 Oct 22, 2021
DongTai API SDK For Python

DongTai-SDK-Python Quick start You need a config file config.json { "DongTai":{ "token":"your token", "url":"http://127.0.0.1:90"

huoxian 50 Nov 24, 2022
Python 3 SDK/Wrapper for Huobi Crypto Exchange Api

This packages intents to be an idiomatic PythonApi wrapper for https://www.huobi.com/ Huobi Api Doc: https://huobiapi.github.io/docs Showcase TODO Con

null 3 Jul 28, 2022
A simple library for interacting with Amazon S3.

BucketStore is a very simple Amazon S3 client, written in Python. It aims to be much more straight-forward to use than boto3, and specializes only in

Jacobi Petrucciani 219 Oct 3, 2022