{"id":28524655,"url":"https://github.com/synacktraa/cillow","last_synced_at":"2025-07-15T12:45:19.240Z","repository":{"id":271993491,"uuid":"915200577","full_name":"synacktraa/cillow","owner":"synacktraa","description":"Code Interpreter Library","archived":false,"fork":false,"pushed_at":"2025-06-26T21:06:46.000Z","size":1043,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T22:45:21.452Z","etag":null,"topics":["ai","code-interpreter","llm","python"],"latest_commit_sha":null,"homepage":"https://synacktraa.github.io/cillow","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/synacktraa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/supported_languages.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-11T08:20:26.000Z","updated_at":"2025-06-26T21:06:50.000Z","dependencies_parsed_at":"2025-01-11T10:16:44.218Z","dependency_job_id":"df2aa2b5-de99-4701-a746-256ee503951c","html_url":"https://github.com/synacktraa/cillow","commit_stats":null,"previous_names":["synacktraa/cillow"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/synacktraa/cillow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synacktraa%2Fcillow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synacktraa%2Fcillow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synacktraa%2Fcillow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synacktraa%2Fcillow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synacktraa","download_url":"https://codeload.github.com/synacktraa/cillow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synacktraa%2Fcillow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263892411,"owners_count":23526086,"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":["ai","code-interpreter","llm","python"],"created_at":"2025-06-09T11:10:41.503Z","updated_at":"2025-07-06T11:31:16.601Z","avatar_url":"https://github.com/synacktraa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://i.imgur.com/mBdWuQP.gif\" width=\"450px\" alt=\"cillow logo gif\"\u003e\n\u003c/p\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://img.shields.io/github/v/release/synacktraa/cillow\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/v/release/synacktraa/cillow\" alt=\"cillow version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/synacktraa/cillow/actions/workflows/main.yml\"\u003e\n        \u003cimg src=\"https://github.com/synacktraa/cillow/actions/workflows/main.yml/badge.svg\" alt=\"cillow CI status\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/synacktraa/cillow\"\u003e\n        \u003cimg src=\"https://codecov.io/gh/synacktraa/cillow/branch/main/graph/badge.svg\" alt=\"cillow codecov\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://img.shields.io/github/license/synacktraa/cillow\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/synacktraa/cillow\" alt=\"cillow license\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nCillow is an open-source library that enables you to execute AI-generated code in a controlled environment. The name \"Cillow\" follows the same naming convention as \"Pillow\" (Python Imaging Library), representing its role as a Code Interpreter Library.\n\nIt offers key features such as:\n\n- **Environment Switching**: Effortlessly switch between multiple Python environments.\n- **Automated Package Installation**: Automatically install imported packages using `uv` or `pip`.\n- **Functionality Patches**: Apply patches to restrict the scope of AI-generated code, capture outputs such as `stdout`, `stderr`, images, plots, and more.\n\n### Check Documentation\n\nVisit [synacktraa.github.io/cillow](https://synacktraa.github.io/cillow)\n\n### Installation\n\n```bash\npip install cillow\n```\n\n### Hosting a server\n\n```python\nimport cillow\n\ncillow.add_patches(\n    cillow.prebuilt_patches.patch_stdout_stderr_write,\n    cillow.prebuilt_patches.patch_matplotlib_pyplot_show,\n    cillow.prebuilt_patches.patch_pillow_show,\n)\n\nif __name__ == \"__main__\":\n    server = cillow.Server(\n        port=5556, max_interpreters=2, interpreters_per_client=1\n    )\n    server.run()\n```\n\n### Running code through a client\n\n```python\nimport cillow\n\nclient = cillow.Client.new(host=\"127.0.0.1\", port=5556)\n\nclient.run_code(\"\"\"\nfrom PIL import Image, ImageDraw\n\nimg = Image.new('RGB', (400, 300), 'white')\n\ndraw = ImageDraw.Draw(img)\ndraw.rectangle([50, 50, 350, 250], outline='black', width=3)\ndraw.ellipse([100, 100, 300, 200], outline='purple', width=3)\ndraw.line([50, 250, 350, 250], fill='blue', width=3)\n\nimg.show()\n\"\"\")\n```\n\n---\n\nAt the moment, Cillow only supports Python, as it does not rely on Jupyter Kernel/Lab.\n\nThis project began as an exploration of [E2B](https://e2b.dev/)'s code interpreter. I implemented the Python interpreter from scratch, taking a different approach by adding features like environment switching and functionality patching. Recognizing the potential of the project, I expanded it into a client-server architecture using ZeroMQ, threading, and multiprocessing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynacktraa%2Fcillow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynacktraa%2Fcillow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynacktraa%2Fcillow/lists"}