Skip to main content

A Python client for the Video Jungle API

Project description

Video Jungle API Client

This is a Python client for the Video Jungle API.

Video Jungle is a generative video creator. It allows you to generate custom videos via dynamic variables.

Let's say you want to generate daily astrology readings according to your user's astrological sign, lucky number, and lucky color.

Video Jungle allows you to pass in a value for each, and generate a unique video for that specific user.

See below for an example of how to build a generative video workflow using the API.

Installation

You can install the Video Jungle API client using pip:

pip install videojungle

Usage

Here's a simple example of how to use the Video Jungle API client for the Horoscope example:

from videojungle import ApiClient
import os

# Assumes you've set your API key as an environment variable
VJ_API_KEY = os.environ['VJ_API_KEY']

# Initialize API client
vj = ApiClient(token=VJ_API_KEY)

# Define your video generation task, along with variables to pass on generation
prompt = vj.prompts.generate(task="a horoscope reader who wants to leave the person excited about their future",
                            parameters=["zodiac sign", "lucky number", "lucky color"])


# Create a project to hold generated files, using our prompt we've generated
project = vj.projects.create(name="First Project", 
                             description="My first project", 
                             prompt_id=prompt["id"])

# Get a script for the generation process
script_id = project["script"]["id"]

# Generate a video from our created prompt with dynamic variables
video = project.generate(script_id=script_id, 
                             project_id=project["id"],
                             parameters={"zodiac sign": "Aries",
                                        "lucky number": "7",
                                        "lucky color": "green"})
print(video)

This example lives in the examples/ folder.

License

This project is licensed under the MIT License.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

videojungle-0.1.3.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

videojungle-0.1.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file videojungle-0.1.3.tar.gz.

File metadata

  • Download URL: videojungle-0.1.3.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for videojungle-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8a7b2b914fd4f8a5437f69a5309a474a94bc5c9ef209693a0c1920742096f022
MD5 f1a2e6307966b082188e472bf76c5550
BLAKE2b-256 6ed587c950cbd24fe27f84270a03def16c026d53cefae97a51a850bbde9f09db

See more details on using hashes here.

File details

Details for the file videojungle-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: videojungle-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for videojungle-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0f19752c9938c48afd1940d6403aa3967188b5296572d6b87bf6cfe37a5fcb23
MD5 74a883cc16b4c79181c845366e81d620
BLAKE2b-256 fdc0491b4a21444da0349229069fc8f38253f7d687c1cadd5d4377875c43d2fe

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