Skip to main content

This library is for run MYSQL queries as fast as possible 🚄🔥!

Project description

ctpysql

Discord Server Twitter Account Build Passing

cautious-pysql

CTpysql helps you to code mysql queries as fast as possible 🚄🔥

Usage

Installation

Use pip install ctpysql to install the ctpysql and it's dependencies on your pc (or venv).

import module with:

from ctpysql import ctpysql

to use it in your project.

How it works?

You may import mysql.connector to work with ctpysql, just use:

from mysql.connector import (connection, Error)

and make a connection like this:

cnx = connection.MySQLConnection(user='root', password='password, host='127.0.0.1', database='db')

then make an object from ctpysql class using this connection:

obj = ctpysql(cnx)

after these steps you are able to use this library correctly, for example, insert query using dictionary values:

obj.insert('users', {'username': 'user1', 'password': 'password1'})

Supported queries

supported queries at this version (they will be more soon):


Mysql insert query (rowid return):

insert('table', {dictionary values})


Mysql table truncate query:

truncate('table')


Mysql select query (object return):

fetch('table', 'case [all or one]', 'type [dic or None]', {dictionary values (for select)})


Mysql update query (affected rows count return):

update('table', 'condition column name', 'condition column value', **data)

Example: update('users', 'username', usernameVar, password=123, email=a@a.com)


Mysql delete query (deleted rows count return):

delete('table', 'condition column name', 'condition value')

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

ctpysql-1.0.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

ctpysql-1.0.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file ctpysql-1.0.0.tar.gz.

File metadata

  • Download URL: ctpysql-1.0.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for ctpysql-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2b1dde394996c23b61a4cfa5b3c5a6ab593ea7ee3c856f4f16d7940ba701b6da
MD5 2dcc0557d255e9fc56257c12f59d599e
BLAKE2b-256 36e9bc05dff1f563c7d757ede8f7852f340b4c21637fdc70d427e2a77aed0ed4

See more details on using hashes here.

File details

Details for the file ctpysql-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ctpysql-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for ctpysql-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6258601b308dde32ef4981cd1fb703541c9771126fa990fc6d447b83ff930a2
MD5 10b0bd63890618b35c3b0e2e76e61986
BLAKE2b-256 8da71aaaa788619dcc66ccaf6c5a3e1133934cfb022a5995bf1a4de157c52556

See more details on using hashes here.

Supported by

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