{"id":13575012,"url":"https://github.com/bcongdon/bpy_lambda","last_synced_at":"2025-04-04T19:30:30.521Z","repository":{"id":57416213,"uuid":"97782826","full_name":"bcongdon/bpy_lambda","owner":"bcongdon","description":"🎥 A compiled binary of Blender-as-a-Python-Module (bpy) for use in AWS Lambda","archived":true,"fork":false,"pushed_at":"2020-07-07T13:38:12.000Z","size":17886,"stargazers_count":66,"open_issues_count":10,"forks_count":21,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-18T23:03:45.058Z","etag":null,"topics":["aws","aws-lambda","blender","blender-python","python"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/bcongdon.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}},"created_at":"2017-07-20T02:43:20.000Z","updated_at":"2024-06-04T20:05:39.000Z","dependencies_parsed_at":"2022-09-05T05:10:59.171Z","dependency_job_id":null,"html_url":"https://github.com/bcongdon/bpy_lambda","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcongdon%2Fbpy_lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcongdon%2Fbpy_lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcongdon%2Fbpy_lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcongdon%2Fbpy_lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcongdon","download_url":"https://codeload.github.com/bcongdon/bpy_lambda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247237610,"owners_count":20906315,"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":["aws","aws-lambda","blender","blender-python","python"],"created_at":"2024-08-01T15:00:57.469Z","updated_at":"2025-04-04T19:30:30.516Z","avatar_url":"https://github.com/bcongdon.png","language":"Dockerfile","readme":"# bpy_lambda\n🎥 A compiled binary of Blender-as-a-Python-Module (bpy) for use in AWS Lambda\n\n[![PyPI version](https://badge.fury.io/py/bpy_lambda.svg)](https://badge.fury.io/py/bpy_lambda)\n\n## Installation\n\n```sh\npip install bpy_lambda\n```\n\nWorks great with [Zappa](https://github.com/Miserlou/Zappa/)!\n\n## Usage\n\n`bpy_lambda` is a simple wrapper around the `bpy`. You can read more about `bpy` usage in the [Blender Documentation](https://docs.blender.org/api/current/).\n\n```python\nfrom bpy_lambda import bpy\n\n# bpy can be used normally!\nbpy.ops.mesh.primitive_cube_add(location=(0, 0, 0))\ncube = bpy.context.scene.objects.active\ncube.scale = (1, 2, 3)\nbpy.ops.export_scene.obj(filepath='my_model.obj')\n```\n\n`bpy_lambda` will only work in a Lambda environment (perhaps some linux distros as well, if you have a similar set of library versions to AWS Lambda).\n\nFor local development, it will be useful to install `bpy` normally with the [instructions](https://wiki.blender.org/index.php/User:Ideasman42/BlenderAsPyModule) on the Blender website. (Unfortunately, this requires building from source).\n\nWith a local version of `bpy` installed, you can use this code to switch seamlessly between your local environment and Lambda: \n\n```python\ntry:\n    import bpy\nexcept ImportError:\n    from bpy_lambda import bpy\n```\n\n\n## Contribution / Building from Source\n\nThe Dockerfile is the easiest way to create a version of `bpy` that works on Lambda. Building this docker image will download the necessary libraries and compile a minimal version of Blender that works in a Lambda environment.\n\nFor easy installation / local setup, run `./build.sh`. This will create a directory called `bpy_lambda` that contains all the necessary package files.\n\nRunning `./test.sh` will spin up a test Lambda invocation (using the excellent [lambci/docker-lambda](https://github.com/lambci/docker-lambda)). Any import or dependency errors should be caught by this test.\n","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcongdon%2Fbpy_lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcongdon%2Fbpy_lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcongdon%2Fbpy_lambda/lists"}