{"id":49767010,"url":"https://github.com/retospect/bambuuzle","last_synced_at":"2026-05-11T10:57:03.796Z","repository":{"id":353579882,"uuid":"1198925697","full_name":"retospect/bambuuzle","owner":"retospect","description":"Bambu printer file management pip","archived":false,"fork":false,"pushed_at":"2026-04-24T18:51:41.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-11T10:56:57.508Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/retospect.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-01T22:30:52.000Z","updated_at":"2026-04-24T18:50:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/retospect/bambuuzle","commit_stats":null,"previous_names":["retospect/bambuuzle"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/retospect/bambuuzle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retospect%2Fbambuuzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retospect%2Fbambuuzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retospect%2Fbambuuzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retospect%2Fbambuuzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/retospect","download_url":"https://codeload.github.com/retospect/bambuuzle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retospect%2Fbambuuzle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32891966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-05-11T10:57:03.078Z","updated_at":"2026-05-11T10:57:03.787Z","avatar_url":"https://github.com/retospect.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bambuuzle\n\n[![PyPI version](https://badge.fury.io/py/bambuuzle.svg)](https://badge.fury.io/py/bambuuzle)\n[![Python 3.10+](https://img.shields.io/pypi/pyversions/bambuuzle.svg)](https://pypi.org/project/bambuuzle/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Downloads](https://img.shields.io/pypi/dm/bambuuzle.svg)](https://pypi.org/project/bambuuzle/)\n\nExtract and re-insert G-code from Bambu Lab `.gcode.3mf` files.\n\n![bambuuzle logo](logo.png)\n\n## What is this?\n\nBambu Lab printers use `.gcode.3mf` files — which are just ZIP archives containing G-code, metadata, thumbnails, and MD5 checksums. **bambuuzle** lets you:\n\n- **Extract** plate G-code for editing\n- **Re-insert** modified G-code (with automatic MD5 recomputation)\n- **Create** `.gcode.3mf` files from scratch\n- **Programmatically transform** G-code via the Python API\n\nZero dependencies — uses only Python stdlib (`zipfile`, `hashlib`, `json`).\n\n## Installation\n\n```bash\npip install bambuuzle\n```\n\n## CLI Usage\n\n### Extract G-code from a plate\n\n```bash\n# Extract plate 1 (default) → writes plate_1.gcode\nbambuuzle get_plate my_print.gcode.3mf\n\n# Extract plate 2 → writes plate_2.gcode\nbambuuzle get_plate my_print.gcode.3mf --plate 2\n```\n\n### Re-insert modified G-code\n\n```bash\n# Edit plate_1.gcode however you like, then:\nbambuuzle put_plate my_print.gcode.3mf\n\n# Write to a new file instead of overwriting\nbambuuzle put_plate my_print.gcode.3mf --output modified.gcode.3mf\n```\n\nThe MD5 checksum is automatically recomputed — no manual hash wrangling needed.\n\n## Python API\n\n### Read and modify\n\n```python\nfrom bambuuzle import BambuFile\n\nbf = BambuFile.open(\"my_print.gcode.3mf\")\n\n# Access plate gcode\nplate = bf.plate(1)\nprint(f\"Gcode length: {len(plate.gcode)} chars\")\n\n# Modify\nplate.gcode = plate.gcode.replace(\"M104 S200\", \"M104 S210\")\n\n# Save (MD5 auto-recomputed)\nbf.save(\"modified.gcode.3mf\")\n```\n\n### Create from scratch\n\n```python\nfrom bambuuzle import BambuFile\n\nbf = BambuFile()\nbf.add_plate(gcode=\"G28\\nG1 X100 Y100 F3000\\nM84\\n\")\nbf.save(\"new_print.gcode.3mf\")\n```\n\n### Transform helper\n\n```python\nfrom bambuuzle.bambu_file import transform\n\ndef add_pause_at_layer(gcode: str) -\u003e str:\n    return gcode.replace(\n        \"; LAYER_CHANGE\",\n        \"; LAYER_CHANGE\\nM400\\nM25 ; pause\",\n        1,  # only first occurrence\n    )\n\ntransform(\"input.gcode.3mf\", \"output.gcode.3mf\", add_pause_at_layer)\n```\n\n## The .gcode.3mf format\n\nA `.gcode.3mf` is a ZIP archive with this structure:\n\n```\n├── [Content_Types].xml\n├── _rels/.rels\n├── 3D/3dmodel.model\n└── Metadata/\n    ├── plate_1.gcode          ← The actual G-code\n    ├── plate_1.gcode.md5      ← MD5 hex digest (must match gcode)\n    ├── plate_1.json           ← Plate metadata\n    ├── plate_1.png            ← Thumbnail\n    └── ...\n```\n\n**Key gotcha**: if the MD5 doesn't match the G-code, Bambu Studio and the printer will reject the file. bambuuzle handles this automatically.\n\n## Development\n\n```bash\ngit clone https://github.com/retospect/bambuuzle.git\ncd bambuuzle\npip install -e \".[dev]\"\npytest\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretospect%2Fbambuuzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretospect%2Fbambuuzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretospect%2Fbambuuzle/lists"}