bucklet 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bucklet-0.1.0/PKG-INFO +99 -0
- bucklet-0.1.0/README.md +80 -0
- bucklet-0.1.0/pyproject.toml +53 -0
- bucklet-0.1.0/src/bucklet/__init__.py +18 -0
- bucklet-0.1.0/src/bucklet/__main__.py +8 -0
- bucklet-0.1.0/src/bucklet/cli.py +534 -0
- bucklet-0.1.0/src/bucklet/config.py +251 -0
- bucklet-0.1.0/src/bucklet/errors.py +12 -0
- bucklet-0.1.0/src/bucklet/formatting.py +87 -0
- bucklet-0.1.0/src/bucklet/models.py +153 -0
- bucklet-0.1.0/src/bucklet/rclone.py +55 -0
- bucklet-0.1.0/src/bucklet/s3.py +234 -0
- bucklet-0.1.0/src/bucklet/service.py +263 -0
- bucklet-0.1.0/src/bucklet/storage.py +131 -0
- bucklet-0.1.0/src/bucklet/tui/__init__.py +5 -0
- bucklet-0.1.0/src/bucklet/tui/app.py +797 -0
- bucklet-0.1.0/src/bucklet/tui/screens.py +302 -0
bucklet-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: bucklet
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Manage S3 objects in any storage class.
|
|
5
|
+
Keywords: s3,glacier,deep-archive,tui,cli,backup
|
|
6
|
+
Author: Tomas Vana
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Topic :: System :: Archiving :: Backup
|
|
12
|
+
Requires-Dist: argcomplete>=3.6.3
|
|
13
|
+
Requires-Dist: boto3>=1.43.18
|
|
14
|
+
Requires-Dist: platformdirs>=4.10.0
|
|
15
|
+
Requires-Dist: textual>=8.2.7
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Project-URL: Repository, https://github.com/tomasvana/bucklet
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# bucklet
|
|
21
|
+
|
|
22
|
+
Bucklet is a small CLI/TUI tool for managing objects in S3 compatible buckets, with support for all storage classes.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
Python >=3.10 is required.
|
|
27
|
+
|
|
28
|
+
1. Install the `bucklet` package from PyPI:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# using pipx
|
|
32
|
+
pipx ensurepath && pipx install bucklet
|
|
33
|
+
|
|
34
|
+
# using uv
|
|
35
|
+
uv tool install bucklet
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Optionally, install shell completion:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# fish
|
|
42
|
+
register-python-argcomplete --shell fish bucklet > ~/.config/fish/completions/bucklet.fish
|
|
43
|
+
|
|
44
|
+
# bash
|
|
45
|
+
echo 'eval "$(register-python-argcomplete bucklet)"' >> ~/.bashrc
|
|
46
|
+
|
|
47
|
+
# zsh
|
|
48
|
+
echo 'autoload -U compinit bashcompinit && compinit && bashcompinit; eval "$(register-python-argcomplete bucklet)"' >> ~/.zshrc
|
|
49
|
+
|
|
50
|
+
# PowerShell
|
|
51
|
+
Add-Content $PROFILE 'register-python-argcomplete --shell powershell bucklet | Out-String | Invoke-Expression'
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
3. Run `bucklet` to open the TUI and configure a profile with your S3 credentials.
|
|
55
|
+
|
|
56
|
+
> [!IMPORTANT]
|
|
57
|
+
> Deletion of objects is only supported through the TUI when launched with the `--allow-deletion` flag.
|
|
58
|
+
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
bucklet [-h] [--profile NAME] [--allow-deletion] {up,get,thaw,ls,stat,profile} ...
|
|
63
|
+
|
|
64
|
+
positional arguments:
|
|
65
|
+
{up,get,thaw,ls,stat,profile}
|
|
66
|
+
up upload files/dirs (mirrors absolute path)
|
|
67
|
+
get download objects (globs allowed)
|
|
68
|
+
thaw restore archived objects (globs allowed)
|
|
69
|
+
ls list objects
|
|
70
|
+
stat show detailed status of objects (globs allowed)
|
|
71
|
+
profile manage saved profiles
|
|
72
|
+
|
|
73
|
+
options:
|
|
74
|
+
-h, --help show this help message and exit
|
|
75
|
+
--profile NAME profile to use (a saved name, or a raw bucket name); defaults to the configured default profile
|
|
76
|
+
--allow-deletion allow deleting objects in the TUI (no effect on the subcommands)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Development
|
|
80
|
+
|
|
81
|
+
Set up the environment:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
uv sync
|
|
85
|
+
pre-commit install
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Test the project:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
uv run pytest
|
|
92
|
+
uv run pytest --cov=bucklet
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Run the project:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
uv run bucklet
|
|
99
|
+
```
|
bucklet-0.1.0/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# bucklet
|
|
2
|
+
|
|
3
|
+
Bucklet is a small CLI/TUI tool for managing objects in S3 compatible buckets, with support for all storage classes.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Python >=3.10 is required.
|
|
8
|
+
|
|
9
|
+
1. Install the `bucklet` package from PyPI:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# using pipx
|
|
13
|
+
pipx ensurepath && pipx install bucklet
|
|
14
|
+
|
|
15
|
+
# using uv
|
|
16
|
+
uv tool install bucklet
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. Optionally, install shell completion:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# fish
|
|
23
|
+
register-python-argcomplete --shell fish bucklet > ~/.config/fish/completions/bucklet.fish
|
|
24
|
+
|
|
25
|
+
# bash
|
|
26
|
+
echo 'eval "$(register-python-argcomplete bucklet)"' >> ~/.bashrc
|
|
27
|
+
|
|
28
|
+
# zsh
|
|
29
|
+
echo 'autoload -U compinit bashcompinit && compinit && bashcompinit; eval "$(register-python-argcomplete bucklet)"' >> ~/.zshrc
|
|
30
|
+
|
|
31
|
+
# PowerShell
|
|
32
|
+
Add-Content $PROFILE 'register-python-argcomplete --shell powershell bucklet | Out-String | Invoke-Expression'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
3. Run `bucklet` to open the TUI and configure a profile with your S3 credentials.
|
|
36
|
+
|
|
37
|
+
> [!IMPORTANT]
|
|
38
|
+
> Deletion of objects is only supported through the TUI when launched with the `--allow-deletion` flag.
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
bucklet [-h] [--profile NAME] [--allow-deletion] {up,get,thaw,ls,stat,profile} ...
|
|
44
|
+
|
|
45
|
+
positional arguments:
|
|
46
|
+
{up,get,thaw,ls,stat,profile}
|
|
47
|
+
up upload files/dirs (mirrors absolute path)
|
|
48
|
+
get download objects (globs allowed)
|
|
49
|
+
thaw restore archived objects (globs allowed)
|
|
50
|
+
ls list objects
|
|
51
|
+
stat show detailed status of objects (globs allowed)
|
|
52
|
+
profile manage saved profiles
|
|
53
|
+
|
|
54
|
+
options:
|
|
55
|
+
-h, --help show this help message and exit
|
|
56
|
+
--profile NAME profile to use (a saved name, or a raw bucket name); defaults to the configured default profile
|
|
57
|
+
--allow-deletion allow deleting objects in the TUI (no effect on the subcommands)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Development
|
|
61
|
+
|
|
62
|
+
Set up the environment:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
uv sync
|
|
66
|
+
pre-commit install
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Test the project:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
uv run pytest
|
|
73
|
+
uv run pytest --cov=bucklet
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Run the project:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
uv run bucklet
|
|
80
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "bucklet"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Manage S3 objects in any storage class."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
authors = [{ name = "Tomas Vana" }]
|
|
9
|
+
keywords = ["s3", "glacier", "deep-archive", "tui", "cli", "backup"]
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Environment :: Console",
|
|
12
|
+
"Intended Audience :: Developers",
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"Topic :: System :: Archiving :: Backup",
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
"argcomplete>=3.6.3",
|
|
18
|
+
"boto3>=1.43.18",
|
|
19
|
+
"platformdirs>=4.10.0",
|
|
20
|
+
"textual>=8.2.7",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[project.scripts]
|
|
24
|
+
bucklet = "bucklet.cli:main"
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Repository = "https://github.com/tomasvana/bucklet"
|
|
28
|
+
|
|
29
|
+
[build-system]
|
|
30
|
+
requires = ["uv_build>=0.11.2,<0.12.0"]
|
|
31
|
+
build-backend = "uv_build"
|
|
32
|
+
|
|
33
|
+
[tool.pytest.ini_options]
|
|
34
|
+
testpaths = ["tests"]
|
|
35
|
+
addopts = "-q"
|
|
36
|
+
asyncio_mode = "auto"
|
|
37
|
+
|
|
38
|
+
[tool.ruff]
|
|
39
|
+
line-length = 100
|
|
40
|
+
target-version = "py310"
|
|
41
|
+
|
|
42
|
+
[tool.ruff.lint]
|
|
43
|
+
select = ["E", "F", "I", "W", "UP", "B"]
|
|
44
|
+
|
|
45
|
+
[dependency-groups]
|
|
46
|
+
dev = [
|
|
47
|
+
"moto[s3]>=5.2.1",
|
|
48
|
+
"pre-commit>=4.6.0",
|
|
49
|
+
"pytest>=9.0.3",
|
|
50
|
+
"pytest-asyncio>=1.4.0",
|
|
51
|
+
"pytest-cov>=7.1.0",
|
|
52
|
+
"ruff>=0.15.15",
|
|
53
|
+
]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
""" "Manage S3 objects in any storage class."
|
|
2
|
+
|
|
3
|
+
The CLI and the Textual TUI are thin frontends over one UI-agnostic core
|
|
4
|
+
(:mod:`bucklet.service`). The modules underneath it are:
|
|
5
|
+
|
|
6
|
+
bucklet.storage storage-class vocabulary and object-state logic (pure)
|
|
7
|
+
bucklet.models the Profile, ObjectInfo and ObjectStatus dataclasses
|
|
8
|
+
bucklet.rclone reads credentials from an rclone remote
|
|
9
|
+
bucklet.config saved profiles and the default selection
|
|
10
|
+
bucklet.s3 thin boto3 wrappers that raise BuckletError
|
|
11
|
+
bucklet.service the high-level operations both front-ends call
|
|
12
|
+
bucklet.cli the argparse front-end
|
|
13
|
+
bucklet.tui the Textual front-end
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
__version__ = "0.1.0"
|
|
17
|
+
|
|
18
|
+
__all__ = ["__version__"]
|