sqliter-py 0.3.0__py3-none-any.whl → 0.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of sqliter-py might be problematic. Click here for more details.

sqliter/sqliter.py CHANGED
@@ -1,9 +1,16 @@
1
- """This is the main module for the sqliter package."""
1
+ """Core module for SQLiter, providing the main database interaction class.
2
+
3
+ This module defines the SqliterDB class, which serves as the primary
4
+ interface for all database operations in SQLiter. It handles connection
5
+ management, table creation, and CRUD operations, bridging the gap between
6
+ Pydantic models and SQLite database interactions.
7
+ """
2
8
 
3
9
  from __future__ import annotations
4
10
 
11
+ import logging
5
12
  import sqlite3
6
- from typing import TYPE_CHECKING, Optional
13
+ from typing import TYPE_CHECKING, Any, Optional
7
14
 
8
15
  from typing_extensions import Self
9
16
 
@@ -14,8 +21,11 @@ from sqliter.exceptions import (
14
21
  RecordInsertionError,
15
22
  RecordNotFoundError,
16
23
  RecordUpdateError,
24
+ SqlExecutionError,
17
25
  TableCreationError,
26
+ TableDeletionError,
18
27
  )
28
+ from sqliter.helpers import infer_sqlite_type
19
29
  from sqliter.query.query import QueryBuilder
20
30
 
21
31
  if TYPE_CHECKING: # pragma: no cover
@@ -25,7 +35,17 @@ if TYPE_CHECKING: # pragma: no cover
25
35
 
26
36
 
27
37
  class SqliterDB:
28
- """Class to manage SQLite database interactions."""
38
+ """Main class for interacting with SQLite databases.
39
+
40
+ This class provides methods for connecting to a SQLite database,
41
+ creating tables, and performing CRUD operations.
42
+
43
+ Arguements:
44
+ db_filename (str): The filename of the SQLite database.
45
+ auto_commit (bool): Whether to automatically commit transactions.
46
+ debug (bool): Whether to enable debug logging.
47
+ logger (Optional[logging.Logger]): Custom logger for debug output.
48
+ """
29
49
 
30
50
  def __init__(
31
51
  self,
@@ -33,8 +53,24 @@ class SqliterDB:
33
53
  *,
34
54
  memory: bool = False,
35
55
  auto_commit: bool = True,
56
+ debug: bool = False,
57
+ logger: Optional[logging.Logger] = None,
58
+ reset: bool = False,
36
59
  ) -> None:
37
- """Initialize the class and options."""
60
+ """Initialize a new SqliterDB instance.
61
+
62
+ Args:
63
+ db_filename: The filename of the SQLite database.
64
+ memory: If True, create an in-memory database.
65
+ auto_commit: Whether to automatically commit transactions.
66
+ debug: Whether to enable debug logging.
67
+ logger: Custom logger for debug output.
68
+ reset: Whether to reset the database on initialization. This will
69
+ basically drop all existing tables.
70
+
71
+ Raises:
72
+ ValueError: If no filename is provided for a non-memory database.
73
+ """
38
74
  if memory:
39
75
  self.db_filename = ":memory:"
40
76
  elif db_filename:
@@ -46,10 +82,98 @@ class SqliterDB:
46
82
  )
47
83
  raise ValueError(err)
48
84
  self.auto_commit = auto_commit
85
+ self.debug = debug
86
+ self.logger = logger
49
87
  self.conn: Optional[sqlite3.Connection] = None
88
+ self.reset = reset
89
+
90
+ if self.debug:
91
+ self._setup_logger()
92
+
93
+ if self.reset:
94
+ self._reset_database()
95
+
96
+ def _reset_database(self) -> None:
97
+ """Drop all user-created tables in the database."""
98
+ with self.connect() as conn:
99
+ cursor = conn.cursor()
100
+
101
+ # Get all table names, excluding SQLite system tables
102
+ cursor.execute(
103
+ "SELECT name FROM sqlite_master WHERE type='table' "
104
+ "AND name NOT LIKE 'sqlite_%';"
105
+ )
106
+ tables = cursor.fetchall()
107
+
108
+ # Drop each user-created table
109
+ for table in tables:
110
+ cursor.execute(f"DROP TABLE IF EXISTS {table[0]}")
111
+
112
+ conn.commit()
113
+
114
+ if self.debug and self.logger:
115
+ self.logger.debug(
116
+ "Database reset: %s user-created tables dropped.", len(tables)
117
+ )
118
+
119
+ def _setup_logger(self) -> None:
120
+ """Set up the logger for debug output.
121
+
122
+ This method configures a logger for the SqliterDB instance, either
123
+ using an existing logger or creating a new one specifically for
124
+ SQLiter.
125
+ """
126
+ # Check if the root logger is already configured
127
+ root_logger = logging.getLogger()
128
+
129
+ if root_logger.hasHandlers():
130
+ # If the root logger has handlers, use it without modifying the root
131
+ # configuration
132
+ self.logger = root_logger.getChild("sqliter")
133
+ else:
134
+ # If no root logger is configured, set up a new logger specific to
135
+ # SqliterDB
136
+ self.logger = logging.getLogger("sqliter")
137
+
138
+ handler = logging.StreamHandler() # Output to console
139
+ formatter = logging.Formatter(
140
+ "%(levelname)-8s%(message)s"
141
+ ) # Custom format
142
+ handler.setFormatter(formatter)
143
+ self.logger.addHandler(handler)
144
+
145
+ self.logger.setLevel(logging.DEBUG)
146
+ self.logger.propagate = False
147
+
148
+ def _log_sql(self, sql: str, values: list[Any]) -> None:
149
+ """Log the SQL query and its values if debug mode is enabled.
150
+
151
+ The values are inserted into the SQL query string to replace the
152
+ placeholders.
153
+
154
+ Args:
155
+ sql: The SQL query string.
156
+ values: The list of values to be inserted into the query.
157
+ """
158
+ if self.debug and self.logger:
159
+ formatted_sql = sql
160
+ for value in values:
161
+ if isinstance(value, str):
162
+ formatted_sql = formatted_sql.replace("?", f"'{value}'", 1)
163
+ else:
164
+ formatted_sql = formatted_sql.replace("?", str(value), 1)
165
+
166
+ self.logger.debug("Executing SQL: %s", formatted_sql)
50
167
 
51
168
  def connect(self) -> sqlite3.Connection:
52
- """Create or return a connection to the SQLite database."""
169
+ """Establish a connection to the SQLite database.
170
+
171
+ Returns:
172
+ The SQLite connection object.
173
+
174
+ Raises:
175
+ DatabaseConnectionError: If unable to connect to the database.
176
+ """
53
177
  if not self.conn:
54
178
  try:
55
179
  self.conn = sqlite3.connect(self.db_filename)
@@ -58,41 +182,88 @@ class SqliterDB:
58
182
  return self.conn
59
183
 
60
184
  def close(self) -> None:
61
- """Close the connection to the SQLite database."""
185
+ """Close the database connection.
186
+
187
+ This method commits any pending changes if auto_commit is True,
188
+ then closes the connection. If the connection is already closed or does
189
+ not exist, this method silently does nothing.
190
+ """
62
191
  if self.conn:
63
192
  self._maybe_commit()
64
193
  self.conn.close()
65
194
  self.conn = None
66
195
 
67
196
  def commit(self) -> None:
68
- """Commit any pending transactions."""
197
+ """Commit the current transaction.
198
+
199
+ This method explicitly commits any pending changes to the database.
200
+ """
69
201
  if self.conn:
70
202
  self.conn.commit()
71
203
 
72
- def create_table(self, model_class: type[BaseDBModel]) -> None:
73
- """Create a table based on the Pydantic model."""
204
+ def create_table(
205
+ self,
206
+ model_class: type[BaseDBModel],
207
+ *,
208
+ exists_ok: bool = True,
209
+ force: bool = False,
210
+ ) -> None:
211
+ """Create a table in the database based on the given model class.
212
+
213
+ Args:
214
+ model_class: The Pydantic model class representing the table.
215
+ exists_ok: If True, do not raise an error if the table already
216
+ exists. Default is True which is the original behavior.
217
+ force: If True, drop the table if it exists before creating.
218
+ Defaults to False.
219
+
220
+ Raises:
221
+ TableCreationError: If there's an error creating the table.
222
+ ValueError: If the primary key field is not found in the model.
223
+ """
74
224
  table_name = model_class.get_table_name()
75
225
  primary_key = model_class.get_primary_key()
76
226
  create_pk = model_class.should_create_pk()
77
227
 
78
- fields = ", ".join(
79
- f"{field_name} TEXT" for field_name in model_class.model_fields
80
- )
228
+ if force:
229
+ drop_table_sql = f"DROP TABLE IF EXISTS {table_name}"
230
+ self._execute_sql(drop_table_sql)
81
231
 
232
+ fields = []
233
+
234
+ # Always add the primary key field first
82
235
  if create_pk:
83
- create_table_sql = f"""
84
- CREATE TABLE IF NOT EXISTS {table_name} (
85
- {primary_key} INTEGER PRIMARY KEY AUTOINCREMENT,
86
- {fields}
87
- )
88
- """
236
+ fields.append(f"{primary_key} INTEGER PRIMARY KEY AUTOINCREMENT")
89
237
  else:
90
- create_table_sql = f"""
91
- CREATE TABLE IF NOT EXISTS {table_name} (
92
- {fields},
93
- PRIMARY KEY ({primary_key})
238
+ field_info = model_class.model_fields.get(primary_key)
239
+ if field_info is not None:
240
+ sqlite_type = infer_sqlite_type(field_info.annotation)
241
+ fields.append(f"{primary_key} {sqlite_type} PRIMARY KEY")
242
+ else:
243
+ err = (
244
+ f"Primary key field '{primary_key}' not found in model "
245
+ "fields."
94
246
  )
95
- """
247
+ raise ValueError(err)
248
+
249
+ # Add remaining fields
250
+ for field_name, field_info in model_class.model_fields.items():
251
+ if field_name != primary_key:
252
+ sqlite_type = infer_sqlite_type(field_info.annotation)
253
+ fields.append(f"{field_name} {sqlite_type}")
254
+
255
+ create_str = (
256
+ "CREATE TABLE IF NOT EXISTS" if exists_ok else "CREATE TABLE"
257
+ )
258
+
259
+ create_table_sql = f"""
260
+ {create_str} {table_name} (
261
+ {", ".join(fields)}
262
+ )
263
+ """
264
+
265
+ if self.debug:
266
+ self._log_sql(create_table_sql, [])
96
267
 
97
268
  try:
98
269
  with self.connect() as conn:
@@ -102,13 +273,67 @@ class SqliterDB:
102
273
  except sqlite3.Error as exc:
103
274
  raise TableCreationError(table_name) from exc
104
275
 
276
+ def _execute_sql(self, sql: str) -> None:
277
+ """Execute an SQL statement.
278
+
279
+ Args:
280
+ sql: The SQL statement to execute.
281
+
282
+ Raises:
283
+ SqlExecutionError: If the SQL execution fails.
284
+ """
285
+ if self.debug:
286
+ self._log_sql(sql, [])
287
+
288
+ try:
289
+ with self.connect() as conn:
290
+ cursor = conn.cursor()
291
+ cursor.execute(sql)
292
+ conn.commit()
293
+ except (sqlite3.Error, sqlite3.Warning) as exc:
294
+ raise SqlExecutionError(sql) from exc
295
+
296
+ def drop_table(self, model_class: type[BaseDBModel]) -> None:
297
+ """Drop the table associated with the given model class.
298
+
299
+ Args:
300
+ model_class: The model class for which to drop the table.
301
+
302
+ Raises:
303
+ TableDeletionError: If there's an error dropping the table.
304
+ """
305
+ table_name = model_class.get_table_name()
306
+ drop_table_sql = f"DROP TABLE IF EXISTS {table_name}"
307
+
308
+ if self.debug:
309
+ self._log_sql(drop_table_sql, [])
310
+
311
+ try:
312
+ with self.connect() as conn:
313
+ cursor = conn.cursor()
314
+ cursor.execute(drop_table_sql)
315
+ self.commit()
316
+ except sqlite3.Error as exc:
317
+ raise TableDeletionError(table_name) from exc
318
+
105
319
  def _maybe_commit(self) -> None:
106
- """Commit changes if auto_commit is True."""
320
+ """Commit changes if auto_commit is enabled.
321
+
322
+ This method is called after operations that modify the database,
323
+ committing changes only if auto_commit is set to True.
324
+ """
107
325
  if self.auto_commit and self.conn:
108
326
  self.conn.commit()
109
327
 
110
328
  def insert(self, model_instance: BaseDBModel) -> None:
111
- """Insert a new record into the table defined by the Pydantic model."""
329
+ """Insert a new record into the database.
330
+
331
+ Args:
332
+ model_instance: An instance of a Pydantic model to be inserted.
333
+
334
+ Raises:
335
+ RecordInsertionError: If there's an error inserting the record.
336
+ """
112
337
  model_class = type(model_instance)
113
338
  table_name = model_class.get_table_name()
114
339
 
@@ -135,7 +360,18 @@ class SqliterDB:
135
360
  def get(
136
361
  self, model_class: type[BaseDBModel], primary_key_value: str
137
362
  ) -> BaseDBModel | None:
138
- """Retrieve a record by its PK and return a Pydantic instance."""
363
+ """Retrieve a single record from the database by its primary key.
364
+
365
+ Args:
366
+ model_class: The Pydantic model class representing the table.
367
+ primary_key_value: The value of the primary key to look up.
368
+
369
+ Returns:
370
+ An instance of the model class if found, None otherwise.
371
+
372
+ Raises:
373
+ RecordFetchError: If there's an error fetching the record.
374
+ """
139
375
  table_name = model_class.get_table_name()
140
376
  primary_key = model_class.get_primary_key()
141
377
 
@@ -163,7 +399,15 @@ class SqliterDB:
163
399
  return None
164
400
 
165
401
  def update(self, model_instance: BaseDBModel) -> None:
166
- """Update an existing record using the Pydantic model."""
402
+ """Update an existing record in the database.
403
+
404
+ Args:
405
+ model_instance: An instance of a Pydantic model to be updated.
406
+
407
+ Raises:
408
+ RecordUpdateError: If there's an error updating the record.
409
+ RecordNotFoundError: If the record to update is not found.
410
+ """
167
411
  model_class = type(model_instance)
168
412
  table_name = model_class.get_table_name()
169
413
  primary_key = model_class.get_primary_key()
@@ -203,7 +447,17 @@ class SqliterDB:
203
447
  def delete(
204
448
  self, model_class: type[BaseDBModel], primary_key_value: str
205
449
  ) -> None:
206
- """Delete a record by its primary key."""
450
+ """Delete a record from the database by its primary key.
451
+
452
+ Args:
453
+ model_class: The Pydantic model class representing the table.
454
+ primary_key_value: The value of the primary key of the record to
455
+ delete.
456
+
457
+ Raises:
458
+ RecordDeletionError: If there's an error deleting the record.
459
+ RecordNotFoundError: If the record to delete is not found.
460
+ """
207
461
  table_name = model_class.get_table_name()
208
462
  primary_key = model_class.get_primary_key()
209
463
 
@@ -228,18 +482,15 @@ class SqliterDB:
228
482
  fields: Optional[list[str]] = None,
229
483
  exclude: Optional[list[str]] = None,
230
484
  ) -> QueryBuilder:
231
- """Start a query for the given model.
485
+ """Create a QueryBuilder instance for selecting records.
232
486
 
233
487
  Args:
234
- model_class: The model class to query.
235
- fields: Optional list of field names to select. If None, all fields
236
- are selected.
237
- exclude: Optional list of field names to exclude from the query
238
- output.
488
+ model_class: The Pydantic model class representing the table.
489
+ fields: Optional list of fields to include in the query.
490
+ exclude: Optional list of fields to exclude from the query.
239
491
 
240
492
  Returns:
241
- QueryBuilder: An instance of QueryBuilder for the given model and
242
- fields.
493
+ A QueryBuilder instance for further query construction.
243
494
  """
244
495
  query_builder = QueryBuilder(self, model_class, fields)
245
496
 
@@ -251,7 +502,18 @@ class SqliterDB:
251
502
 
252
503
  # --- Context manager methods ---
253
504
  def __enter__(self) -> Self:
254
- """Enter the runtime context for the 'with' statement."""
505
+ """Enter the runtime context for the SqliterDB instance.
506
+
507
+ This method is called when entering a 'with' statement. It ensures
508
+ that a database connection is established.
509
+
510
+ Note that this method should never be called explicitly, but will be
511
+ called by the 'with' statement when entering the context.
512
+
513
+ Returns:
514
+ The SqliterDB instance.
515
+
516
+ """
255
517
  self.connect()
256
518
  return self
257
519
 
@@ -261,7 +523,24 @@ class SqliterDB:
261
523
  exc_value: Optional[BaseException],
262
524
  traceback: Optional[TracebackType],
263
525
  ) -> None:
264
- """Exit the runtime context and close the connection."""
526
+ """Exit the runtime context for the SqliterDB instance.
527
+
528
+ This method is called when exiting a 'with' statement. It handles
529
+ committing or rolling back transactions based on whether an exception
530
+ occurred, and closes the database connection.
531
+
532
+ Args:
533
+ exc_type: The type of the exception that caused the context to be
534
+ exited, or None if no exception was raised.
535
+ exc_value: The instance of the exception that caused the context
536
+ to be exited, or None if no exception was raised.
537
+ traceback: A traceback object encoding the stack trace, or None
538
+ if no exception was raised.
539
+
540
+ Note that this method should never be called explicitly, but will be
541
+ called by the 'with' statement when exiting the context.
542
+
543
+ """
265
544
  if self.conn:
266
545
  try:
267
546
  if exc_type:
@@ -0,0 +1,196 @@
1
+ Metadata-Version: 2.3
2
+ Name: sqliter-py
3
+ Version: 0.4.0
4
+ Summary: Interact with SQLite databases using Python and Pydantic
5
+ Project-URL: Pull Requests, https://github.com/seapagan/sqliter-py/pulls
6
+ Project-URL: Bug Tracker, https://github.com/seapagan/sqliter-py/issues
7
+ Project-URL: Changelog, https://github.com/seapagan/sqliter-py/blob/main/CHANGELOG.md
8
+ Project-URL: Repository, https://github.com/seapagan/sqliter-py
9
+ Author-email: Grant Ramsay <grant@gnramsay.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE.txt
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Requires-Python: >=3.9
24
+ Requires-Dist: pydantic>=2.9.0
25
+ Provides-Extra: extras
26
+ Requires-Dist: inflect==7.0.0; extra == 'extras'
27
+ Description-Content-Type: text/markdown
28
+
29
+ # SQLiter <!-- omit in toc -->
30
+
31
+ [![PyPI version](https://badge.fury.io/py/sqliter-py.svg)](https://badge.fury.io/py/sqliter-py)
32
+ [![Test Suite](https://github.com/seapagan/sqliter-py/actions/workflows/testing.yml/badge.svg)](https://github.com/seapagan/sqliter-py/actions/workflows/testing.yml)
33
+ [![Linting](https://github.com/seapagan/sqliter-py/actions/workflows/linting.yml/badge.svg)](https://github.com/seapagan/sqliter-py/actions/workflows/linting.yml)
34
+ [![Type Checking](https://github.com/seapagan/sqliter-py/actions/workflows/mypy.yml/badge.svg)](https://github.com/seapagan/sqliter-py/actions/workflows/mypy.yml)
35
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sqliter-py)
36
+
37
+ SQLiter is a lightweight Object-Relational Mapping (ORM) library for SQLite
38
+ databases in Python. It provides a simplified interface for interacting with
39
+ SQLite databases using Pydantic models. The only external run-time dependency
40
+ is Pydantic itself.
41
+
42
+ It does not aim to be a full-fledged ORM like SQLAlchemy, but rather a simple
43
+ and easy-to-use library for basic database operations, especially for small
44
+ projects. It is NOT asynchronous and does not support complex queries (at this
45
+ time).
46
+
47
+ The ideal use case is more for Python CLI tools that need to store data in a
48
+ database-like format without needing to learn SQL or use a full ORM.
49
+
50
+ Full documentation is available on the [Documentation
51
+ Website](https://sqliter.grantramsay.dev)
52
+
53
+ > [!CAUTION]
54
+ > This project is still in the early stages of development and is lacking some
55
+ > planned functionality. Please use with caution.
56
+ >
57
+ > Also, structures like `list`, `dict`, `set` etc are not supported **at this
58
+ > time** as field types, since SQLite does not have a native column type for
59
+ > these. I will look at implementing these in the future, probably by
60
+ > serializing them to JSON or pickling them and storing in a text field. For
61
+ > now, you can actually do this manually when creating your Model (use `TEXT` or
62
+ > `BLOB` fields), then serialize before saving after and retrieving data.
63
+ >
64
+ > See the [TODO](TODO.md) for planned features and improvements.
65
+
66
+ - [Features](#features)
67
+ - [Installation](#installation)
68
+ - [Optional Dependencies](#optional-dependencies)
69
+ - [Quick Start](#quick-start)
70
+ - [Contributing](#contributing)
71
+ - [License](#license)
72
+
73
+ ## Features
74
+
75
+ - Table creation based on Pydantic models
76
+ - CRUD operations (Create, Read, Update, Delete)
77
+ - Basic query building with filtering, ordering, and pagination
78
+ - Transaction support
79
+ - Custom exceptions for better error handling
80
+ - Full type hinting and type checking
81
+ - No external dependencies other than Pydantic
82
+ - Full test coverage
83
+ - Can optionally output the raw SQL queries being executed for debugging
84
+ purposes.
85
+
86
+ ## Installation
87
+
88
+ You can install SQLiter using whichever method you prefer or is compatible with
89
+ your project setup.
90
+
91
+ With `uv` which is rapidly becoming my favorite tool for managing projects and
92
+ virtual environments (`uv` is used for developing this project and in the CI):
93
+
94
+ ```bash
95
+ uv add sqliter-py
96
+ ```
97
+
98
+ With `pip`:
99
+
100
+ ```bash
101
+ pip install sqliter-py
102
+ ```
103
+
104
+ Or with `Poetry`:
105
+
106
+ ```bash
107
+ poetry add sqliter-py
108
+ ```
109
+
110
+ ### Optional Dependencies
111
+
112
+ Currently by default, the only external dependency is Pydantic. However, there
113
+ are some optional dependencies that can be installed to enable additional
114
+ features:
115
+
116
+ - `inflect`: For pluralizing table names (if not specified). This just offers a
117
+ more-advanced pluralization than the default method used. In most cases you
118
+ will not need this.
119
+
120
+ See [Installing Optional
121
+ Dependencies](https://sqliter.grantramsay.dev/installation#optional-dependencies)
122
+ for more information.
123
+
124
+ ## Quick Start
125
+
126
+ Here's a quick example of how to use SQLiter:
127
+
128
+ ```python
129
+ from sqliter import SqliterDB
130
+ from sqliter.model import BaseDBModel
131
+
132
+ # Define your model
133
+ class User(BaseDBModel):
134
+ name: str
135
+ age: int
136
+
137
+ # Create a database connection
138
+ db = SqliterDB("example.db")
139
+
140
+ # Create the table
141
+ db.create_table(User)
142
+
143
+ # Insert a record
144
+ user = User(name="John Doe", age=30)
145
+ db.insert(user)
146
+
147
+ # Query records
148
+ results = db.select(User).filter(name="John Doe").fetch_all()
149
+ for user in results:
150
+ print(f"User: {user.name}, Age: {user.age}")
151
+
152
+ # Update a record
153
+ user.age = 31
154
+ db.update(user)
155
+
156
+ # Delete a record
157
+ db.delete(User, "John Doe")
158
+ ```
159
+
160
+ See the [Usage](https://sqliter.grantramsay.dev/usage) section of the documentation
161
+ for more detailed information on how to use SQLiter, and advanced features.
162
+
163
+ ## Contributing
164
+
165
+ Contributions are welcome! Please feel free to submit a Pull Request.
166
+
167
+ See the [CONTRIBUTING](CONTRIBUTING.md) guide for more information.
168
+
169
+ Please note that this project is released with a Contributor Code of Conduct,
170
+ which you can read in the [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) file.
171
+
172
+ ## License
173
+
174
+ This project is licensed under the MIT License.
175
+
176
+ ```pre
177
+ Copyright (c) 2024 Grant Ramsay
178
+
179
+ Permission is hereby granted, free of charge, to any person obtaining a copy
180
+ of this software and associated documentation files (the "Software"), to deal
181
+ in the Software without restriction, including without limitation the rights
182
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
183
+ copies of the Software, and to permit persons to whom the Software is
184
+ furnished to do so, subject to the following conditions:
185
+
186
+ The above copyright notice and this permission notice shall be included in all
187
+ copies or substantial portions of the Software.
188
+
189
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
190
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
191
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
192
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
193
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
194
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
195
+ OR OTHER DEALINGS IN THE SOFTWARE.
196
+ ```
@@ -0,0 +1,13 @@
1
+ sqliter/__init__.py,sha256=ECfn02OPmiMCQvRYbfizKFhVDk00xV-HV1s2cH9037I,244
2
+ sqliter/constants.py,sha256=j0lE2cB1Uj8cNo40GGtCPdOR5asm-dHRDmGG0oyindA,1050
3
+ sqliter/exceptions.py,sha256=56yDixGEkfC-OHPG-8t067xzJhspXXoxQWFU5jkU-1M,4794
4
+ sqliter/helpers.py,sha256=75r4zMmGztVPm9_Bz3L1cSvBdx17uPEAnaggVhD70Pg,1138
5
+ sqliter/sqliter.py,sha256=n3EtU0Lj9tJaIZicapz1l6L5ofpcpmozmQ7O3QQ977A,18741
6
+ sqliter/model/__init__.py,sha256=GgULmKRn0Dq0Jz6LbHGPndS6GP3vd1uxI1KrEevofLs,237
7
+ sqliter/model/model.py,sha256=rzmYEpv28fXnLV9yuApjHyUj7bL4lkHWUzv8GXkk3kQ,4901
8
+ sqliter/query/__init__.py,sha256=MRajhjTPJqjbmmrwndVKj8vqMbK5-XufpwoIswQf5z4,239
9
+ sqliter/query/query.py,sha256=iUJ1jdp1vWp5n77by2LKjxdl0-SWEA7T01Uk2_gHvZ8,23547
10
+ sqliter_py-0.4.0.dist-info/METADATA,sha256=fmkuZ-W_ZBN7ycWuxnnxZ6FPcMe1DYRtdIBatG9otrI,7102
11
+ sqliter_py-0.4.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
12
+ sqliter_py-0.4.0.dist-info/licenses/LICENSE.txt,sha256=-r4mvgoEWzkl1hPO5k8I_iMwJate7zDj8p_Fmn7dhVg,1078
13
+ sqliter_py-0.4.0.dist-info/RECORD,,