Skip to main content

S3 Browser

基于Streamlit开发,可在线查看S3存储内容的工具。

特性

  • 文件夹/文件浏览
  • 丰富的文件查看模式
    • 针对JSONL格式优化,可按行预览前1MB的内容
    • 存在图片的路径,支持预览查看图片
  • 支持配置多个S3服务,灵活切换
  • 支持通过浏览器下载文件

注:对象存储没有文件夹概念,仅为模拟文件系统方式进行查看。出于性能考虑,一个文件夹仅支持查看前1000个文件。

使用

编写配置文件secrets.toml,多套S3服务配置

[S3_Servers]

[S3_Servers.S1]
AK = "<Your S3 AK>"
SK = "<Your S3 SK>"
ENDPOINT_URL = "<Your S3 Endpoint Url>"

[S3_Servers.S2]
AK = "<Your S3 AK>"
SK = "<Your S3 SK>"
ENDPOINT_URL = "<Your S3 Endpoint Url>"

单个S3也可以配置为

[S3]
AK = "<Your S3 AK>"
SK = "<Your S3 SK>"
ENDPOINT_URL = "<Your S3 Endpoint Url>"

启动服务 - docker启动

$ docker run -p 8501:8501 -v $(pwd)/secrets.toml:/s3_browser/.streamlit/secrets.toml zhchbin/s3_browser:latest

在浏览器中访问:http://127.0.0.1:8501

您也可以使用pip进行安装,secrets.toml 配置文件需要存放在当前运行目录.streamlit/secrets.toml或者HOME目录下~/.streamlit/secrets.toml

$ pip install s3-browser-cli
$ s3_browser --help

Usage: s3_browser [OPTIONS]

Options:
  -p, --port INTEGER  Specify alternate port [default: 8501]
  -a, --address TEXT  specify alternate bind address (default: 127.0.0.1)
  --help              Show this message and exit.

源码运行/开发

  • 下载仓库

    $ git clone https://github.com/opendatalab/s3_browser.git
    
  • Python版本要求:^3.10,建议使用虚拟环境

  • 编写配置文件 .streamlit/secrets.toml

方式一:Poetry

  • 安装poetry: https://python-poetry.org/

  • 安装依赖并运行

    $ poetry install
    $ poetry run streamlit run s3_browser/Welcome.py
    

方式二:pip

  • 安装依赖

    $ pip install -r requirements.txt
    
  • 运行

    $ streamlit run s3_browser/Welcome.py
    

作者

Metadata

Release files for s3-browser-cli 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for s3-browser-cli 0.0.7
File Size Uploaded
s3_browser_cli-0.0.7.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for s3-browser-cli 0.0.7
File Interpreter ABI Platform
s3_browser_cli-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 19.2 kB

Release files / s3_browser_cli-0.0.7.tar.gz

Download URL s3_browser_cli-0.0.7.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d94ed3e4e8501add20ff19644d3667756d055206594e272d32df7e2b83d4dc58
BLAKE2b-256 checksum
How to use checksums
b97c060ef47f8528b3206c2e4a53031b57dfefd9bc0e4037d89a49d33d0eb6e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.8.0 Darwin/19.6.0

Release files / s3_browser_cli-0.0.7-py3-none-any.whl

Download URL s3_browser_cli-0.0.7-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e5c2c60923e2406305d1ed87c06a64d7ad554e614f6f53e302be6ab3cd5ee99
BLAKE2b-256 checksum
How to use checksums
c1347495de2174b373180a93ee0ea6ac2efe9c8b44315f4d08bd79634a6152fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.8.0 Darwin/19.6.0

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page