Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
The most versatile way to manage containers locally
| Date | Stars |
|---|---|
| 2026-07-24 | 715 |
| 2026-07-25 | 715 |
| 2026-07-28 | 715 |
| 2026-07-30 | 715 |
| 2026-08-06 | 715 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
[](https://app.circleci.com/pipelines/github/afroisalreadyinu/miniboss)
[](https://badge.fury.io/py/miniboss)
<img src="https://github.com/afroisalreadyinu/miniboss/raw/main/logo.png" width="200">
# miniboss
miniboss is a Python application for locally running a collection of
interdependent docker services, individually rebuilding and restarting them, and
managing application state with lifecycle hooks. Services definitions can be
written in Python, allowing the use of programming logic instead of markup.
## Why not docker-compose?
First and foremost, good old Python instead of YAML. `docker-compose` is in the
school of yaml-as-service-description, which means that going beyond a static
description of a service set necessitates templates, or some kind of scripting.
One could just as well use a full-blown programming language, while trying to
keep simple things simple. Another thing sorely missing in `docker-compose` is
lifecycle hooks, i.e. a mechanism whereby scripts can be executed when the state
of a container changes. Lifecycle hooks have been
[requested](https://github.com/docker/compose/issues/1809)
[multiple](https://github.com/docker/compose/issues/5764)
[times](https://github.com/compose-spec/compose-spec/issues/84), but were not
deemed to be in the domain of `docker-compose`.
## Installation
miniboss is [on PyPi](https://pypi.org/project/miniboss/); you can install it
with the following:
```
pip install miniboss
```
## Usage
Here is a very simple service specification:
```python
#! /usr/bin/env python3
import miniboss
miniboss.group_name('readme-demo')
class Database(miniboss.Service):
name = "appdb"
image = "postgres:10.6"
env = {"POSTGRES_PASSWORD": "dbpwd",
"POSTGRES_USER": "dbuser",
"POSTGRES_DB": "appdb" }
ports = {5432: 5433}
class Application(miniboss.Service):
name = "python-todo"
image = "afroisalreadyin/python-todo:0.0.1"
env = {"DB_URI": "postgresql://dbuser:dbpwd@appdb:5432/appdb"}
dependencies = ["appdb"]
ports = {8080: 8080}
stop_signal = "SIGINT"
if __name__ == "__main__":
miniboss.cli()
```
The first use of miniboss is in the call to `miniboss.group_name`, which
specifies a name for this group of services. If you don't set it, sluggified
form of the directory name will be used. Group name is used to identify the
services and the network defined in a miniboss file. Setting it manually to a
non-default value will allow miniboss to manage multiple collections in the same
directory.
A **service** is defined by subclassing `miniboss.Service` and overriding, in
the minimal case, the fields `image` and `name`. The `env` field specifies the
environment variables. As in the case of the `appdb` service, you can use
ordinary variables anywhere Python accepts them. The other available fields are
explained in the section [Service definition
fields](#service-definition-fields). In the [above example](#usage), we are
creating two services: The application service `python-todo` (a simple Flask
todo application defined in the `sample-apps` directory) depends on `appdb` (a
Postgresql container), specified through the `dependencies` field. As in
`docker-compose`, this means that `python-todo` will get started after `appdb`
reaches running status.
The `miniboss.cli` function is the main entry point; you need to call it in the
main section of your script. Let's run the script above without arguments, which
leads to the following output:
```
Usage: miniboss-main.py [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
start
stop
```
We can start our small collection of services by running `./miniboss-main.py
start`. After spitting out some logging text, you will see that starting the
containers failed, with the `python-todo` service throwing an error that it
cannot Excerpt of 17,716 characters
Read on GitHub189
3
Ang · Malaysia
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:03d33405b8e5da4c, topic:testing