A wrapper for SQLite and MySQL, Most of the queries wrapped into commands for ease.

Overview

Before you proceed, make sure you know Some real SQL, before looking at the code, otherwise you probably won't understand anything.

Installation

pip install EasierSQL

EasySQLite code examples -:

import EasierSQLite

database = EasierSQLite.easierSQLite("dataBaseName")

# Creating a table

created_Table = database.create_Table('table_Name','userName TEXT NOT NULL, userID INT PRIMARY KEY')
"""
The second argument is where you write the Column names, their Datatypes and constraints!
Also there is an optional third argument called 'check_if_exists' by default it is True.
"""

print(created_Table) # Returns the result.

# Inserting values into a table.

insert = database.insert_values('table_Name','columns_names','values_here')

print(insert) # Returns the result.

# Getting values from a table

selected_value = database.select_values('table_Name', columnNames='column_Names',limit='1000',clauses='here')
"""
Most of the arguemnts here, have default values for example,
If you leave columnNames blank it will get all the values from the rows by default. 
If you leave limit blank, it will get 100 rows max from the table by default.

In the clauses argument you can add your where clause, cases etc. If left none it won't affect anything.
"""

print(selected_value) # Returns the list of values (or an error).

To compensate for no documentation at the moment, here are all the functions.

database.create_Table()
database.select_values()
database.insert_values()
database.delete_table()
database.create_new_column()
database.delete_row()
database.rename_Table()
database.rename_Column()
database.attach_database()
database.detach_database()
database.execute_custom_query() # Returns the database, so you can execute Your own query, if the module doesn't support that type.

Example of execute_custom_query()

import EasierSQLite

database = EasierSQLite.easierSQLite("dataBaseName")

tempDB = database.execute_custom_query()
cursor = tempDB.cursor()

cursor.execute("SQL_QUERY")

# tempDB.commit() COMMIT IF NECESSARY

tempDB.close() # Close database after done with it for good practice.

EasyMySQL Code example -:

import EasierMySQL

database = EasierMySQL.easierMySQL(
    userName = 'userNAME',
    passwrd = 'password',
    host = 'host'
    database = 'database'
)

# Creating a table

created_Table = database.create_Table('table_Name','userName VARCHAR(20) NOT NULL, userID INT PRIMARY KEY')

print(created_Table) # Returns the result.

# Inserting values into a table.

insert = database.insert_values('table_Name','columns_names','values_here')

print(insert) # Returns the result.

# Getting values from a table

selected_value = database.select_values('table_Name', columnNames='column_Names',limit='1000',clauses='here')

print(selected_value) # Returns the list of values (or an error).

Here are all the functions but for EasierMYSQL.

database.create_Table()
database.select_values()
database.insert_values()
database.delete_table()
database.create_new_column()
database.delete_row()
database.rename_Table()
database.rename_Column()
database.attach_database()
database.detach_database()
database.delete_column()
database.show_tables()
database.execute_custom_query() # Returns the database, so you can execute Your own query, if the module doesn't support that type.

The execute_custom_query is as same as the One in EasierSQLLite.

You might also like...
Databank is an easy-to-use Python library for making raw SQL queries in a multi-threaded environment.

Databank Databank is an easy-to-use Python library for making raw SQL queries in a multi-threaded environment. No ORM, no frills. Thread-safe. Only ra

Implementing basic MongoDB CRUD (Create, Read, Update, Delete) queries, using Python.
Implementing basic MongoDB CRUD (Create, Read, Update, Delete) queries, using Python.

MongoDB with Python Implementing basic MongoDB CRUD (Create, Read, Update, Delete) queries, using Python. We can connect to a MongoDB database hosted

An extension package of 🤗 Datasets that provides support for executing arbitrary SQL queries on HF datasets

datasets_sql A 🤗 Datasets extension package that provides support for executing arbitrary SQL queries on HF datasets. It uses DuckDB as a SQL engine

Python PostgreSQL adapter to stream results of multi-statement queries without a server-side cursor

streampq Stream results of multi-statement PostgreSQL queries from Python without server-side cursors. Has benefits over some other Python PostgreSQL

MySQL database connector for Python (with Python 3 support)

mysqlclient This project is a fork of MySQLdb1. This project adds Python 3 support and fixed many bugs. PyPI: https://pypi.org/project/mysqlclient/ Gi

Pure Python MySQL Client

PyMySQL Table of Contents Requirements Installation Documentation Example Resources License This package contains a pure-Python MySQL client library,

aiomysql is a library for accessing a MySQL database from the asyncio

aiomysql aiomysql is a "driver" for accessing a MySQL database from the asyncio (PEP-3156/tulip) framework. It depends on and reuses most parts of PyM

MySQL database connector for Python (with Python 3 support)

mysqlclient This project is a fork of MySQLdb1. This project adds Python 3 support and fixed many bugs. PyPI: https://pypi.org/project/mysqlclient/ Gi

MySQL Operator for Kubernetes

MySQL Operator for Kubernetes The MYSQL Operator for Kubernetes is an Operator for Kubernetes managing MySQL InnoDB Cluster setups inside a Kubernetes

Releases(0.1.2)
Owner
Refined
Game Developer and App Developer.
Refined
Redis client for Python asyncio (PEP 3156)

Redis client for Python asyncio. Redis client for the PEP 3156 Python event loop. This Redis library is a completely asynchronous, non-blocking client

Jonathan Slenders 554 Dec 04, 2022
Database connection pooler for Python

Nimue Strange women lying in ponds distributing swords is no basis for a system of government! --Dennis, Peasant Nimue is a database connection pool f

1 Nov 09, 2021
MySQLdb is a Python DB API-2.0 compliant library to interact with MySQL 3.23-5.1 (unofficial mirror)

==================== MySQLdb Installation ==================== .. contents:: .. Prerequisites ------------- + Python 2.3.4 or higher * http://ww

Sébastien Arnaud 17 Oct 10, 2021
Logica is a logic programming language that compiles to StandardSQL and runs on Google BigQuery.

Logica: language of Big Data Logica is an open source declarative logic programming language for data manipulation. Logica is a successor to Yedalog,

Evgeny Skvortsov 1.5k Dec 30, 2022
A Python wheel containing PostgreSQL

postgresql-wheel A Python wheel for Linux containing a complete, self-contained, locally installable PostgreSQL database server. All servers run as th

Michel Pelletier 71 Nov 09, 2022
Python client for InfluxDB

InfluxDB-Python InfluxDB-Python is a client for interacting with InfluxDB. Development of this library is maintained by: Github ID URL @aviau (https:/

InfluxData 1.6k Dec 24, 2022
A fast MySQL driver written in pure C/C++ for Python. Compatible with gevent through monkey patching.

:: Description :: A fast MySQL driver written in pure C/C++ for Python. Compatible with gevent through monkey patching :: Requirements :: Requires P

ESN Social Software 549 Nov 18, 2022
Redis Python Client - The Python interface to the Redis key-value store.

redis-py The Python interface to the Redis key-value store. Installation | Contributing | Getting Started | Connecting To Redis Installation redis-py

Redis 11k Jan 08, 2023
aioodbc - is a library for accessing a ODBC databases from the asyncio

aioodbc aioodbc is a Python 3.5+ module that makes it possible to access ODBC databases with asyncio. It relies on the awesome pyodbc library and pres

aio-libs 253 Dec 31, 2022
Asynchronous, fast, pythonic DynamoDB Client

AsyncIO DynamoDB Asynchronous pythonic DynamoDB client; 2x faster than aiobotocore/boto3/botocore. Quick start With httpx Install this library pip ins

HENNGE 48 Dec 18, 2022
dask-sql is a distributed SQL query engine in python using Dask

dask-sql is a distributed SQL query engine in Python. It allows you to query and transform your data using a mixture of common SQL operations and Python code and also scale up the calculation easily

Nils Braun 271 Dec 30, 2022
A Python Object-Document-Mapper for working with MongoDB

MongoEngine Info: MongoEngine is an ORM-like layer on top of PyMongo. Repository: https://github.com/MongoEngine/mongoengine Author: Harry Marr (http:

MongoEngine 3.9k Jan 08, 2023
A collection of awesome sqlite tools, scripts, books, etc

Awesome Series @ Planet Open Data World (Countries, Cities, Codes, ...) • Football (Clubs, Players, Stadiums, ...) • SQLite (Tools, Books, Schemas, ..

Planet Open Data 205 Dec 16, 2022
A simple wrapper to make a flat file drop in raplacement for mongodb out of TinyDB

Purpose A simple wrapper to make a drop in replacement for mongodb out of tinydb. This module is an attempt to add an interface familiar to those curr

180 Jan 01, 2023
Redis Python Client

redis-py The Python interface to the Redis key-value store. Python 2 Compatibility Note redis-py 3.5.x will be the last version of redis-py that suppo

Andy McCurdy 11k Dec 29, 2022
Py2neo is a client library and toolkit for working with Neo4j from within Python

Py2neo Py2neo is a client library and toolkit for working with Neo4j from within Python applications. The library supports both Bolt and HTTP and prov

py2neo.org 1.2k Jan 02, 2023
Query multiple mongoDB database collections easily

leakscoop Perform queries across multiple MongoDB databases and collections, where the field names and the field content structure in each database ma

bagel 5 Jun 24, 2021
MinIO Client SDK for Python

MinIO Python SDK for Amazon S3 Compatible Cloud Storage MinIO Python SDK is Simple Storage Service (aka S3) client to perform bucket and object operat

High Performance, Kubernetes Native Object Storage 582 Dec 28, 2022
Some scripts for microsoft SQL server in old version.

MSSQL_Stuff Some scripts for microsoft SQL server which is in old version. Table of content Overview Usage References Overview These script works when

小离 5 Dec 29, 2022
A SQL linter and auto-formatter for Humans

The SQL Linter for Humans SQLFluff is a dialect-flexible and configurable SQL linter. Designed with ELT applications in mind, SQLFluff also works with

SQLFluff 5.5k Jan 08, 2023