{"id":26522333,"url":"https://github.com/myugan/firecracker-python","last_synced_at":"2025-03-21T13:26:39.542Z","repository":{"id":283652133,"uuid":"952480904","full_name":"myugan/firecracker-python","owner":"myugan","description":"🐍  An SDK in Python for the Firecracker microVM API","archived":false,"fork":false,"pushed_at":"2025-03-21T10:53:13.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T11:31:03.706Z","etag":null,"topics":["firecracker","python","sdk","virtual-machine","virtualization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myugan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-21T10:52:27.000Z","updated_at":"2025-03-21T11:06:41.000Z","dependencies_parsed_at":"2025-03-21T11:43:19.327Z","dependency_job_id":null,"html_url":"https://github.com/myugan/firecracker-python","commit_stats":null,"previous_names":["myugan/firecracker-python"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myugan%2Ffirecracker-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myugan%2Ffirecracker-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myugan%2Ffirecracker-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myugan%2Ffirecracker-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myugan","download_url":"https://codeload.github.com/myugan/firecracker-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244805056,"owners_count":20513216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firecracker","python","sdk","virtual-machine","virtualization"],"created_at":"2025-03-21T13:26:39.102Z","updated_at":"2025-03-21T13:26:39.517Z","avatar_url":"https://github.com/myugan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# firecracker-python\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://opensource.org/license/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/myugan/firecracker-python\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/myugan/firecracker-python.svg?style=social\u0026label=Star\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/myugan/firecracker-python\"\u003e\u003cimg src=\"https://img.shields.io/github/forks/myugan/firecracker-python.svg?style=social\u0026label=Fork\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/myugan/firecracker-python\"\u003e\u003cimg src=\"https://img.shields.io/github/watchers/myugan/firecracker-python.svg?style=social\u0026label=Watch\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n![Firecracker](img/firecracker.png)\n\n**firecracker-python** is a simple Python library that makes it easy to manage Firecracker microVMs. It provides a simple way to create, configure, and manage microVMs.\n\nSome features are still being developed and will be added in the future. You can track these in the [TODO.md](TODO.md) file.\n\n[![asciicast](https://asciinema.org/a/nCD68S0KICqXt5206Eb3TA8FJ.svg)](https://asciinema.org/a/nCD68S0KICqXt5206Eb3TA8FJ)\n\n## Table of Contents\n\n- [How to Install](#how-to-install)\n- [Features](#features)\n- [Getting Started](#getting-started)\n- [Usage](#usage)\n- [License](#license)\n- [Contributing](#contributing)\n\n### How to Install\n\nTo install from PyPI, you need to have a personal access token with read access to the repository.\n\n```bash\npip3 install firecracker-python\n```\n\nOr install from source, by cloning the repository and installing the package using pip:\n\n```bash\ngit clone https://github.com/myugan/firecracker-python.git\ncd firecracker-python\npython3 -m venv venv\nsource venv/bin/activate\npip3 install -r requirements.txt\npip3 install -e .\n```\n\n### Features\n\n- Easily create microVMs with default or custom settings\n- View a list of all running microVMs\n- Access and modify microVM settings\n- Remove one or all microVMs\n- Connect to microVMs using SSH\n- Set up port forwarding in microVMs\n\n### Getting Started\n\nTo get started with **firecracker-python**, go to the [getting start guide](docs/getting-started.md)\n\n### Usage\n\nHere are some examples of how to use the library.\n\n#### Create a microVM with custom configuration and list them all.\n\n```python\nfrom firecracker import MicroVM\n\nvm = MicroVM(id=\"\u003cvm_id\u003e\", vcpu=2, mem_size_mib=4096)\nvm.create()\n\nvms = MicroVM.list()\nfor vm in vms:\n    print(f\"VM with id {vm['id']} has IP {vm['ip_addr']} and is in state {vm['state']}\")\n```\n\n#### Delete a microVM by id or all microVMs\n\n```python\nfrom firecracker import MicroVM\n\nvm = MicroVM(id=\"\u003cvm_id\u003e\")\nvm.delete()         # Delete a single microVM by id\n# Or\nvm.delete(all=True) # Delete all microVMs\n```\n\n#### Enable port forwarding\n\n```python\nfrom firecracker import MicroVM\n\nvm = MicroVM()\nvm.create()\n\nvm.port_forward(host_port=10222, dest_port=22)\n# [2025-03-20T07:45:52.215] [INFO] Added nftables port forwarding rule\n# 'Port forwarding active: x.x.x.x:10222 -\u003e 172.16.0.2:22'\n\nvm.port_forward(host_port=10222, dest_port=22, remove=True)\n# [2025-03-20T07:46:11.062] [INFO] Found postrouting rule with handle 16\n# [2025-03-20T07:46:11.062] [INFO] Prerouting rule: 172.16.0.2:22\n# [2025-03-20T07:46:11.062] [INFO] Found prerouting rule with handle 17\n# [2025-03-20T07:46:11.063] [INFO] Prerouting rule with handle 17 deleted\n# [2025-03-20T07:46:11.065] [INFO] Postrouting rule with handle 16 deleted\n# 'Port forwarding rule removed: x.x.x.x:10222 -\u003e 172.16.0.2:22'\n```\n\n### License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n### Contributing\n\nContributions are welcome! Please open an issue or submit a Pull Request (PR).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyugan%2Ffirecracker-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyugan%2Ffirecracker-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyugan%2Ffirecracker-python/lists"}