---
title: Marketplace
slug: sdk/marketplace
docTags: 
createdAt: 2026-05-08T21:19:49.275Z
---

The marketplace module manages Docker images and containers on Litmus Edge.

## Imports

```python
from litmussdk import marketplace
```

All functions are accessible directly from the `marketplace` namespace.

***

## Overview

```python
overview = marketplace.marketplace_overview()  # dict
```

***

## Images

### Listing Images

```python
images = marketplace.list_all_images()   # list[dict]
# Each entry: {Id, RepoTags, Size, Created, ...}

ftp_images = marketplace.list_ftp_images()  # list[dict], images staged on FTP
```

### Getting Image Details

```python
details = marketplace.image_details(image_id)  # dict
```

### Pulling an Image

```python
# Find a registry (e.g. public Docker Hub)
registries = marketplace.list_registries()
registry = next(r for r in registries if "docker" in r["name"].lower())
registry_id = registry["id"]

# Trigger the pull, returns the pull job ID
job = marketplace.pull_image(
    image_name="ubuntu",
    image_tag="latest",
    registry_id=registry_id,
)

# Check pull job status
pulls = marketplace.list_image_pulls()
```

### Uploading a Local Image

```python
import pathlib

job_id = marketplace.upload_image(
    file_name="my-app.tar",
    image_name="my-app",
    path_to_file=pathlib.Path("/path/to/my-app.tar"),
)
```

### Uploading from FTP

```python
# File must already be in ftp-data/docker-images on the device
job = marketplace.upload_from_ftp("my-app.tar")

# Check upload job status
jobs = marketplace.list_upload_jobs()
```

### Removing Images

```python
marketplace.remove_images(
    image_ids=[image_id_1, image_id_2],
    force_remove=True,
    prune_children=True,
)
```

***

## Containers

### Listing Containers

```python
containers = marketplace.list_all_containers(include_exited=True)  # list[dict]
# Each entry: {Id, Names, Image, Status, State, ...}
```

### Running a Container

```python
result = marketplace.run_container(
    "docker run -d --name my-app -p 8080:80 my-app:latest"
)
container_id = result["Id"]
```

### Lifecycle

```python
marketplace.start_containers([container_id])
marketplace.stop_containers([container_id])
marketplace.pause_containers([container_id])
marketplace.unpause_containers([container_id])
```

:::BlockQuote
Pass a list of IDs. All lifecycle functions accept multiple containers at once.
:::

### Removing Containers

```python
# Single
marketplace.delete_container_by_id(container_id)

# Multiple
marketplace.remove_containers_list_by_ids([container_id_1, container_id_2])

# Prune all stopped containers
marketplace.prune_containers()
```

### Inspecting a Container

```python
info = marketplace.container_inspect(container_id)   # dict, full Docker inspect output
logs = marketplace.container_log(container_id)       # str, container stdout/stderr
top  = marketplace.container_top(container_id)       # dict, running processes
```

***

## Prometheus Metrics

```python
metrics = marketplace.prometheus_metrics()  # str, raw Prometheus exposition format
```

***

## License

Copyright (c) Litmus Automation Inc.
