#14

CloudSim — Cloud Server Simulator

March 21, 2026

PythonPyPICLIAmazon PollyReact

Python package on PyPI that simulates cloud servers (AWS/Google Cloud style) via terminal commands — SSH, networking, server management. Also built CloudSim Academy tutorial site with AI voice demos.

What is it?

A Python package on PyPI that simulates an AWS/GCP-style cloud environment in your terminal — spin up virtual servers, SSH into them, configure networking, run cloud commands locally for free. Also includes CloudSim Academy, a tutorial site with AI-generated voice explanations via Amazon Polly.

How it works

pip install cloudsim → CLI entry points from pyproject.toml → commands like cloudsim server create and cloudsim ssh connect → virtual server state persisted in a local JSON file → a REPL simulates an SSH session with filesystem commands. The Academy site converts tutorial text to speech with Amazon Polly, pre-generated at build time and stored in S3.

Under the hood: PyPI packaging

Publishing to PyPI: source in src/cloudsim/, pyproject.toml defines package metadata, dependencies, and CLI entry points. Entry point: cloudsim = 'cloudsim.cli:main'. When pip installs the package, it creates a cloudsim binary in the user's PATH. Click handles subcommands, flags, and help text.

Version uploaded with twine upload dist/*. The wheel (cloudsim-*.whl) is the compiled package; the sdist (cloudsim-*.tar.gz) is the source archive. PyPI hosts both.

Amazon Polly for the Academy site

Amazon Polly's neural TTS converts tutorial text to MP3. Neural voices (Matthew, Joanna, etc.) use a deep learning model trained on real human speech — significantly more natural than older concatenative TTS.

For the Academy site: all tutorial audio is pre-generated at build time and stored in S3 as MP3 files. The React site plays them via a standard <audio> element. Pre-generation avoids calling Polly on every page load and eliminates per-visitor API costs. The tradeoff: updating tutorial text requires regenerating the audio files.

Simulating stateful systems

Virtual server state — running/stopped status, IP addresses, attached storage — lives in a local JSON file. The CLI reads and writes this file on every command, maintaining the illusion of a real cloud environment. This pattern (local JSON as a simple state store) is also how tools like Terraform track infrastructure state in terraform.tfstate.

Key takeaways

  • PyPI packaging: pyproject.toml, entry points, twine upload, wheel vs sdist
  • Click library: subcommands, options, help text, REPL-style interfaces
  • Amazon Polly neural TTS: voice selection, pre-generation to S3, audio serving
  • Local JSON as a state store for CLI tools — same pattern as Terraform state
  • S3 pre-signed URLs and CloudFront for serving static audio assets
← all projects