Skip to main content

Run SQL migrations stored in the cloud.

Project description

☁️ Yoyo Cloud ☁️

Run SQL migrations from cloud storage

Yoyo cloud builds on top of Yoyo migrations and allows appying SQL migrations that are stored in cloud storage.

Example

Applying from S3

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))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yoyo_cloud-0.1.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

yoyo_cloud-0.1.0-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page