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.1.zip
(10.4 kB
view details)
pydba-1.2.1.tar.gz
(6.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydba-1.2.1.zip.
File metadata
- Download URL: pydba-1.2.1.zip
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b91ded1efad5e3fce870594737e02e0ad917af648ada5e1cc5ebe2858a8f19b1
|
|
| MD5 |
ba973059b1bcb2ce0ce0461bc0042651
|
|
| BLAKE2b-256 |
c40c1e625a0c1954c23bce11a0075697d2cee6c0d073387a92711c95b919a791
|
File details
Details for the file pydba-1.2.1.tar.gz.
File metadata
- Download URL: pydba-1.2.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffa666b1d4b743484202f1ee8d239bd3c4121af6498f0c2a5ced933f0b2d1ad1
|
|
| MD5 |
1df5bdde8993e6432723e2331e3f7117
|
|
| BLAKE2b-256 |
f98ad91ca3c79be152ba13c46f7d241387d7d680938112a8360198b66adb6b87
|
File details
Details for the file pydba-1.2.1-py2.py3-none-any.whl.
File metadata
- Download URL: pydba-1.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d25911d665599e2230040e43114dfcb870d790d9fc9e993170dfc9e541eb917
|
|
| MD5 |
2584a82a3d0fba1d84e68f3c019ba212
|
|
| BLAKE2b-256 |
d7c2a2e5a52c3468e5760cf6fa1445743f0a5a5803259e320b447c904913c87f
|