Metadata-Version: 2.1
Name: yoyo-cloud
Version: 0.1.0
Summary: Run SQL migrations stored in the cloud.
Author: Fasih Khatib
Author-email: hellofasih.confound928@passinbox.com
Requires-Python: >=3.12,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: s3fs (>=2024.3.1,<2025.0.0)
Requires-Dist: setuptools (>=69.2.0,<70.0.0)
Requires-Dist: yoyo-migrations (>=8.2.0,<9.0.0)
Description-Content-Type: text/markdown

# ☁️ Yoyo Cloud ☁️
## Run SQL migrations from cloud storage  

Yoyo cloud builds on top of [Yoyo migrations](https://ollycope.com/software/yoyo/latest/) and allows appying SQL migrations that are stored in cloud storage.

## Example  
### Applying from S3
```python
from yoyo import get_backend
from yoyo_cloud import read_s3_migrations

if __name__ == "__main__":
    migrations = read_s3_migrations(paths=["s3://bucket/yoyo-migrations-s3/"])
    backend = get_backend(f"postgresql://postgres:my-secret-pw@localhost:5432/postgres")

    with backend.lock():
        # -- Apply any outstanding migrations
        backend.apply_migrations(backend.to_apply(migrations))
```
