My code

import streamlit as st
from minio import Minio
from minio.error import InvalidResponseError

Initialize Minio client

client = Minio(
secure=False # Set to True for secure (HTTPS) access

List all the buckets in the Minio server

st.write(“### Buckets:”)
buckets = client.list_buckets()
for bucket in buckets:
st.write(f"- {}“)
except InvalidResponseError as err:
st.error(f"Minio error occurred: {err}”)

List all the objects in a bucket

bucket_name = st.text_input(“Enter bucket name:”)
if bucket_name:
st.write(f"### Objects in bucket {bucket_name}:“)
objects = client.list_objects(bucket_name)
for obj in objects:
st.write(f”- {obj.object_name}“)
except InvalidResponseError as err:
st.error(f"Minio error occurred: {err}”)

Hi @R_Prashanth

To help the community understand your issue better, could you provide additional context to your issue as mentioned in the guidelines

Accordingly, please provide the following for this debugging post:

  • What is the full error message?
  • What have you tried so far to solve the issue? Be specific in explaining how your past approaches have not worked.
  • What version of Streamlit and Python are you using?
  • What operating system are you using?
  • Are you running the code locally? If not, where is the app deployed?