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
C Y B Ξ R UserBot is a project that simplifies the use of Telegram.

C Y B Ξ R USΞRBOT 🇦🇿 C Y B Ξ R UserBot is a project that simplifies the use of Telegram. All rights reserved. Automatic Setup Android: open Termux p

FVREED 4 Dec 07, 2022
A simple Python TDLib wrapper

Telegram Forwarder App Description pywtdlib (Python Wrapper TDLib) is a simple synchronous Python wrapper that makes you easy to create new Python Tel

Álvaro Fernández 2 Jan 04, 2023
A quick-and-dirty script to scrape the daily menu of Leipzig University Mensa and send it to a telegram channel.

Feed me Mensa UL A quick-and-dirty script to scrape the daily menu of Leipzig University Mensa and send it to a telegram channel. For food and cat lov

3 Apr 08, 2022
An unofficial Python wrapper for the 'Binance exchange REST API'

Welcome to binex_f v0.1.0 many interfaces are heavily used by myself in product environment, the websocket is reliable (re)connected. Latest version:

DeepLn 2 Jan 05, 2022
Integrating Amazon API Gateway private endpoints with on-premises networks

Integrating Amazon API Gateway private endpoints with on-premises networks Read the blog about this application: Integrating Amazon API Gateway privat

AWS Samples 12 Sep 09, 2022
streamlit translator is used to detect and translate between languages created using gTTS, googletrans, pillow and streamlit python packages

Streamlit Translator Streamlit Translator is a simple translator app to detect and translate between languages. Streamlit Translator gets text and lan

Siva Prakash 5 Apr 05, 2022
Twitter-redesign - Twitter Redesign With Django

Twitter Redesign A project that tests Django and React knowledge through a twitt

Mark Jumba 1 Jun 01, 2022
asyncio client for Deta Cloud

aiodeta Unofficial client for Deta Clound Install pip install aiodeta Supported functionality Deta Base Deta Drive Decorator for cron tasks Examples i

Andrii Leitsius 19 Feb 14, 2022
A Python library wrapping the iFixit (Dozuki) API.

A Python library wrapping the iFixit API. Status Working, but incomplete. Fully tested and documented. Hacking I highly recommend using virtualenv: [$

James Pearson Hughes 13 May 24, 2021
Asad Alexa VC Bot Is A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group.

Asad Alexa VC Bot Is A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group.

Dr Asad Ali 6 Jun 20, 2022
A Python wrapper for Discord RPC API

Discord RPC An Python wrapper for Discord RPC API. Allow you to make own custom RPC Install PyPI pip install discord-rpc Quick example import Discord

LyQuid :3 10 Dec 29, 2022
Aws-lambda-requests-wrapper - Request/Response wrapper for AWS Lambda with API Gateway

AWS Lambda Requests Wrapper Request/Response wrapper for AWS Lambda with API Gat

1 May 20, 2022
A youtube search telegram bot.

YouTube-Search-Bot A youtube search telegram bot. Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https://github

Fayas Noushad 22 Nov 12, 2022
Twitter FakeNFT With Python

This project is a server that fetches your Twitter profile picture and applies the hexagonal transparency mask displayed on the profiles of users who have an NFT profile picture.

Mathis HAMMEL 29 Apr 23, 2022
Unlimited Filter Bot

Unlimited Filter Bot The Orginel Owner Of This Repo Is ㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤㅤ An advanced Filter Bot with nearly unlimitted filters! Features Nearly unlimite

4 Aug 02, 2022
Automatic Video Library Manager for TV Shows

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic. Dependen

1.5k Dec 22, 2022
cipher bot telegram

cipher-bot-telegram cipher bot telegram Telegram bot that encode/decode your messages To work correctly, you must install the latest version of python

anonim 1 Oct 10, 2021
A python based all-in-one tool for Google Drive

gdrive-tools A python based all-in-one tool for Google Drive Uses For Gdrive-Tools ✓ generate SA ✓ Add the SA and Add them to TD automatically ✓ Gener

XcodersHub 32 Feb 09, 2022
GBSLocalLauncher - A script to compose ENV file for Local Compose

GBSLocalLauncher This is a script to compose ENV file for Local Compose. It crea

2 Jan 27, 2022
A Python interface between Earth Engine and xarray for processing weather and climate data

wxee What is wxee? wxee was built to make processing gridded, mesoscale time series weather and climate data quick and easy by integrating the data ca

Aaron Zuspan 160 Dec 31, 2022