Package to convert JSON data in SQL table.
Project description
MACEIÓ
Package to insert JSON data in SQL database.
Features
- Create a new table based a json structure
- Insert a new line or update in table;
How to use
from Maceio.Maceio import Maceio
if __name__ == "__main__":
# You can use only one dict withou list.
data = '''[
{
"field1":{
"subfield1": 1,
"subfield2": "TYPE1",
"subfield3":{
"sub1":"Value 1",
"sub2":"Value 2",
}
}
},
{
"field1":{
"subfield1": 2,
"subfield2": "TYPE1",
"subfield3":{
"sub1":"Value 3",
"sub2":"Value 4",
}
}
}
]
''')
maceio = Maceio('postgresql+psycopg2://user:password@host:port/database', 'schema_example')
maceio.save('table_example', data, conflicts=('subfield1', 'subfield2'))
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
Maceio-1.0.0.tar.gz
(4.0 kB
view details)
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 Maceio-1.0.0.tar.gz.
File metadata
- Download URL: Maceio-1.0.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d47d368dcf6b395ea64015353c03d4f05fc7dfdc8f5de701b6e63c0899a2171
|
|
| MD5 |
70a5c622d4ea0d548dba667d90252bea
|
|
| BLAKE2b-256 |
0425f3a47ce7a71819bd80fa1a3f879b8549ca78e2a5c89ee20caa5548506725
|
File details
Details for the file Maceio-1.0.0-py3-none-any.whl.
File metadata
- Download URL: Maceio-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4c063a24b53d8a673d6b5b2ea42136394fd371b6d4f6f77aea663d7fbeb001d
|
|
| MD5 |
447223f48a91fea04f04a869cbaac892
|
|
| BLAKE2b-256 |
a60fc003160226c7afdd49217218a4d61bf3297c9a74f6d4c87d6cef074bea03
|