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 bot that can play songs in Telegram group voice chats like AK 47

🎧 47Music Player 🎧 A bot that can play songs in Telegram group voice chats like AK 47 ✨ Easy To Deploy Pyrogram Session Config Vars API_ID : Assista

Janindu Malshan 23 Dec 07, 2022
🪣 Bitbucket Server PAT Generator

🪣 Bitbucket Server PAT Generator 🤝 Introduction Bitbucket Server (nee Stash) can hand out Personal Access Tokens (PAT) to be used in-place of user+p

reecetech 2 May 03, 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
Telegram Bot for updating ongoing matches of Fotmob.com in channel by @AbirHasan2005

Fotmob-Bot A very simple Telegram Bot which will update ongoing matches of Fotmob in a channel. Demo Channel Configs API_ID - Get this from @TeleORG_B

Abir Hasan 22 Oct 21, 2022
A twitter bot that simply replies with a beautiful screenshot of the tweet, powered by beautify.dhravya.dev

Poet this! Replies with a beautiful screenshot of the tweet, powered by poet.so Installation git clone https://github.com/dhravya/poet-this.git cd po

Dhravya Shah 30 Dec 04, 2022
A python tool to Automate Whatsapp through Whatsapp web

This python tool is used to Automate Whatsapp through Whatsapp web. We can add number of contacts whom we want to send text messages on perticular time

5 Jul 21, 2022
Rbx-mass-send - mass sends trades to item owners

mass sends trades to item owners proxies should be in ip:port format itemsToSend

0 Feb 20, 2022
WhatSender is a python package that allows you to send Whatsapp messages at a given time.

WhatSender is a python package that allows you to send Whatsapp messages at a given time.

IdoBarel 0 Apr 21, 2022
Python Tool To Get The Date That Your Account Joined Instagram

Date-Joined-Insta Python Tool To Get The Date That Your Account Joined Instagram You Dont Need To Login Just Enter The UserName If Id Did Not Work Ins

A B D U L L A H . 1 Dec 21, 2021
Change the discord status throught websocket every 5 seconds with an insult

Discord status insult changer Change the discord status throught websocket every 5 seconds with an insult! - pip install httpx - put your tokens in "t

Ѵιcнч 10 Oct 27, 2022
A discord account nuker with lots of tools that will destroy a discord account

A discord account nuker with lots of tools that will destroy a discord account (token destroyer... and much more).

firexi 10 Apr 28, 2022
A simple Discord Mass-Ban that's still working with Member Scraper.

Mass-Ban [!] This was made for education / you can use for revenge. Please don't skid it. [!] If you want to use it, please use member scraper before

WoahThatsHot 1 Nov 20, 2021
Video Stream: an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat 🧪 Get SESSION_NAME from below: Pyrogram

Jonathan 6 Feb 08, 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
My attempt at weaponizing Discord.

MayorbotC2 This is my Discord C2 bot. There are many like it, but this one is mine. MayorbotC2 is a project I absolutely forgot about until I was pilf

Joe Helle 19 May 16, 2022
A python package to fetch results of various national examinations done in Tanzania.

Necta-API Get a formated data of examination results scrapped from necta results website. Note this is not an official NECTA API and is still in devel

vincent laizer 16 Dec 23, 2022
A (probably) working Kik name checker

KikNameChecker !THIS ONLY CHECKS WS2.KIK.COM ENDPOINT! \ Will add user inputted endpoints thing \ A (probably) working Kik name checker Started as a s

insert edgy and cool name 1 Dec 17, 2022
A corona statistics and information telegram bot.

A corona statistics and information telegram bot.

Fayas Noushad 15 Oct 21, 2022
Video Stream is a telegram bot project that's allow you to play video on telegram group video chat

Video Stream is a telegram bot project that's allow you to play video on telegram group video chat 🚀 Get SESSION_NAME from below: Pyrogram ## ✨ Featu

1 Nov 10, 2021
LimitatiBot - A simple telegram bot to establish a conversation with a user without having to use private chats

🤖 LimitatiBot [0.2] LimitatiBot is a simple telegram bot to establish a convers

xMrPente 9 Dec 27, 2022