Name | better-sqlite JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A simple and intuitive SQLite wrapper library that provides an easy-to-use interface for interacting with SQLite databases, enabling basic CRUD operations without writing raw SQL. |
upload_time | 2024-09-13 15:09:30 |
maintainer | None |
docs_url | None |
author | ayrun |
requires_python | <4.0,>=3.12 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<p align="center">
<img src="./assets/better_sqlite_logo.png" alt="Better SQLite Logo"/>
</p>
<hr>
<h4 align="center">โจ Simplify your SQLite experience without writing SQL</h4>
<p align="center">
<a href="#๐๏ธ Overview">Overview</a> โข
<a href="#โจ Features">Features</a> โข
<a href="#๐ Installation">Installation</a> โข
<a href="#๐ Usage">Usage</a> โข
<a href="#๐งช Testing">Testing</a> โข
<a href="#๐ License">License</a> โข
<a href="# ๐ค Contributing">Contributing</a>
</p>
## ๐๏ธ Overview
A simple and intuitive SQLite wrapper library for Python that provides an easy-to-use interface for interacting with SQLite Databases. This library allows you to perform basic CRUD ( Create, Read, Update, Delete) operations without having to write raw SQL queries.
## โจ Features
- **Context Manager Support**: Automatically handles database connection and closing.
- **CRUD Operations**: Easy methods for creating tables, inserting, updating, retrieving, and deleting data.
- **No Raw SQL Required**: Simplified API for common database operations.
## ๐ Installation
This library can be installed via pip( recommended ) or git by cloning the repository and installing it locally.
To install `Better SQLite` via git:
```bash
git clone https://github.com/ayrun3412/Better-SQlite.git
cd Better-SQLite
pip install .
```
Via pip:
```bash
# pip3 for MacOS & Linux
pip install better-sqlite
```
## ๐ Usage
### Creating a Table
```python
from better_sqlite import Database
with Database('example.db') as db:
db.create_table("users", {"name": "TEXT", "age": "INTEGER"})
```
### Inserting Data
```python
with Database('example.db') as db:
db.insert("users", {"name": "Alice", "age": 30})
```
### Retrieving Data
```python
with Database('example.db') as db:
user = db.get("users", {"name": "Alice"})
print(user) # Output: {'name': 'Alice', 'age': 30}
```
### Updating Data
```python
with Database('example.db') as db:
db.update("users", {"age": 31}, {"name": "Alice"})
```
### Deleting Data
```python
with Database('example.db') as db:
db.delete("users", {"name": "Alice"})
```
## ๐งช Testing
To ensure the functionality of the library, you can run the tests using `pytest`.
First, Install `pytest` if you haven't already:
```bash
pip install pytest
```
Then run, the tests:
```bash
pytest
```
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) for more details
## ๐ค Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests.
Raw data
{
"_id": null,
"home_page": null,
"name": "better-sqlite",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": null,
"author": "ayrun",
"author_email": "ayrun3412@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/bf/2f/79a496b7c4d54357f818228bc56b98aeda29ac2cbef3c5e495b4e08c01dd/better_sqlite-0.1.0.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <img src=\"./assets/better_sqlite_logo.png\" alt=\"Better SQLite Logo\"/>\n</p>\n<hr>\n<h4 align=\"center\">\u2728 Simplify your SQLite experience without writing SQL</h4>\n\n<p align=\"center\">\n <a href=\"#\ud83d\uddd2\ufe0f Overview\">Overview</a> \u2022\n <a href=\"#\u2728 Features\">Features</a> \u2022\n <a href=\"#\ud83d\ude80 Installation\">Installation</a> \u2022\n <a href=\"#\ud83d\udcda Usage\">Usage</a> \u2022\n <a href=\"#\ud83e\uddea Testing\">Testing</a> \u2022\n <a href=\"#\ud83d\udcdd License\">License</a> \u2022\n <a href=\"# \ud83e\udd1d Contributing\">Contributing</a>\n</p>\n\n## \ud83d\uddd2\ufe0f Overview\n\nA simple and intuitive SQLite wrapper library for Python that provides an easy-to-use interface for interacting with SQLite Databases. This library allows you to perform basic CRUD ( Create, Read, Update, Delete) operations without having to write raw SQL queries.\n\n## \u2728 Features\n\n- **Context Manager Support**: Automatically handles database connection and closing.\n- **CRUD Operations**: Easy methods for creating tables, inserting, updating, retrieving, and deleting data.\n- **No Raw SQL Required**: Simplified API for common database operations.\n\n## \ud83d\ude80 Installation\n\nThis library can be installed via pip( recommended ) or git by cloning the repository and installing it locally.\n\nTo install `Better SQLite` via git:\n\n```bash\ngit clone https://github.com/ayrun3412/Better-SQlite.git\ncd Better-SQLite\npip install .\n```\n\nVia pip:\n\n```bash\n# pip3 for MacOS & Linux\npip install better-sqlite\n```\n\n## \ud83d\udcda Usage\n\n### Creating a Table\n\n```python\nfrom better_sqlite import Database\n\nwith Database('example.db') as db:\n db.create_table(\"users\", {\"name\": \"TEXT\", \"age\": \"INTEGER\"})\n```\n\n### Inserting Data\n\n```python\nwith Database('example.db') as db:\n db.insert(\"users\", {\"name\": \"Alice\", \"age\": 30})\n```\n\n### Retrieving Data\n\n```python\nwith Database('example.db') as db:\n user = db.get(\"users\", {\"name\": \"Alice\"})\n print(user) # Output: {'name': 'Alice', 'age': 30}\n```\n\n### Updating Data\n\n```python\nwith Database('example.db') as db:\n db.update(\"users\", {\"age\": 31}, {\"name\": \"Alice\"})\n```\n\n### Deleting Data\n\n```python\nwith Database('example.db') as db:\n db.delete(\"users\", {\"name\": \"Alice\"})\n```\n\n## \ud83e\uddea Testing\n\n To ensure the functionality of the library, you can run the tests using `pytest`.\n\nFirst, Install `pytest` if you haven't already:\n\n```bash\npip install pytest\n```\n\nThen run, the tests:\n\n```bash\npytest\n```\n\n## \ud83d\udcdd License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) for more details\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests.\n",
"bugtrack_url": null,
"license": null,
"summary": "A simple and intuitive SQLite wrapper library that provides an easy-to-use interface for interacting with SQLite databases, enabling basic CRUD operations without writing raw SQL.",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2a95523294eae54d88bc77b580ae10e7aa9cc5c51daae8bf3cbfedfe8082d0ce",
"md5": "753a0d14744dc2d8538e907be2316fce",
"sha256": "5717c02993619aed05172677d61fbbce56c7d6e09c9cb663df526decea7348b9"
},
"downloads": -1,
"filename": "better_sqlite-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "753a0d14744dc2d8538e907be2316fce",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 4932,
"upload_time": "2024-09-13T15:09:28",
"upload_time_iso_8601": "2024-09-13T15:09:28.884681Z",
"url": "https://files.pythonhosted.org/packages/2a/95/523294eae54d88bc77b580ae10e7aa9cc5c51daae8bf3cbfedfe8082d0ce/better_sqlite-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bf2f79a496b7c4d54357f818228bc56b98aeda29ac2cbef3c5e495b4e08c01dd",
"md5": "7204a1af6683037a84d00f5fc74987b8",
"sha256": "d2745343e5b7a8d79f0175cc0ed96a96d29b9464b6ccfe2ac8c6823d44d04ac1"
},
"downloads": -1,
"filename": "better_sqlite-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "7204a1af6683037a84d00f5fc74987b8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 4426,
"upload_time": "2024-09-13T15:09:30",
"upload_time_iso_8601": "2024-09-13T15:09:30.846721Z",
"url": "https://files.pythonhosted.org/packages/bf/2f/79a496b7c4d54357f818228bc56b98aeda29ac2cbef3c5e495b4e08c01dd/better_sqlite-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-13 15:09:30",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "better-sqlite"
}