No project description provided
Project description
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
作者
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file s3_browser_cli-0.0.7.tar.gz.
File metadata
- Download URL: s3_browser_cli-0.0.7.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.8.0 Darwin/19.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d94ed3e4e8501add20ff19644d3667756d055206594e272d32df7e2b83d4dc58
|
|
| MD5 |
0147c329a7348617b90a1f98994becd0
|
|
| BLAKE2b-256 |
b97c060ef47f8528b3206c2e4a53031b57dfefd9bc0e4037d89a49d33d0eb6e9
|
File details
Details for the file s3_browser_cli-0.0.7-py3-none-any.whl.
File metadata
- Download URL: s3_browser_cli-0.0.7-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.8.0 Darwin/19.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e5c2c60923e2406305d1ed87c06a64d7ad554e614f6f53e302be6ab3cd5ee99
|
|
| MD5 |
770b4f52c6c38a4b25c5386f4f662b03
|
|
| BLAKE2b-256 |
c1347495de2174b373180a93ee0ea6ac2efe9c8b44315f4d08bd79634a6152fb
|