wrapper-mysql-connector


Namewrapper-mysql-connector JSON
Version 0.0.2 PyPI version JSON
download
home_pageNone
SummaryWrapper não oficial do mysql-connector
upload_time2024-09-06 17:24:57
maintainerNone
docs_urlNone
authorRenan de Souza Rodrigues
requires_pythonNone
licenseMIT License
keywords mysql mysql-connector wrapper wrapper-mysql wrapper-mysql-connector
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # wrapper to mysql-connector

- close and open connection `@name_task` -> your def
- **connected()** return connection in `MySQL`
- **get_cursor()** return instance of `cursor`
- **desconected()** return bool for `connection` sucess or fail
- ClassConnection() -> `constructor` of `MySQLConnector`

## EXAMPLE:

```
from wrapper import ClassConnectionparams = {
'host':'your_host',
'user':'your_user',
'password':'your_password',
'port':3306,
}
params = {
'host':'your_host',
'user':'your_user',
'password':'your_password',
'port':3306,
}
cls = ClassConnection(\*\*params)
conn = cls.connected()
cur = cls.get_cursor()cur.execute('your_operation_sql')
conn.commit()
```


## EXAMPLE 2:

```
from wrapper import ClassConnectionparams = {
    'host':'your_host',
    'user':'your_user',
    'password':'your_password',
    'port':3306,
}cls = ClassConnection(\*\*params)
conn = cls.connected()
cur = cls.get_cursor()@cls.query
def select_all(table)
    cur.execute(f'select \* from {table}') # autoclosing cursor and connection@cls.update
def update(table,column,value,id)
    cur.execute(f'update {table} set {column} = {value} where id = {id}')  # autoclosing cursor and connection and autocommit
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "wrapper-mysql-connector",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "mysql, mysql-connector, wrapper, wrapper-mysql, wrapper-mysql-connector",
    "author": "Renan de Souza Rodrigues",
    "author_email": "renanrodrigues7110@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/be/52/08da322c5cf02fdb46aeccd3f000a0c4e6315a56a92ee3570d92f2465765/wrapper_mysql_connector-0.0.2.tar.gz",
    "platform": null,
    "description": "# wrapper to mysql-connector\r\n\r\n- close and open connection `@name_task` -> your def\r\n- **connected()** return connection in `MySQL`\r\n- **get_cursor()** return instance of `cursor`\r\n- **desconected()** return bool for `connection` sucess or fail\r\n- ClassConnection() -> `constructor` of `MySQLConnector`\r\n\r\n## EXAMPLE:\r\n\r\n```\r\nfrom wrapper import ClassConnectionparams = {\r\n'host':'your_host',\r\n'user':'your_user',\r\n'password':'your_password',\r\n'port':3306,\r\n}\r\nparams = {\r\n'host':'your_host',\r\n'user':'your_user',\r\n'password':'your_password',\r\n'port':3306,\r\n}\r\ncls = ClassConnection(\\*\\*params)\r\nconn = cls.connected()\r\ncur = cls.get_cursor()cur.execute('your_operation_sql')\r\nconn.commit()\r\n```\r\n\r\n\r\n## EXAMPLE 2:\r\n\r\n```\r\nfrom wrapper import ClassConnectionparams = {\r\n    'host':'your_host',\r\n    'user':'your_user',\r\n    'password':'your_password',\r\n    'port':3306,\r\n}cls = ClassConnection(\\*\\*params)\r\nconn = cls.connected()\r\ncur = cls.get_cursor()@cls.query\r\ndef select_all(table)\r\n    cur.execute(f'select \\* from {table}') # autoclosing cursor and connection@cls.update\r\ndef update(table,column,value,id)\r\n    cur.execute(f'update {table} set {column} = {value} where id = {id}')  # autoclosing cursor and connection and autocommit\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Wrapper n\u00e3o oficial do mysql-connector",
    "version": "0.0.2",
    "project_urls": null,
    "split_keywords": [
        "mysql",
        " mysql-connector",
        " wrapper",
        " wrapper-mysql",
        " wrapper-mysql-connector"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "be5208da322c5cf02fdb46aeccd3f000a0c4e6315a56a92ee3570d92f2465765",
                "md5": "ae166f333392ab56bff9c1e217348778",
                "sha256": "64927a11e97989227d3aa459aaf9fc28fc3bfe299b60450229326a693b24ece1"
            },
            "downloads": -1,
            "filename": "wrapper_mysql_connector-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "ae166f333392ab56bff9c1e217348778",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3471,
            "upload_time": "2024-09-06T17:24:57",
            "upload_time_iso_8601": "2024-09-06T17:24:57.890917Z",
            "url": "https://files.pythonhosted.org/packages/be/52/08da322c5cf02fdb46aeccd3f000a0c4e6315a56a92ee3570d92f2465765/wrapper_mysql_connector-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-06 17:24:57",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "wrapper-mysql-connector"
}
        
Elapsed time: 0.28829s