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
Cutting-edge GitHub page customization tool

Cutting-edge GitHub page customization tool Want to customize your GitHub user page, but don't know how? Now you can make your profile unique and attr

Igor Vaiman 32 Aug 24, 2022
Provide discord buttons feature for discord.py

dpy_buttons wrapper library for discord.py, providing discord buttons feature. Future of the library Will be merged into discord interaction api libra

Minjun Kim (Lapis0875) 17 Feb 02, 2022
Self-adjusting, auto-compounding multi-pair DCA crypto trading bot using Python, AWS Lambda & 3Commas API

Self-adjusting, auto-compounding multi-pair DCA crypto trading bot using Python, AWS Lambda & 3Commas API The following code describes how we can leve

Jozef Jaroščiak 21 Dec 07, 2022
Telegram bot implementing Lex Arcana using python-telegram-bot library.

Lex Arcana Telegram Bot 🤖 Telegram bot implementing Lex Arcana using python-telegram-bot library. This bot was evaluated for the course "Computer Eng

Nicolò Sonnino 6 Jun 22, 2022
WhatsApp Web API client with multi-device support

Tauros WhatsApp Web client for multi-device in python Free software: MIT Documentation: https://tauros.readthedocs.io Features TODO Credits This packa

Manjit Pardeshi 0 Jan 20, 2022
A simple API wrapper for the Tenor API

Gifpy A simple API wrapper for the Tenor API Installation Python 3.9 or higher is recommended python3 -m pip install gifpy Clone repository: $ git cl

Juan Ignacio Battiston 4 Dec 22, 2021
Analyzed the data of VISA applicants to build a predictive model to facilitate the process of VISA approvals.

Analyzed the data of Visa applicants, built a predictive model to facilitate the process of visa approvals, and based on important factors that significantly influence the Visa status recommended a s

Jesus 1 Jan 08, 2022
A Powerful, Smart And Simple Userbot In Telethon.

Owner: Masterolic 🇮🇳 BLACK LIGHTNING A Powerful, Smart And Simple Userbot In Telethon. Credits This is A Remix Bot Of Many UserBot. DARKCOBRA Friday

Masterolic 1 Nov 28, 2021
Tools ini hanya bisa digunakan untuk menyerang website atau http/s

☢️ Tawkun DoS ☢️ Tools ini hanya bisa digunakan untuk menyerang website atau http/s FITUR: [ ☯️ ] Proxy Mode [ 🔥 ] SOCKS Mode | Kadang Eror [ ☢️ ] Ht

Bandhitawkunthi 9 Jul 19, 2022
Get informed when your DeFI Earn CRO Validator is jailed or changes the commission rate.

CRO-DeFi-Warner Intro CRO-DeFi-Warner can be used to notify you when a validator changes the commission rate or gets jailed. It can also notify you wh

5 May 16, 2022
Discord Custom Playing Status Redirecting

Discord-Custom-Playing-Status-Redirecting THINGS TO DO :- - Create an application from https://discord.com/developers/applications give it ur desired

WarLorD oP 1 Oct 30, 2021
Dados Públicos de CNPJ disponibilizados pela Receita Federal do Brasil

Dados Públicos CNPJ Fonte oficial da Receita Federal do Brasil, aqui. Layout dos arquivos, aqui. A Receita Federal do Brasil disponibiliza bases com o

Aphonso Henrique do Amaral Rafael 102 Dec 28, 2022
We propose the adversarial blur attack (ABA) against visual object tracking.

ABA We propose the adversarial blur attack (ABA) against visual object tracking. The ICCV link: https://arxiv.org/abs/2107.12085 and, https://openacce

Qing Guo 13 Dec 01, 2022
Minimal Python client for the Iris API, built on top of Authlib and httpx.

🕸️ Iris Python Client Minimal Python client for the Iris API, built on top of Authlib and httpx. Installation pip install dioptra-iris-client Usage f

Dioptra 1 Jan 28, 2022
Simple integrate of API udemy.com with python

Pyudemy Simple integrate of API udemy.com with python Quick start $ pip install pyudemy or $ python setup.py install Authentication To make any calls

Hudson Brendon 30 Jan 02, 2023
Seamlessly Connecting Notion Database with Python Pandas DataFrame

notion-df: Seamlessly Connecting Notion Database with Pandas DataFrame Please Note: This project is currently in pre-alpha stage. The code are not app

Shannon Shen 38 Dec 28, 2022
A powerful discord bot for forming team.

Discord_SquadBot A powerful discord bot for forming team. Pre-requirement Python 3.7 and latest Discord.py module is required. Installation guideline

Jacky Yu 2 Jan 29, 2022
This is a walkthrough about understanding the #BoF machine present in the #OSCP exam.

Buffer Overflow methodology Introduction These are 7 simple python scripts and a methodology to ease (not automate !) the exploitation. Each script ta

3isenHeiM 53 Dec 08, 2022
A Discord token stealer app written in Python 3.

Discord Token Stealer A Discord token stealer app written in Python 3. This version of the grabber only supports Windows. Features No local caching Tr

cankat 45 Jan 03, 2023
An Async Bot/API wrapper for Twitch made in Python.

TwitchIO is an asynchronous Python wrapper around the Twitch API and IRC, with a powerful command extension for creating Twitch Chat Bots. TwitchIO co

TwitchIO 590 Jan 03, 2023