Skip to main content

Command-line interface to interact with Didimo API

Project description

Didimo CLI

Didimo CLI is a command-line interface to our API.

$ didimo --help
Usage: didimo [OPTIONS] COMMAND [ARGS]...

  Create, list and download didimos

Options:
  -c, --config TEXT  Use this configuration instead of the default one.
  -h, --help         Show this message and exit.

Commands:
  account                           Get account information
  clear-cache                       Clears cache and exit
  config                            Get or set configuration
  download                          Download a didimo
  execute                           Execute on-demand features on didimos
  init                              Initializes configuration
  list                              List didimos
  list-demo-didimos                 List demo didimos
  vertexdeform                      Deform a model
  new                               Create a didimo
  status                            Get status of didimos
  version                           Print version and exit
  version-api                       Print api dgp version and exit
  version-cli-compatibility-rules   Print cli compatibility rules and exit

These are the features that are implemented at the moment:

  • Create didimos, supporting different input types, package types, versions and features
  • List didimos
  • Download didimos, supporting different package types
  • Execute on-demand features on didimos
  • Supports multiple profiles as an easy way to change between environments or even accounts

Quickstart

1. Install

The CLI is written in Python 3 and is distributed as package on PyPI and can be installed with pip.

pip3 install didimo-cli

If you already have a previous version installed, you should execute:

pip3 install didimo-cli --upgrade
2. Configure with your API Key

Create a new configuration and input your API Key. If you do not have an API Key, please refer to the Getting an API Key section.

didimo init <configuration name>

After setting up the CLI, you can check your account with:

didimo account
3. Create a didimo

Now that the CLI is configured, let's create a didimo based on a photo.

didimo new photo <path to the photo>

The CLI waits for the didimo to be created and downloads the result in a zip file.

Generating a didimo may include several options, as described on our developer portal.

Didimo CLI currently accepts the following features (-f):

  • oculus_lipsync
  • simple_poses
  • arkit
  • aws_polly

The CLI accepts following output formats (-p):

  • glTF
  • FBX

In addition to those, it also accepts the definition of other parameters:

  • the maximum texture dimension (-m)
  • the avatar structure, which controls the output as a full-body or a head-only didimo (--avatar_structure)
  • the garments that must be applied to a full-body didimo (--garment)
  • the selected body gender for the didimo (--gender)

Input type accepts:

  • photo
  • rgbd (currently only tested with Apple depth images)

Please check all the options and accepted values using the command below.

didimo new --help
4. Generate a package with hairs deformed for the newly generated didimo

Now that we have a didimo package, we may generate a package with Didimo's default set of hairs.

didimo execute hairsdeform <path to the didimo package>
5. Explore

You can list your didimos with:

didimo list

To list the demo didimos use:

didimo list-demo-didimos

For more help, check the documentation on each command with the --help option.

4. Batch processing

The Didimo CLI supports batch processing of photo inputs automatically. Simply provide a path to a directory containing the input files and all files with be processed. Alternatively, you can point to a zip file containing the input files.

didimo new photo /path_to_batch_input_files

Currently, only photo input is supported by batch processing.

Getting an API Key

Go to the Customer Portal and register for an account.

Make sure that you tick the "Developer Account" checkbox in order to unlock the "Developers" section on the sidebar.

After that, go to "Developers" > "Applications" and create an Application and an API Key. Copy the information and paste on a text editor in order to see every detail of your credentials

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

didimo-cli-2.4.2.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

didimo_cli-2.4.2-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file didimo-cli-2.4.2.tar.gz.

File metadata

  • Download URL: didimo-cli-2.4.2.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for didimo-cli-2.4.2.tar.gz
Algorithm Hash digest
SHA256 20dca173574a7d6a6aa3cd8e7198088c7fa6b6c296cf052f31814e093ed39d6e
MD5 b743a28db425c6b7b3280fa3734e6d6a
BLAKE2b-256 1f60b49dcf931640034364d72570adc7cb8316dc59c9852c0a81549b5e8d47aa

See more details on using hashes here.

Provenance

File details

Details for the file didimo_cli-2.4.2-py3-none-any.whl.

File metadata

  • Download URL: didimo_cli-2.4.2-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for didimo_cli-2.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 78bc49454830e7194af6bd38d824f674663fca85e08e0c7cdce97a5e62232cc8
MD5 e3ca86e085f8b17a2e28576483638f76
BLAKE2b-256 27e3d772b207148ffbf7d06722785bbb30b680a70acff281646abb05beefc583

See more details on using hashes here.

Provenance

Supported by

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