This library is for run MYSQL queries as fast as possible 🚄🔥!
Project description
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:
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)})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ctpysql-0.1.0.tar.gz
.
File metadata
- Download URL: ctpysql-0.1.0.tar.gz
- Upload date:
- Size: 2.8 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0944fe70e84f407038af7510839f81ecb4cb97cb1c5e374d7ab71aefde4d230 |
|
MD5 | 8c8995d71e5009ada52b04af64a9a3b7 |
|
BLAKE2b-256 | 1cb25de671e0b417d95576b370225056baa514e4c1b7fad88c6b14d6e5291899 |
File details
Details for the file ctpysql-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: ctpysql-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.5 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2aac2b1ddb871cad60ccba785c88b04da8e5f56024ea13ed3d60f82914f8e774 |
|
MD5 | 547ee3b34dcd88ff4f61c3672f249fc2 |
|
BLAKE2b-256 | fbae04a528ead5cf39bac16ec1350c3a3b5f097d2fbc78cfe862f2922dca6d98 |