Python tools for DBAs with deadlines!
Project description
A handy Python library for common database admin operations.
Requirements
Features
Basic imports and class constructor usage.
>>> from pydba import PostgresDB >>> db = PostgresDB() >>> db.available() True >>> db.names() ['postgres']
Database creation and deletion.
>>> db.create('foo') >>> db.names() ['postgres', 'foo'] >>> db.rename('foo', 'bar') >>> db.names() ['postgres', 'bar']
Database backup and restore.
>>> db.dump('bar', 'bar.backup') >>> db.drop('bar') >>> db.names() ['postgres'] >>> db.restore('bar', 'bar.backup') >>> db.names() ['postgres', 'bar']
Querying and shutting down database connections.
>>> db.connections('postgres') [Connection(datname='postgres', pid=13832, state='idle', query='', usename='drkjam', ...)] >>> db.kill_connections('postgres') >>> db.connections('postgres') []
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
pydba-1.2.0.zip
(9.8 kB
view details)
pydba-1.2.0.tar.gz
(6.4 kB
view details)
Built Distribution
File details
Details for the file pydba-1.2.0.zip
.
File metadata
- Download URL: pydba-1.2.0.zip
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd4c43304091a7aee1c488ea21c4e79016a3293a7275ca734c65f47b6e57494e |
|
MD5 | 32f2fa31f8d28813191d19c08fc48a47 |
|
BLAKE2b-256 | b9c2e17559568aaca11c4fca8f0e34430d55285e4e963a90ba3d46435c3efd00 |
File details
Details for the file pydba-1.2.0.tar.gz
.
File metadata
- Download URL: pydba-1.2.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84aa54d0709b5c7b164a1f80759ad0585fc6e8e8eb608ca62c5d70f84edf54d3 |
|
MD5 | 7a04225564443430b778795f7469368a |
|
BLAKE2b-256 | 67bce7a19889468ad26e4a4ca72bc8dd75c91950a5f6ad123382619289aa38d2 |
File details
Details for the file pydba-1.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pydba-1.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80b829fb392f1f4a090e31e4dff3694ad40d342e32bc6463019e5e721d47e6cf |
|
MD5 | d9392484d01f3a765609e2be443149ba |
|
BLAKE2b-256 | 7f1a3c30398436c0111961dd887e6f01b20d85cae6570378ae7efdbf03f02af5 |