sqlce 0.1.2__cp38-cp38-win_amd64.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.
sqlce/__init__.py ADDED
@@ -0,0 +1,6 @@
1
+ from sqlce._sdf_native import ColumnSchema
2
+ from sqlce._sdf_native import InvalidPasswordError
3
+ from sqlce._sdf_native import SdfDatabase
4
+ from sqlce._sdf_native import UnsupportedEncryptionModeError
5
+
6
+ __all__ = ["ColumnSchema", "InvalidPasswordError", "SdfDatabase", "UnsupportedEncryptionModeError"]
sqlce/__init__.pyi ADDED
@@ -0,0 +1,7 @@
1
+ from sqlce._sdf_native import ColumnSchema
2
+ from sqlce._sdf_native import InvalidPasswordError
3
+ from sqlce._sdf_native import Row
4
+ from sqlce._sdf_native import SdfDatabase
5
+ from sqlce._sdf_native import UnsupportedEncryptionModeError
6
+
7
+ __all__ = ["ColumnSchema", "InvalidPasswordError", "Row", "SdfDatabase", "UnsupportedEncryptionModeError"]
Binary file
sqlce/_sdf_native.pyi ADDED
@@ -0,0 +1,64 @@
1
+ import datetime
2
+ import decimal
3
+ import uuid
4
+ from typing import Dict
5
+ from typing import List
6
+ from typing import Optional
7
+ from typing import Union
8
+ from typing import overload
9
+
10
+ ColumnValue = Union[
11
+ None,
12
+ int,
13
+ float,
14
+ bool,
15
+ str,
16
+ bytes,
17
+ datetime.datetime,
18
+ decimal.Decimal,
19
+ uuid.UUID,
20
+ ]
21
+
22
+ Row = Dict[str, ColumnValue]
23
+
24
+
25
+ class UnsupportedEncryptionModeError(ValueError):
26
+ ...
27
+
28
+
29
+ class InvalidPasswordError(ValueError):
30
+ ...
31
+
32
+
33
+ class ColumnSchema:
34
+ @property
35
+ def ordinal(self) -> int: ...
36
+
37
+ @property
38
+ def name(self) -> str: ...
39
+
40
+ @property
41
+ def type_name(self) -> str: ...
42
+
43
+ @property
44
+ def declared_size(self) -> int: ...
45
+
46
+ @property
47
+ def precision(self) -> Optional[int]: ...
48
+
49
+ @property
50
+ def scale(self) -> Optional[int]: ...
51
+
52
+
53
+ class SdfDatabase:
54
+ @overload
55
+ def __init__(self, path: str) -> None: ...
56
+
57
+ @overload
58
+ def __init__(self, path: str, password: str) -> None: ...
59
+
60
+ def list_tables(self) -> List[str]: ...
61
+
62
+ def table_schema(self, table_name: str) -> List[ColumnSchema]: ...
63
+
64
+ def read_table(self, table_name: str) -> List[Row]: ...
@@ -0,0 +1,66 @@
1
+ Metadata-Version: 2.2
2
+ Name: sqlce
3
+ Version: 0.1.2
4
+ Summary: Cross-platform lib for reading SQL Server CE (.sdf)
5
+ Author-Email: boykopovar <boykopovar@gmail.com>
6
+ License: MIT
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.8
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: C++
17
+ Classifier: Operating System :: Microsoft :: Windows
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Project-URL: Homepage, https://github.com/boykopovar/sqlce
20
+ Project-URL: Issues, https://github.com/boykopovar/sqlce/issues
21
+ Requires-Python: >=3.8
22
+ Provides-Extra: dev
23
+ Requires-Dist: scikit-build-core>=0.10; extra == "dev"
24
+ Requires-Dist: pybind11>=2.12; extra == "dev"
25
+ Requires-Dist: build; extra == "dev"
26
+ Requires-Dist: twine; extra == "dev"
27
+ Requires-Dist: pytest; extra == "dev"
28
+ Description-Content-Type: text/markdown
29
+
30
+ # sqlce
31
+
32
+ Реверс-инжиниринг бинарного формата `.sdf` (SQL Server Compact Edition 4.0).
33
+
34
+ Анализ внутреннего устройства формата по декомпилированным компонентам SQL CE. Цель - предоставить кроссплатформенную и независимую от рантайма реализацию чтения `.sdf` и документацию формата.
35
+
36
+
37
+ - `core/` - реализация парсера на C++
38
+ - `bindings/` - Биндинги для C++ библиотеки к другим языкам
39
+ - `python/sqlce/` - Python API
40
+ - `research/` - Экспериментальные скрипты
41
+
42
+
43
+ ```bash
44
+ pip install sqlce
45
+ ```
46
+
47
+ ```python
48
+ from sqlce import SdfDatabase
49
+
50
+ db = SdfDatabase("example.sdf", password="secret123")
51
+
52
+ for table_name in db.list_tables():
53
+ print(table_name, db.table_schema(table_name))
54
+ for row in db.read_table(table_name):
55
+ print(row)
56
+ ```
57
+
58
+ Текущая [реализация](main.py) поддерживает чтение (поддерживается передача пароля) списка таблиц, структуры таблиц, содержимого записей. Использует c++.
59
+
60
+ [Документация](docs/ru/python.md)
61
+
62
+ [Documentation](docs/en/python.md)
63
+
64
+ [Соглашения по написанию кода](docs/CONVENTIONS.md) (PR приветствуются)
65
+
66
+ > Исключительно для интероперабельности с существующими файлами `.sdf` формата. Не содержит оригинальный код продукта.
@@ -0,0 +1,8 @@
1
+ sqlce/__init__.py,sha256=92aaXWxoNWKmAZkdYhPujH8VrQIS1y4gVls34Ixy5dc,304
2
+ sqlce/__init__.pyi,sha256=b0MtKSMX_t6TAKSEStRVNAIwLwCVWcZa6LYgr_2b234,346
3
+ sqlce/_sdf_native.cp38-win_amd64.pyd,sha256=4YZRf1ieMYKywy5jzEKKK9-EvayQypJNp-QyyVry8LI,330240
4
+ sqlce/_sdf_native.pyi,sha256=KyWcezh_cBqm_QpSvNj2wPRpJ2pOTB_X-sScq-J0Lh0,1196
5
+ sqlce-0.1.2.dist-info/METADATA,sha256=mQ-agKyxzWalVYpBHSWMh57k82qTOZU9WSBn6wYHqng,2860
6
+ sqlce-0.1.2.dist-info/WHEEL,sha256=6xsOvnRvdO_DZnG7I-m_ODmDkilFxagSp_H3DHhYHkg,103
7
+ sqlce-0.1.2.dist-info/licenses/LICENSE,sha256=cr7i-nJwHFg-dePCvyD2avEFlxKjfHGnpS_KqiDZz9c,1086
8
+ sqlce-0.1.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: scikit-build-core 1.0.1
3
+ Root-Is-Purelib: false
4
+ Tag: cp38-cp38-win_amd64
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 boykopovar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.