No project description provided
Project description
database-extractor
Description
This project intends to create a python package to extract the content of a database and convert it into a python object. For the moment, this package can only extract the content of SQLite3 databases.
Export format
A database can be exported as a JSON or as an XML at the moment. A short exemple of both implementation is given below.
XML
<?xml version='1.0' encoding='utf-8'?>
<database name="resources/dummy.db">
<table name="Tab1">
<row>
<column type="str" key="userId" value="C2V6" />
<column type="NoneType" key="convId" value="None" />
<column type="str" key="sent" value="0" />
</row>
</table>
<table name="Tab2">
<row>
<column type="str" key="convId" value="uaz-57" />
<column type="int" key="messageId" value="1" />
<column type="str" key="extKey" value="chat" />
</row>
<row>
<column type="str" key="convId" value="r2d-2a" />
<column type="int" key="messageId" value="3" />
<column type="str" key="extKey" value="27FwAPH4QapLXF5fhDcs7" />
</row>
<row>
<column type="str" key="convId" value="av7-dp" />
<column type="int" key="messageId" value="5" />
<column type="bytes" key="extKey" value="0000040f" />
</row>
</table>
</database>
JSON
{
"resources/dummy.db": {
"Tab1": [
{
"userId": {
"value": "C2V6",
"type": "str"
},
"convId": {
"value": null,
"type": "NoneType"
},
"sent": {
"value": 0,
"type": "int"
}
}
],
"Tab2": [
{
"convId": {
"value": "uaz-57",
"type": "str"
},
"messageId": {
"value": 1,
"type": "int"
},
"extKey": {
"value": "chat",
"type": "str"
}
},
{
"convId": {
"value": "r2d-2a",
"type": "str"
},
"messageId": {
"value": 3,
"type": "int"
},
"extKey": {
"value": "27FwAPH4QapLXF5fhDcs7",
"type": "str"
}
},
{
"convId": {
"value": "av7-dp",
"type": "str"
},
"messageId": {
"value": 5,
"type": "int"
},
"extKey": {
"value": "0000040f",
"type": "bytes"
}
}
]
}
}
Features to implement
- extractors: sqlite3 WAL
Project details
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 database_converter-0.0.3.tar.gz.
File metadata
- Download URL: database_converter-0.0.3.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6999292f9beef8234f006f1c65794fd8d8d171242d6a78c50cdb8334b86acc98
|
|
| MD5 |
3abccecc95996483b59ec8cace6945aa
|
|
| BLAKE2b-256 |
5e0b3d0864cb526b1d366ad326500058968f4255a1c3aa86ea7d522f991f7cc9
|
File details
Details for the file database_converter-0.0.3-py3-none-any.whl.
File metadata
- Download URL: database_converter-0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32c0a9b0dad4f092ec0c971c9cc37708cdb1eaabac82cc6f28330ab5deffe5a8
|
|
| MD5 |
24f4e41c70088f8cbecf4ed73221bfb2
|
|
| BLAKE2b-256 |
2a1a534340a9cb41099cca67dd165d7ff16c2f272f6c8d5860f1355d12b7b557
|