Skip to main content

Allow programmatic access to Faceware Cloud Portal via Python library

Project description

This is a python library for submitting new jobs & downloading results of processed jobs from Faceware Portal.

Installation and Prerequisites

This library requires

  • Faceware Portal Account and Access Token
  • python >= 3.8
  pip install faceware-pyportal

Usage

You can find general usage documentation at https://docs.facewaretech.com/.

import logging
from faceware.pyportal.job import TrackingModel
from faceware.pyportal.job_result import JobStatus
from faceware.pyportal import PortalClient

# set your desired logging level
logging.basicConfig(level=logging.INFO)

client = PortalClient(
    access_token="{YOUR-ACCESS-TOKEN}",
    organization_id="{YOUR-ORGANIZATION-ID}"
    parent_logger=logging.getLogger('pyportal') # Optional
)

project = await client.get_project("{PROJECT-ID}")

job = await project.submit_job(
    actor_name="Sample"
    tracking_model=TrackingModel.STATIC_CAM,
    video_file_path="samples/Video.mp4",
    calibration_image_file_path="samples/Calibration.jpg"
)

while await job.get_status() not in [JobStatus.COMPLETED, JobStatus.FAILED]:
    print("waiting for job status to change")

if job.status is JobStatus.COMPLETED:
    await job.download_retargeting_file('samples/tracked.fwr')

Support

For support, email support@facewaretech.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faceware_pyportal-1.1.1.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

faceware_pyportal-1.1.1-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

Details for the file faceware_pyportal-1.1.1.tar.gz.

File metadata

  • Download URL: faceware_pyportal-1.1.1.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.20 Linux/6.1.79

File hashes

Hashes for faceware_pyportal-1.1.1.tar.gz
Algorithm Hash digest
SHA256 63c39b07e2a8c21bd1825d82fbdc4890fdcae16207a36b31a3ac002d4bb6af58
MD5 cc59180ed90f77514957134892a94190
BLAKE2b-256 c04c3951fc52e01379ad6fbdbdf8d0d67a4c09920c7995d2c13479f5d6b548dd

See more details on using hashes here.

File details

Details for the file faceware_pyportal-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: faceware_pyportal-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 30.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.20 Linux/6.1.79

File hashes

Hashes for faceware_pyportal-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e567e875590927ae9d59da0bc391e2a526d54028403d2d81878a11503585969
MD5 89f5974f0c43f37552596c67b5845962
BLAKE2b-256 f995f225168e77fae5ddc2740b3651c0c1cfa9a88a162ea5e3c29f1ac2196d6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page