Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

cs-manim

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cs-manim

Video animations with Manim to explain technical concepts related to computer science

pipPyPI
Version
0.1.4
Maintainers
1

CS-Manim

Video animations with Manim to explain technical concepts related to computer science.

Description

CS-Manim is a Python library that provides reusable objects and styles to create educational animations with Manim, specially designed to explain computer science and programming concepts.

Installation

pip install cs-manim

Usage

from manim import *
from cs_manim import Computer, Server, MobilePhone
from cs_manim import CLIENT_COLOR, SERVER_COLOR, FONT_NAME

class MyScene(Scene):
    def construct(self):
        # Create objects for your animations
        computer = Computer("PC Client")
        server = Server("API Server")
        mobile = MobilePhone("Smartphone")

        # Position and animate
        computer.shift(LEFT * 3)
        server.shift(RIGHT * 3)

        self.play(Create(computer))
        self.play(Create(server))
        self.play(Create(api_call))

Features

  • Reusable objects: Computers, servers, mobile phones, HTTP calls
  • Consistent styles: Predefined colors and fonts
  • Manim compatible: Uses Manim 0.19.0+
  • Easy to use: Simple import and intuitive API

Available Objects

PortableComputer

computer = PortableComputer(name="My PC", color=CLIENT_COLOR)

Server

server = Server(name="My Server", color=SERVER_COLOR)

MobilePhone

mobile = MobilePhone(name="My Phone", color=PURPLE)
android = AndroidLogo(color=GREEN)
apple = AppleLogo(color=WHITE)

Database

database = Database(name="My Database", color=BLUE)

Cloud

cloud = Cloud(name="My Cloud", color=GRAY)

Monitor

monitor = Monitor(name="My Monitor", color=BLACK)

TestTube

test_tube = TestTube(color=RED)

Development

Environment Setup

# Clone the repository
git clone https://github.com/PierreOlivierBrillant/cs-manim.git
cd cs-manim

# Create a virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/Mac
# or .venv\Scripts\activate  # Windows

# Install in development mode
pip install -e .[dev]

Tests

# Run tests
pytest

# With coverage
pytest --cov=cs_manim

Formatting and linting

# Format the code
black cs_manim tests examples

# Check style
ruff cs_manim tests examples

# Check types
mypy cs_manim

Package building

# Build the package
python -m build

# Check the package
twine check dist/*

Publishing

Prerequisites for publishing

  • PyPI account (https://pypi.org/)
  • PyPI API token configured
  • All checks passed

Publishing steps

  • Update version in pyproject.toml
  • Update CHANGELOG.md
  • Create git tag: git tag v0.1.0
  • Push the tag: git push origin v0.1.0
  • Create release on GitHub

Publishing to PyPI happens automatically via GitHub Actions when creating a release.

Manual publishing

# Build the package
python -m build

# Publish to PyPI
twine upload dist/*

Examples

See the examples/ folder for usage examples.

Contributing

See CONTRIBUTING.md for contribution instructions.

Dependencies

  • Python >= 3.10
  • Manim >= 0.19.0
  • Pillow >= 11.0.0
  • NumPy >= 1.24.0
  • SciPy >= 1.10.0

License

MIT License - see the LICENSE file for details.

Author

Pierre-Olivier Brillant - pierreolivierbrillant@gmail.com

Keywords

manim

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts