Skip to main content

A lazy MySQL client for Python.

Project description

lazy_mysql

A lightweight Python library for simplified MySQL database operations.

Features

  • Unified SQL execution interface
  • Export table structure to Markdown format
  • Query result formatting
  • Simplified insert, update, and select operations
  • Transaction support

Install / upgrade / uninstall

pip install lazy-mysql
pip install --upgrade lazy-mysql
pip uninstall lazy-mysql

Quick Start

from lazy_mysql.executor import SQLExecutor

# Initialize connection
config = {
    'host': 'your_mysql_host',
    'user': 'your_username',
    'password': 'your_password',
    'database': 'your_database'
}

executor = SQLExecutor(config)

# Query example
result = executor.select('your_table', ['column1', 'column2'])
print(result)

# Insert example
executor.insert('your_table', {'column1': 'value1', 'column2': 'value2'}, commit=True)

Requirements

  • mysql-connector-python>=9.4.0
  • pandas>=2.3.1

Note: Compatibility with versions below these requirements has not been verified.

PyPI

Project available on PyPI: https://pypi.org/project/lazy-mysql/

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lazy_mysql-0.2.6.3.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lazy_mysql-0.2.6.3-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file lazy_mysql-0.2.6.3.tar.gz.

File metadata

  • Download URL: lazy_mysql-0.2.6.3.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for lazy_mysql-0.2.6.3.tar.gz
Algorithm Hash digest
SHA256 547825d09bd1391784b11c4fbf8ab41e18b188ffa6b6c441a5c7bb767db7d2ff
MD5 7c134a999d1c34eb006a1454c33cdbf1
BLAKE2b-256 c4de15cade447d3701a404811e8f234b8dd8971a858a02f28bfbc5abc1c3d78b

See more details on using hashes here.

File details

Details for the file lazy_mysql-0.2.6.3-py3-none-any.whl.

File metadata

  • Download URL: lazy_mysql-0.2.6.3-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for lazy_mysql-0.2.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d0f6c127b4a41ba52ddb9fc25f8e6a6e217ab81d2d7c67bd8ffa30ccd8771ece
MD5 c3510ac6db133d94e471f0fb5dd7029d
BLAKE2b-256 ffa20e09190e5eb19a278a9559dbeac141480e2ec311fb0998e2a0a83f7e243e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page