Skip to content

jbuendia1y/pydbbackups

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyDBBackups

A backup handler

Installation

pip install pydbbackups

CLI example

dbbackups dump \
    --name backup-example \
    --database-type postgres \
    --host localhost \
    --database test \
    --username postgres \
    --port 5432

# 0__backup-example.sql Created !

Code example

from pydbbackups import Postgres

cls = Postgres(
    database="test",
    host="localhost",
    port=5432,
    username="postgres",
    password="postgres"
)

# In some cases dump method, return None

output = cls.dump()  # Return BytesIO
print(output.read().decode('utf-8'))

@jbuendia1y <jbuendia1y@gmail.com>

Releases

No releases published

Packages

No packages published

Languages