---
title: Example: Marketplace/ Applications
slug: sdk/example-usages/marketplace-applications
docTags: 
createdAt: 2025-03-20T19:52:33.330Z
---

End-to-end walkthrough: pull a Docker image from the Litmus Marketplace, run it as a container, inspect logs, and clean up.

## Setup

```python
from litmussdk import marketplace
```

## 1. Browse the Marketplace

```python
overview = marketplace.marketplace_overview()
images = marketplace.list_all_images()

# Find an image by name
target = next(i for i in images if "node-red" in i.get("Name", "").lower())
image_id = target["ID"]
```

## 2. Pull an Image

```python
marketplace.pull_image(image_id)

# Track the pull job
jobs = marketplace.list_image_pulls()
print(f"Active pulls: {len(jobs)}")
```

## 3. Run a Container

```python
running = marketplace.run_container({
    "imageId": image_id,
    "name": "my-node-red",
    "ports": [{"hostPort": 1880, "containerPort": 1880}],
    # ... other docker options
})
container_id = running["ID"]
```

## 4. Inspect

```python
all_containers = marketplace.list_all_containers()
me = next(c for c in all_containers if c["ID"] == container_id)
print(f"State: {me['State']}")

# Detail
detail = marketplace.container_inspect(container_id)

# Live logs
logs = marketplace.container_log(container_id, lines=200)

# Top processes
top = marketplace.container_top(container_id)
```

## 5. Lifecycle

```python
# Pause / unpause
marketplace.pause_containers([container_id])
marketplace.unpause_containers([container_id])

# Stop / start
marketplace.stop_containers([container_id])
marketplace.start_containers([container_id])
```

## 6. Cleanup

```python
# Remove container
marketplace.remove_containers_list_by_ids([container_id])

# Remove image
marketplace.remove_images([image_id])

# Reclaim space
marketplace.prune_containers()
```

## Image Upload (Custom Registries)

If you have a custom Docker image not in the public marketplace:

```python
# From local file
marketplace.upload_image(file_path="/path/to/image.tar")

# From an FTP-accessible source
marketplace.upload_from_ftp(image_file_path="ftp://...")
```

## See Also

- [Marketplace: Catalogs and Applications](docId\:gqoGt_Szm8rz9UdPhl2NL) - if you're managing the marketplace itself across multiple Edges via Edge Manager
