Skip to content

Commit 461d6d5

Browse files
committed
doc: update README
1 parent cb33002 commit 461d6d5

1 file changed

Lines changed: 38 additions & 56 deletions

File tree

README.md

Lines changed: 38 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,64 @@
1-
# s3-explorer
1+
# S3 Explorer
22

3-
## Setup
4-
Install `uv`: https://docs.astral.sh/uv/getting-started/installation/
3+
A Streamlit-based web application for exploring S3-compatible storage buckets and previewing their contents.
54

6-
```bash
7-
git init
8-
uv sync --dev
9-
git add .
10-
git commit -m "Initial commit"
11-
uv run pre-commit install # optional
12-
```
5+
## Features
136

7+
- **Browse S3 Buckets**: Select from configured buckets and view all objects with path, size, and last modified date
8+
- **Search**: Filter objects by path with case-insensitive search
9+
- **File Preview**:
10+
- **Images**: Preview PNG, JPG, JPEG, GIF, WebP, and SVG files
11+
- **GeoParquet**: Visualize geospatial data on an interactive Folium map (first 2000 features)
12+
- **Parquet**: Display tabular data
13+
- **Text files**: Syntax-highlighted preview for TXT, MD, JSON, YAML, CSV, and XML
14+
- **Other files**: Download button for unsupported formats
15+
- **Anonymous Access**: Supports S3 buckets without authentication
16+
- **Cache Management**: Refresh bucket contents with a single click
1417

15-
### Run
16-
To execute your software you have two options:
18+
## Setup
1719

18-
**Option 1: Direct execution**
19-
```bash
20-
uv run main.py
21-
```
20+
Install [uv](https://docs.astral.sh/uv/getting-started/installation/), then:
2221

23-
**Option 2: Run as installed package**
2422
```bash
25-
uvx --from . s3-explorer
23+
uv sync
2624
```
2725

28-
### Development
29-
Just run `uv run main.py` and you are good to go!
26+
## Configuration
3027

31-
### Update from template
32-
To update your project with the latest changes from the template, run:
33-
```bash
34-
uvx --with copier-template-extensions copier update --trust
35-
```
28+
Copy the example config and edit it:
3629

37-
You can keep your previous answers by using:
3830
```bash
39-
uvx --with copier-template-extensions copier update --trust --defaults
31+
cp config.example.yaml config.yaml
4032
```
4133

42-
### (Optional) pre-commit
43-
pre-commit is a set of tools that help you ensure code quality. It runs every time you make a commit.
34+
Configure your buckets in `config.yaml`:
4435

45-
First, install pre-commit:
46-
```bash
47-
uv tool install pre-commit
36+
```yaml
37+
buckets:
38+
my-bucket:
39+
endpoint: https://s3.amazonaws.com
40+
bucket: actual-bucket-name # optional, defaults to the key name
41+
access_key: your-access-key # optional, omit for anonymous access
42+
secret_key: your-secret-key
4843
```
4944
50-
Then install pre-commit hooks:
51-
```bash
52-
pre-commit install
53-
```
45+
You can also set the config path via environment variable:
5446
55-
To run pre-commit on all files:
5647
```bash
57-
pre-commit run --all-files
48+
export S3_EXPLORER_CONFIG=/path/to/config.yaml
5849
```
5950

60-
### How to install a package
61-
Run `uv add <package-name>` to install a package. For example:
51+
## Run
52+
6253
```bash
63-
uv add requests
54+
uv run streamlit run app.py
6455
```
6556

66-
#### Visual studio code
67-
If you are using visual studio code install the recommended extensions
57+
Then open http://localhost:8501 in your browser.
6858

59+
## Docker
6960

70-
### Tools installed
71-
- uv
72-
- pre-commit (optional)
73-
74-
#### What is an environment variable? and why should I use them?
75-
Environment variables are variables that are not populated in your code but rather in the environment
76-
that you are running your code. This is extremely useful mainly for two reasons:
77-
- security, you can share your code without sharing your passwords/credentials
78-
- portability, you can avoid using hard-coded values like file-system paths or folder names
79-
80-
you can place your environment variables in a file called `.env`, the `main.py` will read from it. Remember to:
81-
- NEVER commit your `.env`
82-
- Keep a `.env.example` file updated with the variables that the software expects
61+
Build and run with Docker:
62+
```bash
63+
docker compose up
64+
```

0 commit comments

Comments
 (0)