{ "info": { "author": "Dacker", "author_email": "hello@dacker.co", "bugtrack_url": null, "classifiers": [], "description": "pymy\n=====\n\nA python package to easily send data to MySQL\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n1) Installation\n'''''''''''''''\n\nOpen a terminal and install pymy package\n \n::\n\n pip install pymy\n\n\n2) Use\n''''''\n\n1) Be sure that you have set environment variables with Redshift credentials like this:\n\n\n::\n\n export MYSQL_{INSTANCE}_DATABASE=\"\"\n export MYSQL_{INSTANCE}_USERNAME=\"\"\n export MYSQL_{INSTANCE}_HOST=\"\"\n export MYSQL_{INSTANCE}_PORT=\"\"\n export MYSQL_{INSTANCE}_PASSWORD=\"\"\n\n2) Be also sure that your IP address is authorized for the mysql cluster/instance.\n\n3) Prepare your data like that:\n\n\n.. code:: python\n\n data = {\n \"table_name\" : 'name_of_the_redshift_schema' + '.' + 'name_of_the_redshift_table'\n \"columns_name\" : [first_column_name,second_column_name,...,last_column_name],\n \"rows\" : [[first_raw_value,second_raw_value,...,last_raw_value],...]\n }\n\n4) Send your data (use the same {INSTANCE} parameter as environment variables):\n\n\n.. code:: python\n\n import pymy\n pymy.send_to_redshift(instance, data, replace=True, batch_size=1000, types=None, primary_key=(), create_boolean=False)\n\n- replace (default=True) argument allows you to replace or append data\n in the table\n- batch\\_size (default=1000) argument also exists to send data in\n batchs\n- types, primary_key and create_boolean are explained below\n\n3) First Example\n''''''''''''''''\n\nYou have a table called dog in you animal scheme. This table has two columns : 'name' and 'size'.\nYou want to add two dogs (= two rows) : Pif which is big and Milou which is small.\n*data* will be like that:\n\n.. code:: python\n\n import pymy\n data = {\n \"table_name\" : 'animal.dog'\n \"columns_name\" : ['name','size'],\n \"rows\" : [['Pif','big'], ['Milou','small']]\n }\n pymy.send_to_redshift({INSTANCE},data)\n\n4) Function *create_table*\n''''''''''''''''''''''''''\npymy has a *create_table* function with this signature:\n\n.. code:: python\n\n import pymy\n pymy.create_table({INSTANCE}, data, primary_key=(), types=None)\n\nThis function is automatically called in the *send_to_redshift* function if the table is not created. You can also call it with the \"create_boolean\" parameter of the *send_to_reshift* function or by setting \"primary_key\" or \"types\" parameters.\n\n- primary_key : if you have 3 columns (ie: columns_name=[a,b,c]) and you want to set b as primary key, set primary_key=(b)\n- types: *create_table* function guesses types of each column. But you can set a \"types\" argument. It is a dictionary like {'b': 'VARCHAR(12)'} or {'b': 'INTEGER NOT NULL'} to set types of b column.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dacker-team/pyred", "keywords": "send data mysql easy", "license": "Copyright (c) 2019, Dacker\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n", "maintainer": "", "maintainer_email": "", "name": "pymy", "package_url": "https://pypi.org/project/pymy/", "platform": "", "project_url": "https://pypi.org/project/pymy/", "project_urls": { "Homepage": "https://github.com/dacker-team/pyred" }, "release_url": "https://pypi.org/project/pymy/0.0.8/", "requires_dist": null, "requires_python": "", "summary": "Easily send data to MySQL", "version": "0.0.8" }, "last_serial": 4931191, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "4c7858cf38203b141f578c6d5c6cf1fe", "sha256": "674b63537de1f0472f4b038d9838110a26197dc7ebce2f6391bd3c1cfdace85c" }, "downloads": -1, "filename": "pymy-0.0.1.tar.gz", "has_sig": false, "md5_digest": "4c7858cf38203b141f578c6d5c6cf1fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3189, "upload_time": "2019-02-19T14:29:46", "url": "https://files.pythonhosted.org/packages/bd/2b/aafaf00fa63cf2c1fbd5ed0f9c3174d3d309ec301453b91f2af461ddafce/pymy-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "6a67bf8537103d8e19fadaed77b0ba57", "sha256": "4742cbfc74852d3c0f7f8ae85bd3de60e39f8c6a3c726962eca55e447b9463d4" }, "downloads": -1, "filename": "pymy-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "6a67bf8537103d8e19fadaed77b0ba57", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 9104, "upload_time": "2019-02-19T16:06:02", "url": "https://files.pythonhosted.org/packages/cc/98/0dcbd9dfb4f26baa5181902337af5199789250e21b3c95bc77ebc9f1b740/pymy-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8ace5c76bcb4f1448ff9e11e99d33c87", "sha256": "3694f67273a62a5e5a3a946b7757fae04811c1734c2792fb7fae1b2a3b32c90d" }, "downloads": -1, "filename": "pymy-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8ace5c76bcb4f1448ff9e11e99d33c87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5703, "upload_time": "2019-02-19T16:05:53", "url": "https://files.pythonhosted.org/packages/19/89/1023a13fc853645aa42d2804ced6686e386f0eba7e46547f4dca94797c89/pymy-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "23119d052ded9ab5c4598d8da70b0bfa", "sha256": "531f531f6234be2a7a11ee3c6387fa8ff695bc683c2d5c90404754a56c197565" }, "downloads": -1, "filename": "pymy-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "23119d052ded9ab5c4598d8da70b0bfa", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 9190, "upload_time": "2019-02-19T17:07:38", "url": "https://files.pythonhosted.org/packages/48/7d/abb0bf028e2e95dcc7fb2ab17a7d57248d2246665e2efa4ca9b3317cf3be/pymy-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b515ae58778f64be63d84c656f3d03c8", "sha256": "dff297946fc5b81ddd8c144269b551e35fe951770051a46116d4bf7a46001683" }, "downloads": -1, "filename": "pymy-0.0.3.tar.gz", "has_sig": false, "md5_digest": "b515ae58778f64be63d84c656f3d03c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5743, "upload_time": "2019-02-19T17:07:21", "url": "https://files.pythonhosted.org/packages/79/d0/a5fecde075a93ccd4744aaa12765c545b4ab3dec0d1b01bcf3206a4a6900/pymy-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "8bcc1f65957ecb40c3c3b04267836d72", "sha256": "46619d75e82096098b0d7bc5bb58a302cc5a1224e82ebee9aa579aadd4c9c4ca" }, "downloads": -1, "filename": "pymy-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "8bcc1f65957ecb40c3c3b04267836d72", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 9908, "upload_time": "2019-02-21T07:33:44", "url": "https://files.pythonhosted.org/packages/1a/ed/c9a3802a97d5b87d2d51c51ce2178e1842adcd413804ddeab80db8a89e50/pymy-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "532f67bab85b5d00942663650ad49ca4", "sha256": "3192575c4382a0c602f210f9e0fea2b5fba13ecb4ea1fa3e68459520d03eabcf" }, "downloads": -1, "filename": "pymy-0.0.4.tar.gz", "has_sig": false, "md5_digest": "532f67bab85b5d00942663650ad49ca4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6132, "upload_time": "2019-02-21T07:33:35", "url": "https://files.pythonhosted.org/packages/fa/96/7db9f515fe9ff6b1105b5abe2cf8b78ccc267ab4bf003ce383cbf7c6f629/pymy-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "baf4a14c08712303e29651abe2438278", "sha256": "c7e1b0ea4851ad3e81a37820a1237e22221dca716af28641926796618011f8aa" }, "downloads": -1, "filename": "pymy-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "baf4a14c08712303e29651abe2438278", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 9946, "upload_time": "2019-03-12T12:49:28", "url": "https://files.pythonhosted.org/packages/5d/67/156b51cc171bd4a5bc075cd4c52ec056750854f4ceca93390772596f534d/pymy-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dac4d9af957896874a873d875134c4b2", "sha256": "04c25123c0c3262c7d88fd642d4f2ef614f0b9a1f07854a25a6a037473663d85" }, "downloads": -1, "filename": "pymy-0.0.5.tar.gz", "has_sig": false, "md5_digest": "dac4d9af957896874a873d875134c4b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6167, "upload_time": "2019-03-12T12:49:15", "url": "https://files.pythonhosted.org/packages/60/ce/9c3d66f60208e64afe851da2fe9a8141e188ca6e3abba73ee693fce7dfcf/pymy-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "8ef54b7ca9265c46f0af3fe5eb2166b4", "sha256": "040fbe769ffbfc4b7b3c24cbf05812c06ec040ccb2a4dc7d60bab29e1d57b079" }, "downloads": -1, "filename": "pymy-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "8ef54b7ca9265c46f0af3fe5eb2166b4", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 9956, "upload_time": "2019-03-12T12:53:55", "url": "https://files.pythonhosted.org/packages/48/9a/f9c5e8a245ecb37544cbf7fae4d8aaed2aa203a454bb1502ca2fab8d3c0c/pymy-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e938c2060f25acfaedf867c3e2c61cd7", "sha256": "2d2913c7dbd66fb3ff8122c6209d6906d1fb56a8c56a76d76cbf5f5d8b5bb9d3" }, "downloads": -1, "filename": "pymy-0.0.6.tar.gz", "has_sig": false, "md5_digest": "e938c2060f25acfaedf867c3e2c61cd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6177, "upload_time": "2019-03-12T12:54:03", "url": "https://files.pythonhosted.org/packages/72/b5/9ed4cfa438f708c52ac6582f03041eed5113953c7933504f92e2c726d1e7/pymy-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "e41b47d524e05e18c3b019a85eaf03bd", "sha256": "1bee4acbeebadca134c92c59c4ee989f8bfcbd5bace88ca522b7d61aeb1c136a" }, "downloads": -1, "filename": "pymy-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "e41b47d524e05e18c3b019a85eaf03bd", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 9971, "upload_time": "2019-03-12T13:02:22", "url": "https://files.pythonhosted.org/packages/cf/a3/37ac722975187bfd9bce104d7b945ad4b353b2c50fdd8767a0fe2ba935b8/pymy-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f08a4caee811fd813ced856fde7a7442", "sha256": "104db2237a633a689e2b46e4698f7fac3359cf5271fde2382583e64191ee2195" }, "downloads": -1, "filename": "pymy-0.0.7.tar.gz", "has_sig": false, "md5_digest": "f08a4caee811fd813ced856fde7a7442", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6188, "upload_time": "2019-03-12T13:02:16", "url": "https://files.pythonhosted.org/packages/6b/90/7f966f9635b2392d322e0df13d50f5d64df430a8a8aec5986b252fbae133/pymy-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "e481de959b431bd0fe23b502129d24d4", "sha256": "0d2ec690da0c8aa34dd356c3077175030154be05ea1839e3eeb2d42ad0b0acf9" }, "downloads": -1, "filename": "pymy-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "e481de959b431bd0fe23b502129d24d4", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 10018, "upload_time": "2019-03-12T17:39:07", "url": "https://files.pythonhosted.org/packages/62/d7/ce31a8917aaa6273066a29ac4a46ae135a42f554b0cada35bc3494273b3a/pymy-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9b5196fab02bed17e4d2b1fa4a1e516", "sha256": "36d7fb0e68f266b26294855b8d0eed70668b1f6c1907dca42184a334bfc24d03" }, "downloads": -1, "filename": "pymy-0.0.8.tar.gz", "has_sig": false, "md5_digest": "a9b5196fab02bed17e4d2b1fa4a1e516", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6229, "upload_time": "2019-03-12T17:39:02", "url": "https://files.pythonhosted.org/packages/15/a4/d10cdd86d4e63dd1c9cf696a070ffd86b3a1e50bd067f122b876c432f9f9/pymy-0.0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e481de959b431bd0fe23b502129d24d4", "sha256": "0d2ec690da0c8aa34dd356c3077175030154be05ea1839e3eeb2d42ad0b0acf9" }, "downloads": -1, "filename": "pymy-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "e481de959b431bd0fe23b502129d24d4", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 10018, "upload_time": "2019-03-12T17:39:07", "url": "https://files.pythonhosted.org/packages/62/d7/ce31a8917aaa6273066a29ac4a46ae135a42f554b0cada35bc3494273b3a/pymy-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9b5196fab02bed17e4d2b1fa4a1e516", "sha256": "36d7fb0e68f266b26294855b8d0eed70668b1f6c1907dca42184a334bfc24d03" }, "downloads": -1, "filename": "pymy-0.0.8.tar.gz", "has_sig": false, "md5_digest": "a9b5196fab02bed17e4d2b1fa4a1e516", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6229, "upload_time": "2019-03-12T17:39:02", "url": "https://files.pythonhosted.org/packages/15/a4/d10cdd86d4e63dd1c9cf696a070ffd86b3a1e50bd067f122b876c432f9f9/pymy-0.0.8.tar.gz" } ] }