Skip to main content

Create animations from text using Manim

Project description

Animo

Animo

🎨 Create animations from text using Manim under the hood ✨


🚀 What is Animo?

Animo is a Python package that allows you to create animations from text using Manim under the hood. It's part of the Generative Manim suite of tools that enables anyone to create wonderful animations from text.

Visit animo.video to learn more about the platform and see examples of what you can create.

📦 Installation

pip install animo

🔑 API Key

To use Animo, you'll need an API key:

  1. Visit https://animo.video/account/developer
  2. Click on "Generate secret key"
  3. Copy your API key and use it in your code

You'll also find quickstart guides and additional documentation on the developer page to help you get started.

🔧 Usage

Basic Usage

from animo import Animo

client = Animo(api_key="your_api_key")

# Create a single video
code = """
class GenScene(Scene):
    def construct(self):
        circle = Circle(color=BLUE)
        self.play(Create(circle))
"""

response = client.videos.create(
    code=code,
    file_class="GenScene",
    aspect_ratio="16:9"
)

# Response format
response = {
    "message": "Video generation completed",
    "video_url": "https://animovideo.blob.core.windows.net/animocontainer/video-xxx.mp4"
}

# Export multiple scenes
scenes = [
    {"videoUrl": "https://animovideo.blob.core.windows.net/animocontainer/scene1.mp4"},
    {"videoUrl": "https://animovideo.blob.core.windows.net/animocontainer/scene2.mp4"}
]

export_response = client.videos.export(
    scenes=scenes,
    title_slug="my-animation"
)

Generating Videos from Text Prompts

from animo import Animo
import time
import sys

# Initialize client
client = Animo(api_key="your_api_key")

# Define your prompt
prompt = "Create a blue square"

print(f"🚀 Generating video for: '{prompt}'")

# Start generation
try:
    generation = client.videos.generate(prompt=prompt)
    request_id = generation.get("requestId")
    
    if not request_id:
        print("❌ No request ID received")
        sys.exit(1)
        
    print(f"✅ Generation started with ID: {request_id}")
    
    # Poll for status with a simple progress indicator
    print("⏳ Waiting for completion", end="")
    
    while True:
        status_data = client.videos.retrieve(request_id=request_id)
        status = status_data.get("status")
        
        # Update progress indicator
        sys.stdout.write(".")
        sys.stdout.flush()
        
        # Check for completion or error
        if status == "SUCCEEDED":
            video_url = status_data.get("videoUrl")
            print(f"\n\n🎬 Video ready! URL: {video_url}")
            
            # Print processing time if available
            if processing_time := status_data.get("processingTime"):
                print(f"⏱️  Processing time: {processing_time} seconds")
                
            break
            
        elif status == "FAILED":
            error = status_data.get("error") or "Unknown error"
            print(f"\n\n❌ Generation failed: {error}")
            break
            
        # Wait before next check
        time.sleep(3)
        
except Exception as e:
    print(f"\n\n❌ Error: {str(e)}")

🤝 Contributing

We welcome contributions to Animo! Here's how to get started:

Requirements

  • Python 3.9.6 or later
  • Poetry (recommended for dependency management)

Setup for Development

  1. Clone the repository
git clone https://github.com/marcelo-earth/generative-manim.git
cd generative-manim/animo
  1. Install dependencies
poetry install

Community

Join our Discord community to connect with other Animo users, share your creations, and get help.

📄 License

MIT License

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

animo-0.1.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

animo-0.1.4-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file animo-0.1.4.tar.gz.

File metadata

  • Download URL: animo-0.1.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.9.6 Darwin/24.0.0

File hashes

Hashes for animo-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a1e850d7a0572d0938eb48c3f6e26104a45d11d061d3c66cadeb7b6a17d4e7b9
MD5 5422e7f47c1751d2bf66103d6aac2a7d
BLAKE2b-256 b38e15fc4160b67bea0c341d0be695478f7c80ba064ec58a73bfaa885918c71b

See more details on using hashes here.

File details

Details for the file animo-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: animo-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.9.6 Darwin/24.0.0

File hashes

Hashes for animo-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1a7ff31923913f99276db2a0c1e19f8c217cf4e3148dc642cafb4c5dfe9f42de
MD5 463c43144c8a37fd01e41be02710b10f
BLAKE2b-256 73dacdded82ccc3adcab33d876146673b3ca660b9e3afe8e823e19e587c3f280

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