Metadata-Version: 2.4
Name: stow
Version: 2.0.0
Summary: stow artefacts anywhere, with ease
Author-email: Kieran Bacon <kieran.bacon@outlook.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/Kieran-Bacon/stow
Project-URL: Documentation, https://stow.readthedocs.io/en/latest/
Project-URL: Bug Tracker, https://github.com/Kieran-Bacon/stow/issues
Keywords: aws,s3,boto3,ssh,sftp,kubernetes,os
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.14
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: tqdm
Requires-Dist: click
Requires-Dist: click-option-group
Provides-Extra: s3
Requires-Dist: boto3; extra == "s3"
Provides-Extra: sftp
Requires-Dist: paramiko; extra == "sftp"
Provides-Extra: ssh
Requires-Dist: paramiko; extra == "ssh"
Provides-Extra: k8s
Requires-Dist: kubernetes; extra == "k8s"
Provides-Extra: all
Requires-Dist: stow[k8s,s3,sftp,ssh]; extra == "all"
Dynamic: license-file

# Stow

`stow` lets you write filesystem agnostic code. It gives local and remote files and directories one rich, familiar interface - a drop in replacement for `os.path`, extended with `put`, `get`, `ls`, `cp`, `mv`, `rm` and `sync` - so the same code works on your machine, on Amazon S3, on a remote machine over SFTP/SSH, or inside a Kubernetes pod.

```python
import stow

for art in stow.ls():
    print(art)
# <stow.Directory: /home/kieran/stow/tests>
# <stow.File: /home/kieran/stow/requirements.txt modified(2020-05-25 14:00:59.423165) size(16 bytes)>

stow.put("requirements.txt", "s3://example-bucket/projects/stow/requirements.txt")

with stow.open("s3://example-bucket/projects/stow/requirements.txt", "r") as handle:
    print(handle.read())

print(stow.getmtime("s3://example-bucket/projects/stow/requirements.txt"))
# 1617381185.341602

# Work with remote artefacts as if they were local
with stow.localise("s3://example-bucket/image.jpg") as abspath:
    cv2.imwrite(abspath, framedata)
```

Every transfer also has an async counterpart (`aget`, `aput`, `acp`, `amv`, `arm`, `als`, `async_sync`).

## Installation

Install `stow` with the extras for the storage backends you use:

```bash
pip install stow               # local filesystem and the `stow` command line
pip install "stow[s3]"         # + Amazon S3
pip install "stow[sftp,ssh]"   # + remote machines over SFTP/SSH
pip install "stow[k8s]"        # + Kubernetes pods
pip install "stow[all]"        # every backend
```

`stow` requires Python 3.14 or later.

## Links

- [Documentation](https://stow.readthedocs.io/en/latest/)
- [Changelog](https://stow.readthedocs.io/en/latest/changelog/)
- [Source](https://github.com/Kieran-Bacon/stow)
- [Issues](https://github.com/Kieran-Bacon/stow/issues)

## Development

`uv sync` installs stow with every backend plus the test and docs tools.

```bash
uv run pytest                                # run the tests
uv run pytest --cov --cov-report html        # with coverage
uv run zensical serve                        # preview the documentation
uv build && uv publish                       # publish a release
```
