MySQLPandas


NameMySQLPandas JSON
Version 0.0.19 PyPI version JSON
download
home_pagehttps://github.com/Sota-Nakashima/MySQLPandas
SummaryMySQLPandas: simple connector between MySQL(MariaDB) and Pandas
upload_time2023-06-08 06:57:29
maintainer
docs_urlNone
authorSota-Nakashima
requires_python
licenseGPLv2
keywords python pandas database
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            MySQLPandas
============
[![pages-build-deployment](https://github.com/Sota-Nakashima/MySQLPandas/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/Sota-Nakashima/MySQLPandas/actions/workflows/pages/pages-build-deployment)
[![Version](https://img.shields.io/badge/stable-main-gree)](https://github.com/Sota-Nakashima/MySQLPandas)
[![PyPI](https://img.shields.io/badge/PyPI-0.0.19-blue)](https://pypi.org/project/MySQLPandas/)
[![License: GPL v2](https://img.shields.io/badge/License-GPL_v2-blue.svg)](https://github.com/Sota-Nakashima/MySQLPandas/blob/main/LICENCE)
#  Overview
Simple connector between MySQL(MariaDB) and Pandas

## Description
This tool is primarily intended to help Python users easily handle databases.
It uses Pandas as its base, so it should be easy to use even for those who are not familiar with databases.
The tool supports MySQL or MariaDB as the database engine.
## Demo
* Make new table and install dataframe or csv
```python:tutoring.py
from MySQLPandas.core import MySQLPandas
with MySQLPandas("hoge","hoge_db",initfile_path="hoge.ini") as obj:
    obj.makeTable("sample_table",df_path="sample.csv")
    obj.showTableinfo("sample_table")
    obj.insertRecord("sample_table",df_path="sample.csv")
```

Regarding other functions, see [here](https://sota-nakashima.github.io/MySQLPandas/MySQLPandas.html).

## Note
In MySQLPandas function of insertRecord, it doesn't allow any difference on table denfinition.(If it has slightly differcence, MySQLPandas raise error.)  
```
raise PandasMySQLError("Not match Table frame")
MySQLPandas.lib.ErrorClass.PandasMySQLError: Not match Table frame
```
If you want to change table definition, please see below.  
* Change string type column  
  You can change table denfiniton automatically. Please rewrite  "Strict_Mode = False" in "insertRecord" method.
* Change int or float type column  
  Sorry, you can't change it in MySQLPandas. Please rewrite it by using "executeSQLcommand" method. 

0.0.19 ~
* Columns are no longer automatically assigned an underscore instead of a space when the database is created. However, it is recommended to replace them with underbars as much as possible, since spaces may cause unintended behavior.
## Setup password.ini
In default, you need to input DB password in your console every time.  
If you felt bothered, you avoid this by creating "password.ini" file.  
In GitHub page, it's put [sample file](https://github.com/Sota-Nakashima/MySQLPandas/blob/main/password_sample.ini).
## Requirement
* MySQL(MariaDB)  
The version of Auther's MariaDB is 5.5.68-MariaDB MariaDB Server.  
Don't try the newest version so please check your MariaDB version.
* Pandas <= 1.5.3
* Python 3.*
* mysql-connector-python <= 8.0.29
* tqdm <= 4.65.0

## Developer Guide
See [here](https://sota-nakashima.github.io/MySQLPandas/).
## Install
Install through pip.
```
pip install MySQLPandas
```

## Licence

[GNU GPLv2](https://github.com/Sota-Nakashima/MySQLPandas/blob/main/LICENSE)

## Author

[Sota Nakashima](https://github.com/Sota-Nakashima)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Sota-Nakashima/MySQLPandas",
    "name": "MySQLPandas",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Python,Pandas,Database",
    "author": "Sota-Nakashima",
    "author_email": "souta.nakashima2001@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2a/6f/ca3e11623c0f63337892acb901b2d1a9a6b63a632486f1348da4af1cef00/MySQLPandas-0.0.19.tar.gz",
    "platform": null,
    "description": "MySQLPandas\n============\n[![pages-build-deployment](https://github.com/Sota-Nakashima/MySQLPandas/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/Sota-Nakashima/MySQLPandas/actions/workflows/pages/pages-build-deployment)\n[![Version](https://img.shields.io/badge/stable-main-gree)](https://github.com/Sota-Nakashima/MySQLPandas)\n[![PyPI](https://img.shields.io/badge/PyPI-0.0.19-blue)](https://pypi.org/project/MySQLPandas/)\n[![License: GPL v2](https://img.shields.io/badge/License-GPL_v2-blue.svg)](https://github.com/Sota-Nakashima/MySQLPandas/blob/main/LICENCE)\n#  Overview\nSimple connector between MySQL(MariaDB) and Pandas\n\n## Description\nThis tool is primarily intended to help Python users easily handle databases.\nIt uses Pandas as its base, so it should be easy to use even for those who are not familiar with databases.\nThe tool supports MySQL or MariaDB as the database engine.\n## Demo\n* Make new table and install dataframe or csv\n```python:tutoring.py\nfrom MySQLPandas.core import MySQLPandas\nwith MySQLPandas(\"hoge\",\"hoge_db\",initfile_path=\"hoge.ini\") as obj:\n    obj.makeTable(\"sample_table\",df_path=\"sample.csv\")\n    obj.showTableinfo(\"sample_table\")\n    obj.insertRecord(\"sample_table\",df_path=\"sample.csv\")\n```\n\nRegarding other functions, see [here](https://sota-nakashima.github.io/MySQLPandas/MySQLPandas.html).\n\n## Note\nIn MySQLPandas function of insertRecord, it doesn't allow any difference on table denfinition.(If it has slightly differcence, MySQLPandas raise error.)  \n```\nraise PandasMySQLError(\"Not match Table frame\")\nMySQLPandas.lib.ErrorClass.PandasMySQLError: Not match Table frame\n```\nIf you want to change table definition, please see below.  \n* Change string type column  \n  You can change table denfiniton automatically. Please rewrite  \"Strict_Mode = False\" in \"insertRecord\" method.\n* Change int or float type column  \n  Sorry, you can't change it in MySQLPandas. Please rewrite it by using \"executeSQLcommand\" method. \n\n0.0.19 ~\n* Columns are no longer automatically assigned an underscore instead of a space when the database is created. However, it is recommended to replace them with underbars as much as possible, since spaces may cause unintended behavior.\n## Setup password.ini\nIn default, you need to input DB password in your console every time.  \nIf you felt bothered, you avoid this by creating \"password.ini\" file.  \nIn GitHub page, it's put [sample file](https://github.com/Sota-Nakashima/MySQLPandas/blob/main/password_sample.ini).\n## Requirement\n* MySQL(MariaDB)  \nThe version of Auther's MariaDB is 5.5.68-MariaDB MariaDB Server.  \nDon't try the newest version so please check your MariaDB version.\n* Pandas <= 1.5.3\n* Python 3.*\n* mysql-connector-python <= 8.0.29\n* tqdm <= 4.65.0\n\n## Developer Guide\nSee [here](https://sota-nakashima.github.io/MySQLPandas/).\n## Install\nInstall through pip.\n```\npip install MySQLPandas\n```\n\n## Licence\n\n[GNU GPLv2](https://github.com/Sota-Nakashima/MySQLPandas/blob/main/LICENSE)\n\n## Author\n\n[Sota Nakashima](https://github.com/Sota-Nakashima)\n",
    "bugtrack_url": null,
    "license": "GPLv2",
    "summary": "MySQLPandas: simple connector between MySQL(MariaDB) and Pandas",
    "version": "0.0.19",
    "project_urls": {
        "Homepage": "https://github.com/Sota-Nakashima/MySQLPandas"
    },
    "split_keywords": [
        "python",
        "pandas",
        "database"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ee641c4889fe1d3b5dfc927e9007cf3e811edd491f0bce616dec3b0d90b1a3b4",
                "md5": "abe1c8f5f489094f958f7ad8a2d2d495",
                "sha256": "a6ce22f813e12ccc343397b0a18313b5ff1d657879a92653f5f2a912e7c34208"
            },
            "downloads": -1,
            "filename": "MySQLPandas-0.0.19-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "abe1c8f5f489094f958f7ad8a2d2d495",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 15490,
            "upload_time": "2023-06-08T06:57:27",
            "upload_time_iso_8601": "2023-06-08T06:57:27.549039Z",
            "url": "https://files.pythonhosted.org/packages/ee/64/1c4889fe1d3b5dfc927e9007cf3e811edd491f0bce616dec3b0d90b1a3b4/MySQLPandas-0.0.19-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2a6fca3e11623c0f63337892acb901b2d1a9a6b63a632486f1348da4af1cef00",
                "md5": "a4ddb40210b35413f5b132bb3b1985d7",
                "sha256": "21a47369228aa33f7c424bde8137a9f9c6fcd26a1dba95e498814813579d6f16"
            },
            "downloads": -1,
            "filename": "MySQLPandas-0.0.19.tar.gz",
            "has_sig": false,
            "md5_digest": "a4ddb40210b35413f5b132bb3b1985d7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15892,
            "upload_time": "2023-06-08T06:57:29",
            "upload_time_iso_8601": "2023-06-08T06:57:29.692306Z",
            "url": "https://files.pythonhosted.org/packages/2a/6f/ca3e11623c0f63337892acb901b2d1a9a6b63a632486f1348da4af1cef00/MySQLPandas-0.0.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-08 06:57:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Sota-Nakashima",
    "github_project": "MySQLPandas",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "mysqlpandas"
}
        
Elapsed time: 0.08569s