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.0.tar.gz (23.7 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.0-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: faceware_pyportal-1.1.0.tar.gz
  • Upload date:
  • Size: 23.7 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.0.tar.gz
Algorithm Hash digest
SHA256 c9339ccc2feda159e9cc1b87a40dc3fd2ea9ae96f98534095144dff2367dfc54
MD5 fc32bceb6a23dc67596a6b4e7bf10ed8
BLAKE2b-256 ce0f74ea28b1604623b8b93b1a28fe3eeb32cdc289ee61e9a74a7828d04f57b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: faceware_pyportal-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76a80d51074604fa2ba572e383bf5522f83bf441ed8f62b009c2da77b992fe7b
MD5 bcc7d260120f3075a3cb358e1dcca178
BLAKE2b-256 a81f4ff13d5abb2b2e37adf7047aa8daa0a2f82bcedad4684ac216c722f6b7fe

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