GithubHelp home page GithubHelp logo

joshuacole / python-frameio-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from frameio/python-frameio-client

0.0 0.0 0.0 724 KB

Python SDK for interacting with the Frame.io API. Documentation here - https://frameio.github.io/python-frameio-client/

Home Page: https://developer.frame.io/

License: MIT License

Python 98.89% Makefile 0.56% Dockerfile 0.55%

python-frameio-client's Introduction

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")

python-frameio-client's People

Contributors

jhodges10 avatar sjkaliski avatar mrbaehr avatar strombergdev avatar michaeljguarino avatar jpylisela avatar kylenstone avatar robertcodes avatar jhurtadosandoval avatar mjiggidy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.