Skip to content

Commit f903180

Browse files
jhodges10Lezou Dali
andcommitted
Refactor SDK to be more object oriented (#71)
* Update outbound documentation link * Initial refactoring * Continued refactoring * Complete initial refactor * WIP fixing tests * Remove extra return * Continue refactoring * Fix asset.from_url() * Clean up example * Fix iteration problems in python 3.8.6 * fix ClientVersion version staticmethod for py27 * Fix integration test * get_folder -> get_children * Fix integration test downloads * Fix format_headers for py27 * Fix all staticmethods for py27 Co-authored-by: Lezou Dali <ldali@frame.io>
1 parent 6fb261d commit f903180

23 files changed

Lines changed: 902 additions & 742 deletions

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dist/
1414
downloads/
1515
eggs/
1616
.eggs/
17-
lib/
1817
lib64/
1918
parts/
2019
sdist/
@@ -107,4 +106,5 @@ venv.bak/
107106

108107
# Pipenv
109108
Pipfile
110-
Pipfile.lock
109+
Pipfile.lock
110+
.vscode/launch.json

examples/new_tests.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import os
2+
from pprint import pprint
3+
4+
from frameioclient import FrameioClient, Asset, ClientVersion
5+
6+
7+
token = os.getenv('FRAMEIO_TOKEN')
8+
client = FrameioClient(token)
9+
folder_id = 'dd8526ee-2c7d-4b48-9bf7-b847664666bb'
10+
file_path = '/Users/jeff/Code/python-frameio-client/examples/downloads/accelerated_Test_Chart_5_Sec_embedded_meta_Mezzanine.mxf'
11+
12+
client.assets.upload(folder_id, file_path)
13+
14+
15+
print(client.users.get_me())
16+
17+
pprint(client.teams.list_projects(client.teams.list_all()[0]['id']))
18+
19+
for log in client.logs.list(client.users.get_me()['account_id']):
20+
print(log)

frameioclient/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
from .client import FrameioClient
2-
from .utils import stream
2+
from .service import *
3+
from .lib import *

0 commit comments

Comments
 (0)