AnySQL is a free and open-source Lightweight, Thread-Safe, Version-Agnostic, SQL Client Implementation inspired by Databases.
Features
- Lightweight - no use of sqlalchemy or other massive frameworks
- ThreadSafe - implements threadsafe features for fearless concurrent usage
- Flexible - acts as a standard frontend for a wide variety of SQL backends
- Powerful - simple API design with powerful utilities and quality-of-life features
Installation
pip install anysql
Security
It should be noted that anysql implements its own query parameterization to allow for greater API flexibility and performance, rather than rely on individual sql backends or relying on massive frameworks like sqlalchemy to handle query generation.
The existing parameterization has been thoroughly tested with sqlmap, the world standard of sql pentesting-tools, to prevent and detect any possible sql-injection vulnerabilities.
The test-suite used is publically available within the source-code repo within the tests folder.
Example
# Create a database instance, and connect to it.
from anysql import Database
database = Database('sqlite://:memory:')
database.connect()
# Create a table.
query = """CREATE TABLE HighScores (id INTEGER PRIMARY KEY, name VARCHAR(100), score INTEGER)"""
database.execute(query=query)
# Insert some data.
query = "INSERT INTO HighScores(name, score) VALUES (:name, :score)"
values = [
{"name": "Daisy", "score": 92},
{"name": "Neil", "score": 87},
{"name": "Carol", "score": 43},
]
database.execute_many(query=query, values=values)
# Run a database query.
query = "SELECT * FROM HighScores"
rows = database.fetch_all(query=query)
print('High Scores:', rows)
License
MIT License
Resources & Downloads
Related Articles in mysql
Welcome to our article about the best open-source self-hosted tools for data scientist and engineers. In this fascinating world of data, having the right tools at your disposal is crucial.
From data cleaning to visualization, these open-source tools can make your life easier and enhance your workflow.
10 Reasons Why
Apache Superset stands as a premier open-source data exploration and visualization platform, ingeniously designed to facilitate the creation of dynamic, insightful dashboards. It is a must-have tool for data scientists, data engineers, teams and business intelligence experts.
Built for Data Exploration
It effortlessly empowers users to navigate data from diverse
SQL Query Builders and SQL Generators are incredibly useful tools for developers, especially when dealing with heavy SQL applications. They help construct, manipulate, and manage SQL queries efficiently and effectively.
A SQL Query Builder is a tool that aids developers in creating SQL queries. It provides a convenient, often graphical
Many developers prefer using macOS for their development activities due to its robust performance, user-friendly interface, and advanced features. MacOS provides a stable and secure environment for developers, offering a comprehensive suite of development tools and applications.
Additionally, macOS has a Unix-based foundation, which makes it compatible with many open-source
DbGate is a cross-platform database manager that is designed to be user-friendly and highly effective, especially when working with multiple databases simultaneously.
It offers a range of advanced features including schema comparison, a visual query designer, chart visualization, and capabilities for batch export and import.
Pure Open-source
DbGate is available
SQL client is a software application that facilitates interaction with SQL databases. It is essential for creating, managing, and manipulating SQL databases, making it an invaluable tool for developers. On Linux, an SQL client becomes even more critical due to the operating system's extensive use in the server
In the realm of database management, Antares SQL Client emerges as an innovative and efficient tool. Built on the robust platforms of Electron.js and Vue.js, Antares aspires to be a game-changer, particularly for developers.
The vision behind Antares is to support a wide array of databases and all
Manage Your Server and Host Easily with YunoHost
Data export and import are undoubtedly the essentials of database management. Whether it's for regular backups, restoring data in case of emergencies, smooth database migration to new environments, or specific cases like transferring data from a CRM system to a MySQL database, the ability to efficiently convert XML
In the dynamic world of web application security, SQL injection continues to be a dominant threat. Fear not, an abundance of open-source SQL injection tools stands ready to counter this menace.
Equipped with diverse functionalities, these tools are designed to pinpoint and attack vulnerabilities, guaranteeing the unassailable strength of your