A simple package to create and execute SQLite queries
Project description
GQueryBuilder v0.0.1
GQueryBuilder is a Python package that allows easy SQLite3 Queries building & executing.
This package helps developpers who do not master the SQLite syntax.
GQueryBuilder transforms GQuery objects into SQLite3 queries.
Summary
- Presentation
- Getting started
- Features
1. Presentation
GQueryBuilder is my very first published Python package. It is designed for developpers who did not, and do no want to, learn the full SQLite syntax, when only a few operations are needed in their projects.
It's 'Python friendly' :
You create an object with the request parameters, it has a run() method and tadam !
You have your SQLite operation.
This package is only meant to be used with SQLite3 databases only (for the moment)
2. Getting started
A bit of context : You're working on your Python project and you need to send a request to a SQLite3 database.
Installation
Open a terminal window and run pip install GQueryBuiler
Create your Query
In this case, you just need to read data from the database.
Let's just create a ReadQuery instance.
First, you need to import it :
from gquerybuilder.readquery import ReadQuery
and create an instance of the class (it requires a string argument : the path to your database)
my_request = ReadQuery("path_to_database")
Now, let's give the differents 'arguments' to this request.
You need to read the 'name' field in the 'users' table.
my_request.select('name')
my_request.where(('users',))
A builder translates your query into SQLite language :
my_request.build_query()
=> your request is ready to be submitted
Just run it
my_data = my_request.run()
3. Features
This library features basic CRUD operations:
The parent class -> GQuery
This is the parent class and should not be used directly.
It contains attributes and methods shared by children class (that
means common SQLite elements to different kinds of requests.)
Create -> CreateQuery
This class implements a INSERT query.
Read -> ReadQuery
This class implements a SELECT query.
Update -> UpdateQuery
This class implements an UPDATE query.
Delete -> DeleteQuery
This class implements a DELETE query.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gquerybuilder-0.0.1.tar.gz.
File metadata
- Download URL: gquerybuilder-0.0.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
369212e04e3cf74dc2ce93693a79648eb9a3e9a7cef5dc14c4cb2ea97159d0ce
|
|
| MD5 |
45190d1b830b26500781124afc04eb93
|
|
| BLAKE2b-256 |
ac3cb5fff49410f1084b46727c4f93bbbf16f9f5eb8f6f162e1d16cf7e2b45ab
|
File details
Details for the file gquerybuilder-0.0.1-py3-none-any.whl.
File metadata
- Download URL: gquerybuilder-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a89d7551e0cd70ef33f61e1c8b999284d188aa02dae067d075d609ef053e017a
|
|
| MD5 |
ec169ccebeccdac490bb59b4c7387f38
|
|
| BLAKE2b-256 |
49b1f0791074d4e1a2eec4061d41130dd417f4f3986632a060efd187a72a20f2
|