Skip to main content

Flexi MySQL

PyPI version PyPI Downloads Downloads License: MIT

Flexi MySQL is a Python module designed to streamline the process of interacting with MySQL databases. This module offers a variety of functions that significantly reduce the need for manually typing queries, executing them, and handling the results or committing data to the database. Additionally, for scenarios requiring raw SQL queries, the module provides support for creating such queries using MySQL

Examples

Fetching results from the database

import flexi_mysql
myobj = flexi_mysql.connect(host="localhost", user = "root",database="test", password="")
print(myobj.fetch_result(tables = ["t1"], where="id = 2"))

Close connection

import flexi_mysql 
myobj = flexi_mysql.connect(host="localhost", user = "root",database="test", password="")
myobj.close_connection()

Update value in a table

import flexi_mysql
myobj =  flexi_mysql.connect(host="localhost", user="root", database="test")
myobj.update_value(table_name="t1", columns = ["name"], value="Eternity", where = "id = 4")

Fetching results from database using with statement

import flexi_mysql
with flexi_mysql.connect(host="localhost", user="root", database="test") as myobj:
    print(myobj.fetch_result(tables = ["t1"], where="id = 2"))

Documentation

Name Description
create_database Create New Database
drop_database Delete Database
create_table Create a new table
drop_table Deletes the specified table
truncate_table Deletes the contents from the specified table
show_tables Shows all tables in the connected database
show_databases Shows all databases
add_column Adds a new column to the specified table
drop_column Deletes the specified column from the table
modify_column Modify the colummn of a table
drop_primarykey Delete the primary key from the table specfied
drop_foreignkey Delete the foriegn key from the table specified
describe_table Shows the structure of the specified table
fetch_result Used to fetch results from the database
update_value Update the values in the specified table.
insert_value Used to insert a single set of values to the specified table.
insert_values Used to insert multiple sets of values to the specified table.
delete_value Deletes value(s) from the specified table
inner_join Used for INNER JOIN of two tables
left_join Used for LEFT JOIN of two tables
right_join Used for RIGHT JOIN of two tables
cross_join Used for CROSS JOIN of two tables
raw_query Used for fetching results from a table using MySQL Query
raw_update Used for updating values to a table using MySQL Query
raw_delete Used for deleting values from a table using MySQL Query
close_connection Used to close the connection to the database.

Metadata

Release files for flexi-mysql 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flexi-mysql 0.5.0
File Size Uploaded
flexi_mysql-0.5.0.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flexi-mysql 0.5.0
File Interpreter ABI Platform
flexi_mysql-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.0 kB

Release files / flexi_mysql-0.5.0.tar.gz

Download URL flexi_mysql-0.5.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6962a077bcf5ddc9ea9bd141a57873ba39878f2d99a509905f85ec7003dc45fd
BLAKE2b-256 checksum
How to use checksums
82f6af121553fac061f53aa6deddd53750743538b39d5ef8faa95b0f6cc33101
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2025.

Transparency log

Release files / flexi_mysql-0.5.0-py3-none-any.whl

Download URL flexi_mysql-0.5.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ede4782b65da22d45d7894475f27022f5736f49c67eb52a18e437d44d332408
BLAKE2b-256 checksum
How to use checksums
61280995d049af0ba848b595820c9dffbdc94198586e87b525f325c3b87fd53c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page