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.1.0.zip
(8.0 kB
view details)
pydba-1.1.0.tar.gz
(4.9 kB
view details)
Built Distribution
File details
Details for the file pydba-1.1.0.zip
.
File metadata
- Download URL: pydba-1.1.0.zip
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90a5e0386ba0d78ce9c3eafd7eaf179b4a0faf103f18bdf1d079a77715488180 |
|
MD5 | 1602fef1aa1dbc55c80a650a5d6569ab |
|
BLAKE2b-256 | 046a56daedb9a250a6953c8e5fa1c18f27af0b8a32de269a1010c9e65505acfa |
File details
Details for the file pydba-1.1.0.tar.gz
.
File metadata
- Download URL: pydba-1.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e5432f4382e3e651621b88bfbc6b6046302f2592174cb202d3ea8d74cf21e4a |
|
MD5 | 3078f14069fc39a5e569ec23ffc4a314 |
|
BLAKE2b-256 | dc9098f76a9f1117531bd76a7f7f5e0fd53042fcceaa62c301450e29d2d8ce0b |
File details
Details for the file pydba-1.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pydba-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3adf90dd1692ba6dee7771c17c44d5ed2180208502a25a77fd697df490e078c1 |
|
MD5 | 83b237d26ac85123e4f5673e388e28b8 |
|
BLAKE2b-256 | 5a6d7fc9ffe6b4029b86ce8acfd8b6a6c4e334ae260bfc947e9b99c571d1843a |