## pg-export - pg to git converter
Export structure of database to object files for control version system
## structure of result directories
```
casts:
...
data:
schema1:
table1.sql
schema2:
...
extensions:
...
publications:
...
schemas:
schema1:
aggregate:
...
domains:
...
functions:
...
operators:
...
sequences:
...
tables:
...
triggers:
...
types:
...
views:
...
schema2
...
```
## installation
```
pip install pg-export
```
## usage
```
usage: pg_export [--help] [--version] [--clean] [--echo-queries] [-h HOST] [-p PORT] [-U USER] [-W PASSWORD] [-j JOBS] [-z TIMEZONE] database out_dir
positional arguments:
database source database name
out_dir directory for object files
options:
--help show this help message and exit
--version show program's version number and exit
--clean clean out_dir if not empty (env variable PG_EXPORT_AUTOCLEAN=true)
--echo-queries echo commands sent to server
-h HOST, --host HOST host for connect db (env variable PG_HOST=<host>)
-p PORT, --port PORT port for connect db (env variable PG_PORT=<port>)
-U USER, --user USER user for connect db (env variable PG_USER=<user>)
-W PASSWORD, --password PASSWORD
password for connect db (env variable PG_PASSWORD=<password>)
-j JOBS, --jobs JOBS number of connections
-z TIMEZONE, --timezone TIMEZONE
timezone for constraints, partitions etc.
```
## examples
```
pg_export -h 127.0.0.1 -p 5432 -U postgres -j 4 my_database /tmp/my_database_structure/
```
Raw data
{
"_id": null,
"home_page": "https://github.com/comagic/pg_export",
"name": "pg-export",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "postgresql, git, ci/cd",
"author": "Andrey Chernyakov",
"author_email": "a.chernyakov@comagic.dev",
"download_url": "https://files.pythonhosted.org/packages/f3/8b/5869578ee6db9adc68c56bd89b921ccfabbdfc7efaf7f6df9adbf29369b0/pg_export-3.7.3.tar.gz",
"platform": null,
"description": "## pg-export - pg to git converter\n\nExport structure of database to object files for control version system\n\n## structure of result directories\n```\ncasts:\n ...\ndata:\n schema1:\n table1.sql\n schema2:\n ...\nextensions:\n ...\npublications:\n ...\nschemas:\n schema1:\n aggregate:\n ...\n domains:\n ...\n functions:\n ...\n operators:\n ...\n sequences:\n ...\n tables:\n ...\n triggers:\n ...\n types:\n ...\n views:\n ...\n schema2\n ...\n```\n\n## installation\n\n```\npip install pg-export\n```\n\n## usage\n\n```\nusage: pg_export [--help] [--version] [--clean] [--echo-queries] [-h HOST] [-p PORT] [-U USER] [-W PASSWORD] [-j JOBS] [-z TIMEZONE] database out_dir\n\npositional arguments:\n database source database name\n out_dir directory for object files\n\noptions:\n --help show this help message and exit\n --version show program's version number and exit\n --clean clean out_dir if not empty (env variable PG_EXPORT_AUTOCLEAN=true)\n --echo-queries echo commands sent to server\n -h HOST, --host HOST host for connect db (env variable PG_HOST=<host>)\n -p PORT, --port PORT port for connect db (env variable PG_PORT=<port>)\n -U USER, --user USER user for connect db (env variable PG_USER=<user>)\n -W PASSWORD, --password PASSWORD\n password for connect db (env variable PG_PASSWORD=<password>)\n -j JOBS, --jobs JOBS number of connections\n -z TIMEZONE, --timezone TIMEZONE\n timezone for constraints, partitions etc.\n```\n\n## examples\n\n```\npg_export -h 127.0.0.1 -p 5432 -U postgres -j 4 my_database /tmp/my_database_structure/\n```\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "pg to git converter",
"version": "3.7.3",
"project_urls": {
"Bug Tracker": "https://github.com/comagic/pg_export/issues",
"Documentation": "https://github.com/comagic/pg_export/blob/master/README.md",
"Homepage": "https://github.com/comagic/pg_export"
},
"split_keywords": [
"postgresql",
" git",
" ci/cd"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4c93b6e21de7fff4e6fb569289090e12441f9b013e545f89219e06232edd8402",
"md5": "0dff8d92661bf029187762c714529687",
"sha256": "92a6474472ae1ff49ec95b47eb33fc8be1796ea872ceb5213f98b39de4f68968"
},
"downloads": -1,
"filename": "pg_export-3.7.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0dff8d92661bf029187762c714529687",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 87906,
"upload_time": "2024-11-20T13:59:26",
"upload_time_iso_8601": "2024-11-20T13:59:26.692038Z",
"url": "https://files.pythonhosted.org/packages/4c/93/b6e21de7fff4e6fb569289090e12441f9b013e545f89219e06232edd8402/pg_export-3.7.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f38b5869578ee6db9adc68c56bd89b921ccfabbdfc7efaf7f6df9adbf29369b0",
"md5": "e19b76bd4128a8f8e9df936d5fae8f8e",
"sha256": "5e7d99a3973b00870b5c824cd44c1c24ebd09bf0ef12d17cbd2553e429021c0e"
},
"downloads": -1,
"filename": "pg_export-3.7.3.tar.gz",
"has_sig": false,
"md5_digest": "e19b76bd4128a8f8e9df936d5fae8f8e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 51796,
"upload_time": "2024-11-20T13:59:27",
"upload_time_iso_8601": "2024-11-20T13:59:27.875947Z",
"url": "https://files.pythonhosted.org/packages/f3/8b/5869578ee6db9adc68c56bd89b921ccfabbdfc7efaf7f6df9adbf29369b0/pg_export-3.7.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-20 13:59:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "comagic",
"github_project": "pg_export",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pg-export"
}