def stop_container(container_id): container = Containers.query.filter_by(id=container_id).first_or_404() if container_stop(container.name): return '1' else: return '0'