What is Buildr?
Buildr is a Python library that makes building and deploying containers a seamless and idiomatic experience for developers. Instead of writing Dockerfiles and managing build commands separately, you can containerize your Python applications with a simple decorator. With Buildr, your application automatically packages itself as a container and optionally deploys itself - all with minimal configuration.Key features
Decorator-based API
Transform any Python function into a containerized application with the
@Containerize decoratorAuto-generated Dockerfiles
No need to write Dockerfiles manually - Buildr generates optimized Dockerfiles based on your Python version and dependencies
Publish to registries
Publish your container images to Docker Hub or other container registries with a single flag
Runtime configuration
Configure ports, replicas, and execution environments declaratively in your code
How it works
Buildr uses a decorator pattern to wrap your application’s entry point. When you run your application:- Detection: Buildr checks if it’s running inside a container
- Build: If not containerized, it generates a Dockerfile and builds the image
- Publish: Optionally pushes the image to your container registry
- Run: Executes your application inside the container
- Logs: Streams container logs back to you
Quick example
Here’s a simple Python application:Next steps
Quickstart
Get your first containerized app running in minutes
Installation
Install Buildr and its dependencies