# python-mysql2postgresql
## Status : Alpha
## Installation -- Pure Python
```
pip install python-mysql2postgresql
```
## Usage Python file
```
from mysql2postgresql import mysql2postgresql
a = mysql2postgresql()
#connect mysql server
a.connect_mysql(host='localhost',
port='3306',
user='root',
passwd='',
db='database_name')
#connect postgresql server
a.connect_postgresql(host='localhost',
port=5432,
user='postgres',
password='postgres',
database='database_name')
# manual table to transfer data -> default all table in database
a.tables = ['table1', 'table2', ...]
# manual without table to transfer data -> default empty
a.without = ['table3', 'table4', ...]
# manual limit to query data -> default 10000
# not limit -> a.limit = 0
a.limit = 10000
# program run
a.run()
```
## Usage command line
you can create demo.py file from example by
```
python -m mysql2postgresql export_example
```
you can run convert mysql to postgresql (all table in database) by
```
python -m mysql2postgresql convert --mysql_host=localhost --mysql_port=3306 --mysql_user=root --mysql_password= --mysql_database=db_name --postgresql_host=localhost --postgresql_port=5432 --postgresql_user=postgres --postgresql_password=postgres --postgresql_database=database_name
```
Raw data
{
"_id": null,
"home_page": "",
"name": "python-mysql2postgresql",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python mysql2postgresql python-mysql2postgresql",
"author": "DewBloodmetal",
"author_email": "dewscan001@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/61/ed/e96ab276396a1c9f67a6c9abad3d923081e97d5d4cf1bb021e1fdef5bfbc/python-mysql2postgresql-0.1.1.tar.gz",
"platform": null,
"description": "# python-mysql2postgresql\r\n\r\n## Status : Alpha\r\n\r\n## Installation -- Pure Python\r\n```\r\n pip install python-mysql2postgresql\r\n```\r\n\r\n## Usage Python file\r\n\r\n```\r\nfrom mysql2postgresql import mysql2postgresql\r\n\r\na = mysql2postgresql()\r\n\r\n#connect mysql server\r\na.connect_mysql(host='localhost',\r\n port='3306',\r\n user='root',\r\n passwd='',\r\n db='database_name')\r\n\r\n#connect postgresql server\r\na.connect_postgresql(host='localhost', \r\n port=5432,\r\n user='postgres', \r\n password='postgres', \r\n database='database_name') \r\n\r\n\r\n# manual table to transfer data -> default all table in database\r\na.tables = ['table1', 'table2', ...]\r\n\r\n# manual without table to transfer data -> default empty\r\na.without = ['table3', 'table4', ...]\r\n\r\n# manual limit to query data -> default 10000 \r\n# not limit -> a.limit = 0 \r\na.limit = 10000\r\n\r\n\r\n# program run\r\na.run() \r\n\r\n```\r\n\r\n\r\n## Usage command line\r\n\r\nyou can create demo.py file from example by\r\n```\r\npython -m mysql2postgresql export_example\r\n```\r\n\r\nyou can run convert mysql to postgresql (all table in database) by \r\n```\r\npython -m mysql2postgresql convert --mysql_host=localhost --mysql_port=3306 --mysql_user=root --mysql_password= --mysql_database=db_name --postgresql_host=localhost --postgresql_port=5432 --postgresql_user=postgres --postgresql_password=postgres --postgresql_database=database_name\r\n```\r\n\r\n",
"bugtrack_url": null,
"license": "",
"summary": "python-mysql2postgresql",
"version": "0.1.1",
"split_keywords": [
"python",
"mysql2postgresql",
"python-mysql2postgresql"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "61ede96ab276396a1c9f67a6c9abad3d923081e97d5d4cf1bb021e1fdef5bfbc",
"md5": "8ebbfe7bdc633be1281c2d5bddc366b1",
"sha256": "8fecc9bc8b7e720f8d45a2c261a82594550e98e99c8b0cf8ce84dbde7bdd1e8e"
},
"downloads": -1,
"filename": "python-mysql2postgresql-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "8ebbfe7bdc633be1281c2d5bddc366b1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4553,
"upload_time": "2023-01-10T13:44:25",
"upload_time_iso_8601": "2023-01-10T13:44:25.283928Z",
"url": "https://files.pythonhosted.org/packages/61/ed/e96ab276396a1c9f67a6c9abad3d923081e97d5d4cf1bb021e1fdef5bfbc/python-mysql2postgresql-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-10 13:44:25",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "python-mysql2postgresql"
}