A Python library for rendering dynamic code videos based on Manim
CodeVideoRenderer is a Python animation library specifically designed for creating dynamic code demonstration videos. It transforms static code into lively animations that simulate real programming processes.
✨ Core Features
- 🎬 Professional animation effects: Based on Manim engine, providing high-quality animation rendering
- 📝 Multi-language support: Syntax highlighting for various programming languages including Python, JavaScript, Java, and more
- ⚙️ Highly customizable: Adjustable typing speed, line spacing, camera behavior, and other parameters
- 🎨 Rich styling: Multiple code highlighting styles (such as github-dark, monokai, etc.)
- 🔧 Dual renderers: Support for both Cairo and OpenGL rendering backends
🚀 Quick Installation
pip install codevideorenderer
💡 Quick Start
from CodeVideoRenderer import CameraFollowCursorCV
code = '''
def fibonacci(n):
"""Calculate the nth Fibonacci number"""
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
# Example usage
result = fibonacci(10)
print(f"Fibonacci(10) = {result}")
'''
video = CameraFollowCursorCV(
code=('string', code),
language='python',
formatter_style='github-dark',
video_name='FibonacciExample'
)
video.render()
📋 Main Features
Code Animation
- Simulate typing process: Display code character by character, line by line
- Intelligent cursor tracking: Camera automatically follows cursor movement
- Syntax highlighting support: Integrates Pygments syntax highlighting engine
Camera System
- Auto-scaling: Automatically adjust camera zoom based on code content
- Smooth movement: Camera smoothly follows cursor movement
- Focus management: Intelligently recognizes code structure to ensure important parts remain visible
🎯 Use Cases
- Educational demonstrations: Create code explanation videos for programming courses
- Technical presentations: Make code demonstration segments for conference talks
- Algorithm visualization: Dynamically showcase algorithm implementation processes and logic
- Code review: Visualize code modifications and refactoring processes
📚 Documentation
Full documentation and examples available at https://codevideorenderer.readthedocs.io/.
🤝 Contact Us
Found any issues? Please send them to my email. We'll fix them as soon as possible.
Metadata
Release files for codevideorenderer 1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| codevideorenderer-1.2.3.tar.gz | 7.3 MB | Without provenance | Details for codevideorenderer-1.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codevideorenderer-1.2.3-py3-none-any.whl | Python 3 | none | any | Details for codevideorenderer-1.2.3-py3-none-any.whl |
Total release size: 14.6 MB
Release files / codevideorenderer-1.2.3.tar.gz
| Download URL | codevideorenderer-1.2.3.tar.gz |
|---|---|
| Size | 7.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a0eabefe33143e7a6ec2ddcd2c0ec4e2ce782e41d3762ff46e43d96ac4872a2
|
|
BLAKE2b-256 checksum How to use checksums |
6ab979d27cda78c60a54b38d24aa251e0801b29c62ef9617f70e5ea29e344044
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Release files / codevideorenderer-1.2.3-py3-none-any.whl
| Download URL | codevideorenderer-1.2.3-py3-none-any.whl |
|---|---|
| Size | 7.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a192806bdbd46869a9245eb7d57ef795ae434ea38a6c58d883c37928b1d6aa99
|
|
BLAKE2b-256 checksum How to use checksums |
65fd94a8d902a843b5f81d1f4b506ee1d89a130d5a95074cf82b1c982ddc5c12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Security for codevideorenderer 1.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.