# Wormhole API for python
### 업데이트 내용
## 1.0.1 (wormhole_version : 1.4.0)
1. 하위 python 2.7에서 대응이 가능하도록 모듈의 import방식변경
- 기존에 모듈 import끼리 충돌 현상 발생으로 변경
2. Wh클래스 이름 login으로 변경
- wh2api.wh.Login(url,id,pw)형태로 변경
3. project.read에서 조회 버그 수정
## 1.0.2 (wormhole_version : 1.5.0)
1. 관리를 위한 로직을 변경했습니다. (일반사용자는 변경 되는 부분 없음)
- api_list 추가
- requests 모듈 한군데에서 작동되도록 변경
2. Task idx만으로 Task의 상세 데이터 조회가 가능해졌습니다.
```python
wh2api.shot_task.read(task_idx)
wh2api.asset_task.read(task_idx)
```
3. version업로드 시 등록 할 수 있는 옵션이 추가되었습니다.
- Description 추가
- cc옵션 추가
- metadata 옵션 추가
- 1개의 버전에 여러개의 파일을 업로드 할 수 있습니다.
- version_path에 list[]형태로 입력해 줍니다.
- version_path의 첫번째 version은 화면에 가장 처음 표시됩니다.
4. thumbnail_up이름을 thumbnail_update로 변경
- shot / Asset의 썸네일 업데이트시 함수명이 변경되었습니다.
5. publish APi 추가
- publish_path의 유효성 검사를 진행 합니다.
- 필수 입력은 (Task_idx,which,version_idx,Task_Status_idx,Version_status_idx,Publish_path_list)
## 1.0.3 (wormhole_version : 1.7.0)
1. 로직 변경
- Requests 모듈 뿐 아니라 기본 모듈인 urllib2,urllib3도 지원 합니다.
2. 로그인 방식 변경
- 토큰만으로도 로그인 가능
3. 모듈
- SHot / Asset list 조회 파라메터 변경
- Shot / Asset bulk_creat 추가(9,10)
- Task bulk_create 추가
4. json 출력 포맷 변경
- 예) shot_name='s0010', shot_idx='1' >>> shots: {name='s0010',idx='1'}
### 변경 전
```json
{
"shots": [
{ "shot_idx": "1", "name": "s0010_c0010", "shot_order": "1" },
{ "shot_idx": "2", "name": "s0010_c0020", "shot_order": "2" },
{ "shot_idx": "3", "name": "s0010_c0030", "shot_order": "3" },
{ "shot_idx": "4", "name": "s0010_c0040", "shot_order": "4" },
{ "shot_idx": "5", "name": "s0010_c0050", "shot_order": "5" },
{ "shot_idx": "6", "name": "s0010_c0060", "shot_order": "6" },
{ "shot_idx": "7", "name": "s0010_c0070", "shot_order": "7" },
{ "shot_idx": "8", "name": "s0010_c0080", "shot_order": "8" },
{ "shot_idx": "9", "name": "s0010_c0090", "shot_order": "9" },
{ "shot_idx": "10", "name": "s0010_c0100", "shot_order": "10" }
```
### 변경 후
```json
{
"shots": [
{ "idx": "1", "name": "s0010_c0010", "order": "1" },
{ "idx": "2", "name": "s0010_c0020", "order": "2" },
{ "idx": "3", "name": "s0010_c0030", "order": "3" },
{ "idx": "4", "name": "s0010_c0040", "order": "4" },
{ "idx": "5", "name": "s0010_c0050", "order": "5" },
{ "idx": "6", "name": "s0010_c0060", "order": "6" },
{ "idx": "7", "name": "s0010_c0070", "order": "7" },
{ "idx": "8", "name": "s0010_c0080", "order": "8" },
{ "idx": "9", "name": "s0010_c0090", "order": "9" },
{ "idx": "10", "name": "s0010_c0100", "order": "10" }
]
}
```
## 1.0.5 (wormhole_version : 1.15.8)
1. Shot/Asset Read 모듈 변경 및 추가
- Shot/Asset 의 index만 가지고 있으면 해당 Shot/Asset의 정보를 불러올 수 있습니다.
- Custom Colume의 정보를 가져올 수 있게 변경 되었습니다.
## 1.0.6 (wormhole_version : 1.15.8) - 빌드 문제로 설치금지
1. Python 3의 urllib3모듈관련 버그 수정
- Get Request에서 필드 데이터 처리 방식이 변경 되었습니다.
```
삭제 getdata = urllib3.request.urlencode(data)
수정 전 result = http.request('Get', url=wh.Login.url + api + '?'+ gestdata, headers={"cookie":wh_token})
수정 후 result = http.request('Get', url=wh.Login.url + api + '?',fields=data, headers={"cookie":wh_token})
```
## 1.0.7 (wormhole_version : 1.15.8)
1. 재 빌드 1.0.6 변경 사항 유지
## 1.0.8(WORMHOLE_VERSION: 1.16.X)
1. 버그 픽스
2. Track API 추가
## 사용방법
## 1. install
웜홀 api는 python3이상에서 원활하게 작동 됩니다.
pip의 최신버전으로 업데이트 후 설치 하시기 바랍니다.
```
pip install --upgrade pip
```
pip패키지 install(필수)
```
pip install wh2api #웜홀 API
pip install requests
pip install json
```
## 3. 패키지 import
```python
from wh2api import wh
import wh2api
```
## 4. 모듈 첫사용시
```python
wh.Login('http://host','id','pw')
#로그인 성공시 whtoken을 "Login.whtoken"라는 클래스 변수로 가지고 있음
```
## 4-1. 토큰 로그인
```python
wh.Login('http://host','id',wh_token = "login_token")
#로그인 성공시 받은 wh_token을 넣으면 로그인이됨
#사용방법
wh = wh.Login('http://host','id','pw')
wh_token = wh.whtoken['whtoken']
#토큰을 아는경우
wh = wh.Login('http://host','id',wh_token = wh_token)
```
## 5. project
- project.list
```python
wh2api.project.list(finished="")
# finished = '1' 끝난 프로젝트도 조회
# 웜홀에 있는 모든 프로젝트를 조회
```
- project.read
```python
wh2api.project.read(project_idx)
#Porject의 상세 내용 조회
#버전업 및 퍼블리시 저장 경로 조회
#진행 상황 조회
```
## 6. episode
- episode.list
```python
wh2api.episode.list(project_idx)
#프로젝트 내부 에피소드 리스트 조회
```
- episode.create
```python
wh2api.episode.create(project_idx,episode_name,description="")
#에피소드 생성
```
## 7. sequence
- list
```python
wh2api.sequence.list(project_idx,episode_idx)
#에피소드 내부 시퀀스 리스트 조회
```
- create
wh.sequence.create(project_idx,episode_idx,sequence_name,description="")
#시퀀스 생성
## 8. shot
- list
```python
wh2api.shot.list(project_idx,episode_idx,sequence_idx)
#시퀀스 내부 샷 리스트 조회
```
- read
```python
wh2api.shot.read(shot_idx)
#특정 샷의 세부내용 조회
```
- create
```python
wh2api.shot.create(project_idx,episode_idx,sequence_idx,shot_name,description="",status_idx="1")
#샷 생성
#status_idx 비어있을때 기본값 1번
```
- thumbnail_update
```python
wh2api.shot.thumbnail_update(project_idx,shot_idx,thumbnail_path)
#특정샷의 썸네일 업로드
#Thubmnail_path 입력시 윈도우는 'r'을 붙혀서 업로드 해야 오류 없음
#ex) r'H:\c2mosnter\test.jpg'
#지원 포맷 *.jpg, *.png
```
- overview
```python
wh2api.shot.overview(project_idx,episode_idx="")
#overview페이지 조회
#episode가 비어있는경우 프로젝트 전체조회
```
- relation
```python
wh2api.shot.relation(project_idx,episode_idx)
#샷에 연관된 에셋의 목록 조회
#웜홀의 Relation페이지 연동
```
## 9. shot_Task
- list
```python
wh2api.shot_task.list(project_idx,shot_idx)
#샷 내부의 Task조회
```
- create
```python
wh2api.shot_task.create(project_idx,shot_idx,tasktype_name)
#샷내부에 Task 생성
#중복 될경우 에러 발생
```
- bulk_create
```python
wh2api.shot_task.bulk_create(project_idx,shot_idx=[],tasktype_name=[])
#shot_idx와 tasktype_name을 똑같은 수를 배열로 보내야함
#ex)
shot_idx = [1,1,1,1,2,2,2,2]
tasktype = ['comp','animation','fx','final','comp','animation','fx','final']
#인덱스가 1,2번인 샷에 'comp','animation','fx','final' 4개의 테스크를 각각 등록
```
- status_change
```python
wh2api.shot_task.status_change(project_idx,task_idx,status_idx)
#특정 Task의 Task Staus를 변경
```
- start
```python
wh2api.shot_task.start(project_idx,task_idx)
#Task Start(MyTask>Todo)
```
- stop
```python
wh2api.shot_task.stop(project_idx,task_idx)
#Task Stop(MyTask>Todo)
```
## 10. category
- list
```python
wh2api.category.list(project_idx)
#프로젝트 내부에 Asset의 Category조회
```
- create
```python
wh2api.category.create(project_idx,category_name,description="")
#Category생성
```
## 11. Asset
- list
```python
wh2api.asset.list(project_idx,category_idx)
#특정 Category의 Asset 조회
```
- read
```python
wh2api.asset.read(asset_idx)
#특정 에셋의 세부내용 조회
```
- create
```python
wh2api.asset.create(project_idx,category_idx,asset_name,description="",status_idx="1")
#Asset생성
```
- thumbnail_update
```python
wh2api.asset.thumbnail_update(project_idx,asset_idx,thumbnail_path)
#특정 Asset의 썸네일 업로드
#Thubmnail_path 입력시 윈도우는 'r'을 붙혀서 업로드 해야 오류 없음
#ex) r'H:\c2mosnter\test.jpg'
#지원 포맷 *.jpg, *.png
```
- overview
```python
wh2api.asset.overview(project_idx,category_idx="")
#Asset Overview조회
```
## 12. asset_Task
- list
```python
wh2api.asset_task.list(project_idx,asset_idx)
#에셋 내부의 Task조회
```
- create
```python
wh2api.asset_task.create(project_idx,asset_idx,tasktype_name)
#에셋내부에 Task 생성
#중복 될경우 에러 발생
```
- bulk_create
```python
wh2api.asset_task.bulk_create(project_idx,asset_idx=[],tasktype_name=[])
#asset_idx와 tasktype_name을 똑같은 수를 배열로 보내야함
#ex)
tasktype = ['concept','modeling','texture','lodev','concept','modeling','texture','lodev']
#인덱스가 1,2번인 에셋에 'concept','modeling','texture','lodev' 4개의 테스크를 각각 등록
```
- status_change
```python
wh2api.asset_task.status_change(project_idx,task_idx,status_idx)
#특정 Task의 Task Staus를 변경
```
- start
```python
wh2api.asset_task.start(project_idx,task_idx)
#Task Start(MyTask>Todo)
```
- stop
```python
wh2api.asset_task.stop(project_idx,task_idx)
#Task Stop(MyTask>Todo)
```
## 13. version
- key
```python
wh2api.version.key(task_idx, which='shot or asset')
#특정 Task의 Key를 얻어내는 함수
#Version_key생성
```
- key_read
```python
wh2api.version.key_read(version_key)
#Version_key 정보 조회
```
- create
```python
wh2api.version.create(task_idx='',
which='shot or asset',
version_name='',
task_status_idx='',
version_status_idx='',
reviewer_user_idx='',
hour_spent='',
version_path=[],
metadata= [],
description="",
cc_user_idx='',
thumbnail_path = ""):
# 윈도우의경우 version Path입력시 'r'을 입력
#ex) version_path = r'c:\\c2monster\test.mov'
# 지원 *.mp4
# 서버에서 컨버팅 하는 과정이 없기때문에 업로드하는 버전의 용량이 클 경우 플레이가 안될 수 있음
#참조 인원 cc_user_idx=[1,2,3]
# #version_path와 metadata의 리스트의 개수와 순서는 같아야 합니다.
# version_path = ['a','b','c']
# metadata = ['a_meta','b_meta','c_meta']
```
## 14. user
- list
```python
wh2api.user.list()
#웜홀에 가입되있는 유저 조회
```
## 15. team
- list
```python
wh2api.team.list()
#Team의 목록 조회
```
- user_list
```python
wh2api.team.user_list(team_idx)
#선택한 Team안에 있는 User조회
```
## 16. mytask
- todo
```python
wh2api.mytask.todo(observed_user_idx="")
#observed_user_idx가 공백인경우 본인
#observed_user_idx에 User_idx를 추가할 경우 해당 인원의 MyTask조회
```
- inprogress
```python
wh2api.mytask.inprogress(last="")
#last입력시 마지막 버전만 조회
```
- done
```python
wh2api.mytask.done()
#끝난Task조회
```
- cc
```python
wh2api.mytask.cc(last="")
#last입력시 마지막 버전만 조회
```
## 17. org
- read
```python
wh2api.org.read(org_id='std')
#std가 기본값임
#System information 정보 조회 가능
```
## 18. publish
- key
```python
wh2api.publish.key(task_idx, which='shot or asset')
#which는 'shot' 또는 'asset'이라고 입력 합니다.
```
- key_read
```python
wh2api.publish.key_read(publish_key)
#퍼블리시키의 상세정보 조회
#퍼블리시 생성시 사용
```
- create
```python
wh2api.publish.create(task_idx='',
which='shot or asset',
version_idx='',
publish_name ='',
task_status_idx='',
version_status_idx='',
publish_path=[],
description='',
tag=''):
#필수 입력값 : Task_idx,which,version_idx,Task_Status_idx,Version_status_idx,Publish_path
#publish_Path는 유효성 겁사를 진행, 해당경로에 파일이나 폴더가 없다면 리스트에서 제외한 후 진행합니다.
# publish_path의 유효성 검사 중, 한개의 파일 또는 폴더가 없다면 프로세스는 종료 됩니다.
```
## 19. Track
Wormhole의 Track페이지에 나오는 항목을 조회
- version
```python
wh2api.track.version(projectidx=int
from_date="yy-mm-dd",
to_date="yy-mm-dd",
last=""
)
'''
:param project_idx:프로젝트 index
:param from_date: 시작일정
:param to_date: 종료일정
:param last: 마지막 버전만 확인하고 싶을땐 "last"입력
:return:
'''
```
- shot_task
```python
wh2api.track.shot_task(project_idx,episode_idx,sequence_idx="all",page=1)
'''
:param project_idx:프로젝트 인덱스
:param episode_idx: 에피소드 인덱스
:param sequence_idx: 필요시 인덱스 입력
:param page: 기본값 1페이지
{'next_data': False, 'page': 2 }으로 다음페이지여부가 표시됨
:return:
'''
```
- asset_task
```python
wh2api.track.asset_task(project_idx,category_idx='all',page=1)
'''
:param project_idx: 프로젝트 인덱스
:param category_idx: 필요시 카테고리 인덱스 입력
:param page: 기본값1페이지
{'next_data': False, 'page': 2 }으로 다음페이지여부가 표시됨
:return:
'''
```
---
## c2monster
c2monster는 영화 드라마 제작을 위한 소프트웨어를 개발하는 회사 입니다.
### wormhole
http://wormholepipeline.com
E-mail : wfjo852@c2monster.com , contact@c2monster.com
Raw data
{
"_id": null,
"home_page": "https://wormholepipeline.com",
"name": "wh2api",
"maintainer": null,
"docs_url": null,
"requires_python": ">=2",
"maintainer_email": null,
"keywords": "wormhole, sdk, wh_api",
"author": "C2monster",
"author_email": "contact@c2monster.com",
"download_url": null,
"platform": null,
"description": "# Wormhole API for python\r\n\r\n### \uc5c5\ub370\uc774\ud2b8 \ub0b4\uc6a9\r\n## 1.0.1 (wormhole_version : 1.4.0)\r\n1. \ud558\uc704 python 2.7\uc5d0\uc11c \ub300\uc751\uc774 \uac00\ub2a5\ud558\ub3c4\ub85d \ubaa8\ub4c8\uc758 import\ubc29\uc2dd\ubcc0\uacbd\r\n - \uae30\uc874\uc5d0 \ubaa8\ub4c8 import\ub07c\ub9ac \ucda9\ub3cc \ud604\uc0c1 \ubc1c\uc0dd\uc73c\ub85c \ubcc0\uacbd\r\n2. Wh\ud074\ub798\uc2a4 \uc774\ub984 login\uc73c\ub85c \ubcc0\uacbd\r\n - wh2api.wh.Login(url,id,pw)\ud615\ud0dc\ub85c \ubcc0\uacbd \r\n3. project.read\uc5d0\uc11c \uc870\ud68c \ubc84\uadf8 \uc218\uc815\r\n\r\n## 1.0.2 (wormhole_version : 1.5.0)\r\n1. \uad00\ub9ac\ub97c \uc704\ud55c \ub85c\uc9c1\uc744 \ubcc0\uacbd\ud588\uc2b5\ub2c8\ub2e4. (\uc77c\ubc18\uc0ac\uc6a9\uc790\ub294 \ubcc0\uacbd \ub418\ub294 \ubd80\ubd84 \uc5c6\uc74c)\r\n - api_list \ucd94\uac00\r\n - requests \ubaa8\ub4c8 \ud55c\uad70\ub370\uc5d0\uc11c \uc791\ub3d9\ub418\ub3c4\ub85d \ubcc0\uacbd\r\n2. Task idx\ub9cc\uc73c\ub85c Task\uc758 \uc0c1\uc138 \ub370\uc774\ud130 \uc870\ud68c\uac00 \uac00\ub2a5\ud574\uc84c\uc2b5\ub2c8\ub2e4. \r\n ```python\r\n wh2api.shot_task.read(task_idx)\r\n wh2api.asset_task.read(task_idx)\r\n ```\r\n3. version\uc5c5\ub85c\ub4dc \uc2dc \ub4f1\ub85d \ud560 \uc218 \uc788\ub294 \uc635\uc158\uc774 \ucd94\uac00\ub418\uc5c8\uc2b5\ub2c8\ub2e4.\r\n - Description \ucd94\uac00\r\n - cc\uc635\uc158 \ucd94\uac00\r\n - metadata \uc635\uc158 \ucd94\uac00\r\n - 1\uac1c\uc758 \ubc84\uc804\uc5d0 \uc5ec\ub7ec\uac1c\uc758 \ud30c\uc77c\uc744 \uc5c5\ub85c\ub4dc \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\r\n - version_path\uc5d0 list[]\ud615\ud0dc\ub85c \uc785\ub825\ud574 \uc90d\ub2c8\ub2e4.\r\n - version_path\uc758 \uccab\ubc88\uc9f8 version\uc740 \ud654\uba74\uc5d0 \uac00\uc7a5 \ucc98\uc74c \ud45c\uc2dc\ub429\ub2c8\ub2e4.\r\n4. thumbnail_up\uc774\ub984\uc744 thumbnail_update\ub85c \ubcc0\uacbd\r\n - shot / Asset\uc758 \uc378\ub124\uc77c \uc5c5\ub370\uc774\ud2b8\uc2dc \ud568\uc218\uba85\uc774 \ubcc0\uacbd\ub418\uc5c8\uc2b5\ub2c8\ub2e4.\r\n \r\n5. publish APi \ucd94\uac00\r\n - publish_path\uc758 \uc720\ud6a8\uc131 \uac80\uc0ac\ub97c \uc9c4\ud589 \ud569\ub2c8\ub2e4.\r\n - \ud544\uc218 \uc785\ub825\uc740 (Task_idx,which,version_idx,Task_Status_idx,Version_status_idx,Publish_path_list)\r\n\r\n## 1.0.3 (wormhole_version : 1.7.0)\r\n1. \ub85c\uc9c1 \ubcc0\uacbd\r\n - Requests \ubaa8\ub4c8 \ubfd0 \uc544\ub2c8\ub77c \uae30\ubcf8 \ubaa8\ub4c8\uc778 urllib2,urllib3\ub3c4 \uc9c0\uc6d0 \ud569\ub2c8\ub2e4.\r\n \r\n2. \ub85c\uadf8\uc778 \ubc29\uc2dd \ubcc0\uacbd\r\n - \ud1a0\ud070\ub9cc\uc73c\ub85c\ub3c4 \ub85c\uadf8\uc778 \uac00\ub2a5\r\n \r\n3. \ubaa8\ub4c8\r\n - SHot / Asset list \uc870\ud68c \ud30c\ub77c\uba54\ud130 \ubcc0\uacbd\r\n - Shot / Asset bulk_creat \ucd94\uac00(9,10)\r\n - Task bulk_create \ucd94\uac00\r\n\r\n4. json \ucd9c\ub825 \ud3ec\ub9f7 \ubcc0\uacbd\r\n\r\n - \uc608) shot_name='s0010', shot_idx='1' >>> shots: {name='s0010',idx='1'}\r\n### \ubcc0\uacbd \uc804\r\n```json\r\n{\r\n \"shots\": [\r\n { \"shot_idx\": \"1\", \"name\": \"s0010_c0010\", \"shot_order\": \"1\" },\r\n { \"shot_idx\": \"2\", \"name\": \"s0010_c0020\", \"shot_order\": \"2\" },\r\n { \"shot_idx\": \"3\", \"name\": \"s0010_c0030\", \"shot_order\": \"3\" },\r\n { \"shot_idx\": \"4\", \"name\": \"s0010_c0040\", \"shot_order\": \"4\" },\r\n { \"shot_idx\": \"5\", \"name\": \"s0010_c0050\", \"shot_order\": \"5\" },\r\n { \"shot_idx\": \"6\", \"name\": \"s0010_c0060\", \"shot_order\": \"6\" },\r\n { \"shot_idx\": \"7\", \"name\": \"s0010_c0070\", \"shot_order\": \"7\" },\r\n { \"shot_idx\": \"8\", \"name\": \"s0010_c0080\", \"shot_order\": \"8\" },\r\n { \"shot_idx\": \"9\", \"name\": \"s0010_c0090\", \"shot_order\": \"9\" },\r\n { \"shot_idx\": \"10\", \"name\": \"s0010_c0100\", \"shot_order\": \"10\" }\r\n```\r\n\r\n\r\n### \ubcc0\uacbd \ud6c4 \r\n```json\r\n{\r\n \"shots\": [\r\n { \"idx\": \"1\", \"name\": \"s0010_c0010\", \"order\": \"1\" },\r\n { \"idx\": \"2\", \"name\": \"s0010_c0020\", \"order\": \"2\" },\r\n { \"idx\": \"3\", \"name\": \"s0010_c0030\", \"order\": \"3\" },\r\n { \"idx\": \"4\", \"name\": \"s0010_c0040\", \"order\": \"4\" },\r\n { \"idx\": \"5\", \"name\": \"s0010_c0050\", \"order\": \"5\" },\r\n { \"idx\": \"6\", \"name\": \"s0010_c0060\", \"order\": \"6\" },\r\n { \"idx\": \"7\", \"name\": \"s0010_c0070\", \"order\": \"7\" },\r\n { \"idx\": \"8\", \"name\": \"s0010_c0080\", \"order\": \"8\" },\r\n { \"idx\": \"9\", \"name\": \"s0010_c0090\", \"order\": \"9\" },\r\n { \"idx\": \"10\", \"name\": \"s0010_c0100\", \"order\": \"10\" }\r\n ]\r\n}\r\n\r\n```\r\n## 1.0.5 (wormhole_version : 1.15.8)\r\n1. Shot/Asset Read \ubaa8\ub4c8 \ubcc0\uacbd \ubc0f \ucd94\uac00\r\n - Shot/Asset \uc758 index\ub9cc \uac00\uc9c0\uace0 \uc788\uc73c\uba74 \ud574\ub2f9 Shot/Asset\uc758 \uc815\ubcf4\ub97c \ubd88\ub7ec\uc62c \uc218 \uc788\uc2b5\ub2c8\ub2e4.\r\n - Custom Colume\uc758 \uc815\ubcf4\ub97c \uac00\uc838\uc62c \uc218 \uc788\uac8c \ubcc0\uacbd \ub418\uc5c8\uc2b5\ub2c8\ub2e4. \r\n\r\n## 1.0.6 (wormhole_version : 1.15.8) - \ube4c\ub4dc \ubb38\uc81c\ub85c \uc124\uce58\uae08\uc9c0\r\n1. Python 3\uc758 urllib3\ubaa8\ub4c8\uad00\ub828 \ubc84\uadf8 \uc218\uc815\r\n - Get Request\uc5d0\uc11c \ud544\ub4dc \ub370\uc774\ud130 \ucc98\ub9ac \ubc29\uc2dd\uc774 \ubcc0\uacbd \ub418\uc5c8\uc2b5\ub2c8\ub2e4.\r\n```\r\n\uc0ad\uc81c getdata = urllib3.request.urlencode(data)\r\n\r\n\uc218\uc815 \uc804 result = http.request('Get', url=wh.Login.url + api + '?'+ gestdata, headers={\"cookie\":wh_token})\r\n\uc218\uc815 \ud6c4 result = http.request('Get', url=wh.Login.url + api + '?',fields=data, headers={\"cookie\":wh_token})\r\n\r\n```\r\n## 1.0.7 (wormhole_version : 1.15.8)\r\n1. \uc7ac \ube4c\ub4dc 1.0.6 \ubcc0\uacbd \uc0ac\ud56d \uc720\uc9c0\r\n\r\n## 1.0.8(WORMHOLE_VERSION: 1.16.X)\r\n1. \ubc84\uadf8 \ud53d\uc2a4 \r\n2. Track API \ucd94\uac00\r\n\r\n## \uc0ac\uc6a9\ubc29\ubc95\r\n\r\n## 1. install\r\n\uc6dc\ud640 api\ub294 python3\uc774\uc0c1\uc5d0\uc11c \uc6d0\ud65c\ud558\uac8c \uc791\ub3d9 \ub429\ub2c8\ub2e4. \r\npip\uc758 \ucd5c\uc2e0\ubc84\uc804\uc73c\ub85c \uc5c5\ub370\uc774\ud2b8 \ud6c4 \uc124\uce58 \ud558\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4. \r\n```\r\npip install --upgrade pip\r\n```\r\npip\ud328\ud0a4\uc9c0 install(\ud544\uc218)\r\n```\r\npip install wh2api #\uc6dc\ud640 API\r\npip install requests\r\npip install json\r\n```\r\n\r\n## 3. \ud328\ud0a4\uc9c0 import\r\n\r\n```python\r\nfrom wh2api import wh\r\nimport wh2api\r\n```\r\n## 4. \ubaa8\ub4c8 \uccab\uc0ac\uc6a9\uc2dc\r\n\r\n```python\r\nwh.Login('http://host','id','pw')\r\n#\ub85c\uadf8\uc778 \uc131\uacf5\uc2dc whtoken\uc744 \"Login.whtoken\"\ub77c\ub294 \ud074\ub798\uc2a4 \ubcc0\uc218\ub85c \uac00\uc9c0\uace0 \uc788\uc74c\r\n```\r\n\r\n## 4-1. \ud1a0\ud070 \ub85c\uadf8\uc778 \r\n\r\n```python\r\nwh.Login('http://host','id',wh_token = \"login_token\") \r\n#\ub85c\uadf8\uc778 \uc131\uacf5\uc2dc \ubc1b\uc740 wh_token\uc744 \ub123\uc73c\uba74 \ub85c\uadf8\uc778\uc774\ub428\r\n\r\n#\uc0ac\uc6a9\ubc29\ubc95\r\nwh = wh.Login('http://host','id','pw')\r\nwh_token = wh.whtoken['whtoken']\r\n\r\n#\ud1a0\ud070\uc744 \uc544\ub294\uacbd\uc6b0\r\nwh = wh.Login('http://host','id',wh_token = wh_token)\r\n```\r\n\r\n## 5. project\r\n- project.list\r\n```python\r\nwh2api.project.list(finished=\"\")\r\n # finished = '1' \ub05d\ub09c \ud504\ub85c\uc81d\ud2b8\ub3c4 \uc870\ud68c\r\n # \uc6dc\ud640\uc5d0 \uc788\ub294 \ubaa8\ub4e0 \ud504\ub85c\uc81d\ud2b8\ub97c \uc870\ud68c\r\n```\r\n\r\n- project.read\r\n```python\r\nwh2api.project.read(project_idx)\r\n #Porject\uc758 \uc0c1\uc138 \ub0b4\uc6a9 \uc870\ud68c\r\n #\ubc84\uc804\uc5c5 \ubc0f \ud37c\ube14\ub9ac\uc2dc \uc800\uc7a5 \uacbd\ub85c \uc870\ud68c\r\n #\uc9c4\ud589 \uc0c1\ud669 \uc870\ud68c\r\n```\r\n\r\n\r\n## 6. episode\r\n- episode.list\r\n```python\r\nwh2api.episode.list(project_idx)\r\n #\ud504\ub85c\uc81d\ud2b8 \ub0b4\ubd80 \uc5d0\ud53c\uc18c\ub4dc \ub9ac\uc2a4\ud2b8 \uc870\ud68c\r\n```\r\n\r\n\r\n- episode.create\r\n```python\r\nwh2api.episode.create(project_idx,episode_name,description=\"\")\r\n #\uc5d0\ud53c\uc18c\ub4dc \uc0dd\uc131\r\n```\r\n\r\n## 7. sequence\r\n- list\r\n```python\r\nwh2api.sequence.list(project_idx,episode_idx)\r\n #\uc5d0\ud53c\uc18c\ub4dc \ub0b4\ubd80 \uc2dc\ud000\uc2a4 \ub9ac\uc2a4\ud2b8 \uc870\ud68c\r\n```\r\n- create\r\nwh.sequence.create(project_idx,episode_idx,sequence_name,description=\"\")\r\n #\uc2dc\ud000\uc2a4 \uc0dd\uc131\r\n\r\n## 8. shot\r\n- list\r\n```python\r\nwh2api.shot.list(project_idx,episode_idx,sequence_idx)\r\n #\uc2dc\ud000\uc2a4 \ub0b4\ubd80 \uc0f7 \ub9ac\uc2a4\ud2b8 \uc870\ud68c\r\n```\r\n\r\n- read\r\n```python\r\nwh2api.shot.read(shot_idx)\r\n #\ud2b9\uc815 \uc0f7\uc758 \uc138\ubd80\ub0b4\uc6a9 \uc870\ud68c\r\n```\r\n\r\n- create\r\n```python\r\nwh2api.shot.create(project_idx,episode_idx,sequence_idx,shot_name,description=\"\",status_idx=\"1\")\r\n #\uc0f7 \uc0dd\uc131\r\n #status_idx \ube44\uc5b4\uc788\uc744\ub54c \uae30\ubcf8\uac12 1\ubc88\r\n```\r\n\r\n- thumbnail_update\r\n```python\r\nwh2api.shot.thumbnail_update(project_idx,shot_idx,thumbnail_path)\r\n #\ud2b9\uc815\uc0f7\uc758 \uc378\ub124\uc77c \uc5c5\ub85c\ub4dc\r\n #Thubmnail_path \uc785\ub825\uc2dc \uc708\ub3c4\uc6b0\ub294 'r'\uc744 \ubd99\ud600\uc11c \uc5c5\ub85c\ub4dc \ud574\uc57c \uc624\ub958 \uc5c6\uc74c\r\n #ex) r'H:\\c2mosnter\\test.jpg'\r\n #\uc9c0\uc6d0 \ud3ec\ub9f7 *.jpg, *.png\r\n```\r\n\r\n- overview\r\n```python\r\nwh2api.shot.overview(project_idx,episode_idx=\"\")\r\n #overview\ud398\uc774\uc9c0 \uc870\ud68c\r\n #episode\uac00 \ube44\uc5b4\uc788\ub294\uacbd\uc6b0 \ud504\ub85c\uc81d\ud2b8 \uc804\uccb4\uc870\ud68c\r\n```\r\n\r\n- relation\r\n```python\r\nwh2api.shot.relation(project_idx,episode_idx)\r\n #\uc0f7\uc5d0 \uc5f0\uad00\ub41c \uc5d0\uc14b\uc758 \ubaa9\ub85d \uc870\ud68c\r\n #\uc6dc\ud640\uc758 Relation\ud398\uc774\uc9c0 \uc5f0\ub3d9\r\n```\r\n\r\n## 9. shot_Task\r\n- list\r\n```python\r\nwh2api.shot_task.list(project_idx,shot_idx)\r\n #\uc0f7 \ub0b4\ubd80\uc758 Task\uc870\ud68c\r\n```\r\n\r\n- create\r\n```python\r\nwh2api.shot_task.create(project_idx,shot_idx,tasktype_name)\r\n #\uc0f7\ub0b4\ubd80\uc5d0 Task \uc0dd\uc131\r\n #\uc911\ubcf5 \ub420\uacbd\uc6b0 \uc5d0\ub7ec \ubc1c\uc0dd\r\n```\r\n\r\n- bulk_create\r\n```python\r\nwh2api.shot_task.bulk_create(project_idx,shot_idx=[],tasktype_name=[])\r\n#shot_idx\uc640 tasktype_name\uc744 \ub611\uac19\uc740 \uc218\ub97c \ubc30\uc5f4\ub85c \ubcf4\ub0b4\uc57c\ud568\r\n#ex)\r\nshot_idx = [1,1,1,1,2,2,2,2]\r\ntasktype = ['comp','animation','fx','final','comp','animation','fx','final']\r\n#\uc778\ub371\uc2a4\uac00 1,2\ubc88\uc778 \uc0f7\uc5d0 'comp','animation','fx','final' 4\uac1c\uc758 \ud14c\uc2a4\ud06c\ub97c \uac01\uac01 \ub4f1\ub85d\r\n\r\n```\r\n\r\n- status_change\r\n```python\r\nwh2api.shot_task.status_change(project_idx,task_idx,status_idx)\r\n #\ud2b9\uc815 Task\uc758 Task Staus\ub97c \ubcc0\uacbd\r\n```\r\n\r\n- start\r\n```python\r\nwh2api.shot_task.start(project_idx,task_idx)\r\n #Task Start(MyTask>Todo)\r\n```\r\n\r\n- stop\r\n```python\r\nwh2api.shot_task.stop(project_idx,task_idx)\r\n #Task Stop(MyTask>Todo)\r\n```\r\n\r\n## 10. category\r\n- list\r\n```python\r\nwh2api.category.list(project_idx)\r\n #\ud504\ub85c\uc81d\ud2b8 \ub0b4\ubd80\uc5d0 Asset\uc758 Category\uc870\ud68c\r\n```\r\n\r\n- create\r\n```python\r\nwh2api.category.create(project_idx,category_name,description=\"\")\r\n #Category\uc0dd\uc131\r\n```\r\n\r\n## 11. Asset\r\n- list\r\n```python\r\nwh2api.asset.list(project_idx,category_idx)\r\n #\ud2b9\uc815 Category\uc758 Asset \uc870\ud68c\r\n```\r\n- read\r\n```python\r\nwh2api.asset.read(asset_idx)\r\n #\ud2b9\uc815 \uc5d0\uc14b\uc758 \uc138\ubd80\ub0b4\uc6a9 \uc870\ud68c\r\n```\r\n- create\r\n```python\r\nwh2api.asset.create(project_idx,category_idx,asset_name,description=\"\",status_idx=\"1\")\r\n #Asset\uc0dd\uc131\r\n```\r\n\r\n- thumbnail_update\r\n```python\r\nwh2api.asset.thumbnail_update(project_idx,asset_idx,thumbnail_path)\r\n #\ud2b9\uc815 Asset\uc758 \uc378\ub124\uc77c \uc5c5\ub85c\ub4dc\r\n #Thubmnail_path \uc785\ub825\uc2dc \uc708\ub3c4\uc6b0\ub294 'r'\uc744 \ubd99\ud600\uc11c \uc5c5\ub85c\ub4dc \ud574\uc57c \uc624\ub958 \uc5c6\uc74c\r\n #ex) r'H:\\c2mosnter\\test.jpg'\r\n #\uc9c0\uc6d0 \ud3ec\ub9f7 *.jpg, *.png\r\n```\r\n\r\n- overview\r\n```python\r\nwh2api.asset.overview(project_idx,category_idx=\"\")\r\n #Asset Overview\uc870\ud68c\r\n```\r\n\r\n## 12. asset_Task\r\n- list\r\n```python\r\nwh2api.asset_task.list(project_idx,asset_idx)\r\n #\uc5d0\uc14b \ub0b4\ubd80\uc758 Task\uc870\ud68c\r\n```\r\n\r\n- create\r\n```python\r\nwh2api.asset_task.create(project_idx,asset_idx,tasktype_name)\r\n #\uc5d0\uc14b\ub0b4\ubd80\uc5d0 Task \uc0dd\uc131\r\n #\uc911\ubcf5 \ub420\uacbd\uc6b0 \uc5d0\ub7ec \ubc1c\uc0dd\r\n```\r\n- bulk_create\r\n```python\r\nwh2api.asset_task.bulk_create(project_idx,asset_idx=[],tasktype_name=[])\r\n#asset_idx\uc640 tasktype_name\uc744 \ub611\uac19\uc740 \uc218\ub97c \ubc30\uc5f4\ub85c \ubcf4\ub0b4\uc57c\ud568\r\n#ex)\r\ntasktype = ['concept','modeling','texture','lodev','concept','modeling','texture','lodev']\r\n#\uc778\ub371\uc2a4\uac00 1,2\ubc88\uc778 \uc5d0\uc14b\uc5d0 'concept','modeling','texture','lodev' 4\uac1c\uc758 \ud14c\uc2a4\ud06c\ub97c \uac01\uac01 \ub4f1\ub85d\r\n\r\n```\r\n- status_change\r\n```python\r\nwh2api.asset_task.status_change(project_idx,task_idx,status_idx)\r\n #\ud2b9\uc815 Task\uc758 Task Staus\ub97c \ubcc0\uacbd\r\n```\r\n\r\n- start\r\n```python\r\nwh2api.asset_task.start(project_idx,task_idx)\r\n #Task Start(MyTask>Todo)\r\n```\r\n\r\n- stop\r\n```python\r\nwh2api.asset_task.stop(project_idx,task_idx)\r\n #Task Stop(MyTask>Todo)\r\n```\r\n\r\n## 13. version\r\n- key\r\n```python\r\nwh2api.version.key(task_idx, which='shot or asset')\r\n #\ud2b9\uc815 Task\uc758 Key\ub97c \uc5bb\uc5b4\ub0b4\ub294 \ud568\uc218\r\n #Version_key\uc0dd\uc131\r\n```\r\n\r\n- key_read\r\n```python\r\nwh2api.version.key_read(version_key)\r\n #Version_key \uc815\ubcf4 \uc870\ud68c\r\n```\r\n\r\n- create\r\n```python\r\nwh2api.version.create(task_idx='', \r\n which='shot or asset',\r\n version_name='',\r\n task_status_idx='',\r\n version_status_idx='',\r\n reviewer_user_idx='',\r\n hour_spent='',\r\n version_path=[],\r\n metadata= [],\r\n description=\"\",\r\n cc_user_idx='',\r\n thumbnail_path = \"\"):\r\n\r\n\r\n # \uc708\ub3c4\uc6b0\uc758\uacbd\uc6b0 version Path\uc785\ub825\uc2dc 'r'\uc744 \uc785\ub825\r\n #ex) version_path = r'c:\\\\c2monster\\test.mov'\r\n # \uc9c0\uc6d0 *.mp4\r\n # \uc11c\ubc84\uc5d0\uc11c \ucee8\ubc84\ud305 \ud558\ub294 \uacfc\uc815\uc774 \uc5c6\uae30\ub54c\ubb38\uc5d0 \uc5c5\ub85c\ub4dc\ud558\ub294 \ubc84\uc804\uc758 \uc6a9\ub7c9\uc774 \ud074 \uacbd\uc6b0 \ud50c\ub808\uc774\uac00 \uc548\ub420 \uc218 \uc788\uc74c\r\n\r\n\r\n #\ucc38\uc870 \uc778\uc6d0 cc_user_idx=[1,2,3]\r\n\r\n # #version_path\uc640 metadata\uc758 \ub9ac\uc2a4\ud2b8\uc758 \uac1c\uc218\uc640 \uc21c\uc11c\ub294 \uac19\uc544\uc57c \ud569\ub2c8\ub2e4.\r\n # version_path = ['a','b','c'] \r\n # metadata = ['a_meta','b_meta','c_meta']\r\n\r\n```\r\n\r\n## 14. user\r\n- list\r\n```python\r\nwh2api.user.list()\r\n #\uc6dc\ud640\uc5d0 \uac00\uc785\ub418\uc788\ub294 \uc720\uc800 \uc870\ud68c\r\n```\r\n## 15. team\r\n- list\r\n```python\r\nwh2api.team.list()\r\n #Team\uc758 \ubaa9\ub85d \uc870\ud68c\r\n```\r\n\r\n- user_list\r\n```python\r\nwh2api.team.user_list(team_idx)\r\n #\uc120\ud0dd\ud55c Team\uc548\uc5d0 \uc788\ub294 User\uc870\ud68c\r\n```\r\n## 16. mytask\r\n- todo\r\n```python\r\nwh2api.mytask.todo(observed_user_idx=\"\")\r\n #observed_user_idx\uac00 \uacf5\ubc31\uc778\uacbd\uc6b0 \ubcf8\uc778\r\n #observed_user_idx\uc5d0 User_idx\ub97c \ucd94\uac00\ud560 \uacbd\uc6b0 \ud574\ub2f9 \uc778\uc6d0\uc758 MyTask\uc870\ud68c\r\n```\r\n\r\n- inprogress\r\n```python\r\nwh2api.mytask.inprogress(last=\"\")\r\n #last\uc785\ub825\uc2dc \ub9c8\uc9c0\ub9c9 \ubc84\uc804\ub9cc \uc870\ud68c\r\n```\r\n\r\n- done\r\n```python\r\nwh2api.mytask.done()\r\n #\ub05d\ub09cTask\uc870\ud68c\r\n```\r\n\r\n- cc\r\n```python\r\nwh2api.mytask.cc(last=\"\")\r\n #last\uc785\ub825\uc2dc \ub9c8\uc9c0\ub9c9 \ubc84\uc804\ub9cc \uc870\ud68c\r\n\r\n```\r\n\r\n## 17. org\r\n- read\r\n```python\r\nwh2api.org.read(org_id='std')\r\n #std\uac00 \uae30\ubcf8\uac12\uc784\r\n #System information \uc815\ubcf4 \uc870\ud68c \uac00\ub2a5\r\n```\r\n\r\n\r\n\r\n## 18. publish\r\n- key\r\n```python\r\nwh2api.publish.key(task_idx, which='shot or asset')\r\n#which\ub294 'shot' \ub610\ub294 'asset'\uc774\ub77c\uace0 \uc785\ub825 \ud569\ub2c8\ub2e4.\r\n```\r\n- key_read\r\n```python\r\nwh2api.publish.key_read(publish_key)\r\n#\ud37c\ube14\ub9ac\uc2dc\ud0a4\uc758 \uc0c1\uc138\uc815\ubcf4 \uc870\ud68c\r\n#\ud37c\ube14\ub9ac\uc2dc \uc0dd\uc131\uc2dc \uc0ac\uc6a9\r\n\r\n```\r\n- create\r\n```python\r\nwh2api.publish.create(task_idx='',\r\n which='shot or asset',\r\n version_idx='',\r\n publish_name ='',\r\n task_status_idx='',\r\n version_status_idx='',\r\n publish_path=[],\r\n description='',\r\n tag=''):\r\n#\ud544\uc218 \uc785\ub825\uac12 : Task_idx,which,version_idx,Task_Status_idx,Version_status_idx,Publish_path\r\n#publish_Path\ub294 \uc720\ud6a8\uc131 \uac81\uc0ac\ub97c \uc9c4\ud589, \ud574\ub2f9\uacbd\ub85c\uc5d0 \ud30c\uc77c\uc774\ub098 \ud3f4\ub354\uac00 \uc5c6\ub2e4\uba74 \ub9ac\uc2a4\ud2b8\uc5d0\uc11c \uc81c\uc678\ud55c \ud6c4 \uc9c4\ud589\ud569\ub2c8\ub2e4.\r\n# publish_path\uc758 \uc720\ud6a8\uc131 \uac80\uc0ac \uc911, \ud55c\uac1c\uc758 \ud30c\uc77c \ub610\ub294 \ud3f4\ub354\uac00 \uc5c6\ub2e4\uba74 \ud504\ub85c\uc138\uc2a4\ub294 \uc885\ub8cc \ub429\ub2c8\ub2e4.\r\n```\r\n\r\n\r\n## 19. Track\r\nWormhole\uc758 Track\ud398\uc774\uc9c0\uc5d0 \ub098\uc624\ub294 \ud56d\ubaa9\uc744 \uc870\ud68c\r\n\r\n- version\r\n```python\r\nwh2api.track.version(projectidx=int\r\n from_date=\"yy-mm-dd\",\r\n to_date=\"yy-mm-dd\",\r\n last=\"\" \r\n)\r\n '''\r\n :param project_idx:\ud504\ub85c\uc81d\ud2b8 index\r\n :param from_date: \uc2dc\uc791\uc77c\uc815\r\n :param to_date: \uc885\ub8cc\uc77c\uc815\r\n :param last: \ub9c8\uc9c0\ub9c9 \ubc84\uc804\ub9cc \ud655\uc778\ud558\uace0 \uc2f6\uc744\ub550 \"last\"\uc785\ub825\r\n :return:\r\n '''\r\n\r\n```\r\n\r\n- shot_task\r\n```python\r\nwh2api.track.shot_task(project_idx,episode_idx,sequence_idx=\"all\",page=1)\r\n '''\r\n :param project_idx:\ud504\ub85c\uc81d\ud2b8 \uc778\ub371\uc2a4\r\n :param episode_idx: \uc5d0\ud53c\uc18c\ub4dc \uc778\ub371\uc2a4\r\n :param sequence_idx: \ud544\uc694\uc2dc \uc778\ub371\uc2a4 \uc785\ub825\r\n :param page: \uae30\ubcf8\uac12 1\ud398\uc774\uc9c0 \r\n {'next_data': False, 'page': 2 }\uc73c\ub85c \ub2e4\uc74c\ud398\uc774\uc9c0\uc5ec\ubd80\uac00 \ud45c\uc2dc\ub428\r\n :return:\r\n '''\r\n```\r\n\r\n- asset_task\r\n\r\n```python\r\nwh2api.track.asset_task(project_idx,category_idx='all',page=1)\r\n '''\r\n :param project_idx: \ud504\ub85c\uc81d\ud2b8 \uc778\ub371\uc2a4\r\n :param category_idx: \ud544\uc694\uc2dc \uce74\ud14c\uace0\ub9ac \uc778\ub371\uc2a4 \uc785\ub825\r\n :param page: \uae30\ubcf8\uac121\ud398\uc774\uc9c0\r\n {'next_data': False, 'page': 2 }\uc73c\ub85c \ub2e4\uc74c\ud398\uc774\uc9c0\uc5ec\ubd80\uac00 \ud45c\uc2dc\ub428\r\n :return:\r\n '''\r\n\r\n```\r\n\r\n\r\n---\r\n## c2monster \r\nc2monster\ub294 \uc601\ud654 \ub4dc\ub77c\ub9c8 \uc81c\uc791\uc744 \uc704\ud55c \uc18c\ud504\ud2b8\uc6e8\uc5b4\ub97c \uac1c\ubc1c\ud558\ub294 \ud68c\uc0ac \uc785\ub2c8\ub2e4.\r\n### wormhole\r\n\r\nhttp://wormholepipeline.com\r\n\r\n\r\nE-mail : wfjo852@c2monster.com , contact@c2monster.com\r\n\r\n\r\n",
"bugtrack_url": null,
"license": null,
"summary": "wormhole API for Python",
"version": "1.0.8",
"project_urls": {
"Homepage": "https://wormholepipeline.com"
},
"split_keywords": [
"wormhole",
" sdk",
" wh_api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "74161ecf5b1914b6d067c0ef6ed210bfb3f7a6d0165e7cc88cc787b00d2f63c6",
"md5": "967f05b4eef7673f9dc4e9fab2314a27",
"sha256": "1e9fe1aa4c9ac46f1e329ba0ba1c5992c893defad9ccb528722662142e0ac7f8"
},
"downloads": -1,
"filename": "wh2api-1.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "967f05b4eef7673f9dc4e9fab2314a27",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=2",
"size": 25099,
"upload_time": "2024-08-21T05:02:33",
"upload_time_iso_8601": "2024-08-21T05:02:33.456306Z",
"url": "https://files.pythonhosted.org/packages/74/16/1ecf5b1914b6d067c0ef6ed210bfb3f7a6d0165e7cc88cc787b00d2f63c6/wh2api-1.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-21 05:02:33",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "wh2api"
}