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.1.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.1.tar.gz.
File metadata
- Download URL: Maceio-1.0.1.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 |
48ac46a97bad2f73da4b47c07af9c14a141ab1c5241976b2a1edafea1d01e886
|
|
| MD5 |
7b01985ac624b2ea1b8366f5e8835958
|
|
| BLAKE2b-256 |
d6db0bcd1af7b19c8ee9fffbabc3f7f37c5ae861e67b731e78654d8586169c27
|
File details
Details for the file Maceio-1.0.1-py3-none-any.whl.
File metadata
- Download URL: Maceio-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.7 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 |
5e2cf12ac4efe0688b0402d75f9ccd014f1ef3d0ab12c01fb84734b30928ab21
|
|
| MD5 |
6f319a61f5236814db51ba7ffc48d48f
|
|
| BLAKE2b-256 |
f1d5aa90fd58ee9c211add2b67092359d62bb39c7d53b382fe8bc0e3128243ed
|