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
A Simple Voice Music Player

πŸ“€ π•π‚π”π¬πžπ«ππ¨π­ βˆšπ™π™šπ™–π™’βœ˜π™Šπ™˜π™©π™–π™«π™š NOTE JUST AN ENGLISH VERSION OF OUR PRIVATE SOURCE WAIT FOR LATEST UPDATES JOIN @π’π”πππŽπ‘π“ JOIN @𝐂?

TeamOctave 8 May 08, 2022
Python script for download course from platzi.com

Platzi Downloader Tool Esta es una pequeΓ±a herramienta que hace mucho y que te ahorra una gran cantidad de trabajo a la hora de descargar cursos de Pl

Devil64-Dev 21 Sep 22, 2022
Raphtory-client - The python client for the Raphtory project

Raphtory Client This is the python client for the Raphtory project Install via p

Raphtory 5 Apr 28, 2022
Hassium Server Manager For Python

Hassium Server Manager This is meant to be a tool for mostly internal use. I decided that I would make it open souce in case anyone wanted to use it.

0 Nov 24, 2022
Sample code helps get you started with a simple Python web service using AWS Lambda and Amazon API Gateway

Welcome to the AWS CodeStar sample web service This sample code helps get you started with a simple Python web service using AWS Lambda and Amazon API

0 Jan 20, 2022
IMDbPY is a Python package useful to retrieve and manage the data of the IMDb movie database about movies, people, characters and companies

IMDbPY is a Python package for retrieving and managing the data of the IMDb movie database about movies, people and companies. Revamp notice Starting

Davide Alberani 1.1k Jan 02, 2023
A telegram bot that messages you available vaccine appointments in the Veneto region

Serenissimo, domande frequenti Chi sei? Sono Alberto Granzotto, libero professionista a Berlino. Mi occupo di servizi software, privacy, decentralizza

vrde 31 Sep 30, 2022
Simple Python Auto Follow Bot

Instagram-Auto-Follow-Bot Description Mα»™t IG BOT Δ‘Ζ‘n giαΊ£n. Tα»± Δ‘α»™ng follow nhα»―ng người mΓ  bαΊ‘n muα»‘n cΖ°α»›p follow. Tα»± Δ‘α»™ng unfollow. Tα»± Δ‘α»™ng Δ‘Δƒng nhαΊ­p vΓ o

CodingLinhTinh 3 Aug 27, 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
A small python script which runs a speedtest using speedtest.net and inserts it into a Google Docs Spreadsheet.

speedtest-google-sheets This is a small python script which runs a speedtest using speedtest.net and inserts it into a Google Docs Spreadsheet. Setup

marie 2 Feb 10, 2022
An unoffcial python API client for primeuploads.com

primeuploads-py An unoffcial python API wrapper for primeuploads.com Installation pip3 install primeuploads-py Usage example from prime import PrimeUp

W4RR10R 41 Dec 05, 2022
PYAW allows you to call assembly from python

PYAW allows you to call assembly from python

2 Dec 13, 2021
Bender: A Markov Babbler Slack Bot

See the Digital Ocean tutorial for instructions on how to get the basic bot structure in place. Once you have that, set the gunicorn command to run as

Andrew Howard 1 Dec 04, 2021
[Fullversion]Web3 Pancakeswap Sniper bot written in python3.

πŸš€ Pancakeswap BSC Sniper Bot πŸš€ Web3 Pancakeswap Sniper && Take Profit/StopLose bot written in python3, Please note the license conditions! The secon

21 Dec 11, 2022
This tool helps users selecting items from the Gwennen gambling trade (based on prices of the uniques).

Gwennen Gambler This small program will check each item in the Gwennen shop (item gamble) according and show small stats according to poe.ninja. Shoul

9 Apr 10, 2022
Role Discord Members (by username) from File

Role Discord Members (by username) from File Bot Setup Navigate to https://discord.com/developers/applications Create a new application Navigate to th

Dylan Orrell 3 Jan 06, 2022
A discord.py bot template with easy deployment through Github Actions

discord.py bot template A discord.py bot template with easy deployment through Github Actions. You can use this template to just run a Python instance

Thomas Van Iseghem 1 Feb 09, 2022
Simple Python script that lets you upload image/video to imgur

Pymgur 🐍 Simple Python script that lets you upload image/video to imgur! Usage πŸ”¨ Git Clone this repository install the requirements (pip install -r

3 Feb 20, 2022
Bot that embeds a random hysterical meme from Reddit into your text channel as an embedded message, using an API call.

Discord_Meme_Bot 🀣 Bot that embeds a random hysterical meme from Reddit into your text channel as an embedded message, using an API call. Add the bot

2 Jan 16, 2022
Python API for working with RESQML models

resqpy: Python API for working with RESQML models Introduction resqpy is a pure python package which provides a programming interface (API) for readin

BP 44 Dec 14, 2022