## 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/01/0c/969d8ca108221de0f6d62ddf51715b8c69ee26817b1e9efa18635640da33/pg-export-3.8.0.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.8.0",
"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": "ac7032ed4214eb20a436d518acd8b224147b07247d8f9a86be5c059b5f3868ba",
"md5": "6f8bcaab68561e617e16c65f3df67d2c",
"sha256": "474b1ba105d85ca44a99e5e6de95df364dc88a8b25493593b5f1ad7b7872dc0a"
},
"downloads": -1,
"filename": "pg_export-3.8.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6f8bcaab68561e617e16c65f3df67d2c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 51905,
"upload_time": "2025-02-08T15:07:55",
"upload_time_iso_8601": "2025-02-08T15:07:55.431061Z",
"url": "https://files.pythonhosted.org/packages/ac/70/32ed4214eb20a436d518acd8b224147b07247d8f9a86be5c059b5f3868ba/pg_export-3.8.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "010c969d8ca108221de0f6d62ddf51715b8c69ee26817b1e9efa18635640da33",
"md5": "73954b53c6921278c2f5c5eb0ba44849",
"sha256": "15dc9ffb74267322cc2818eda20a0377822d1db2e920e37a09fd6d2994a6fe4d"
},
"downloads": -1,
"filename": "pg-export-3.8.0.tar.gz",
"has_sig": false,
"md5_digest": "73954b53c6921278c2f5c5eb0ba44849",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 30415,
"upload_time": "2025-02-08T15:07:59",
"upload_time_iso_8601": "2025-02-08T15:07:59.028298Z",
"url": "https://files.pythonhosted.org/packages/01/0c/969d8ca108221de0f6d62ddf51715b8c69ee26817b1e9efa18635640da33/pg-export-3.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-08 15:07:59",
"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"
}