Skip to main content

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.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

Maceio-1.0.3-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

Maceio-1.0.3-py2-none-any.whl (5.1 kB view details)

Uploaded Python 2

File details

Details for the file Maceio-1.0.3.tar.gz.

File metadata

  • Download URL: Maceio-1.0.3.tar.gz
  • Upload date:
  • Size: 3.9 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

Hashes for Maceio-1.0.3.tar.gz
Algorithm Hash digest
SHA256 60e3029389bb084a6a52a1c6878b03800574d5cb9c5095f046fd695378863d38
MD5 90c832d5dc6cd06e77971ce495b1dbcd
BLAKE2b-256 88955cf705d94070579e9db1e373dd6306aca83dd73cdf6b55704cd05f0db5ff

See more details on using hashes here.

File details

Details for the file Maceio-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: Maceio-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.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

Hashes for Maceio-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b57dd540c1a95095ba31100bb58de338657bc824c15f418a426d812f553766c3
MD5 43e87562c008e6ad8b3dd79d39c2dc8d
BLAKE2b-256 7e291eb53f30ca95170c7c934767a42059d4d2d506fd8fd98d8145d4779075e2

See more details on using hashes here.

File details

Details for the file Maceio-1.0.3-py2-none-any.whl.

File metadata

  • Download URL: Maceio-1.0.3-py2-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 2
  • 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

Hashes for Maceio-1.0.3-py2-none-any.whl
Algorithm Hash digest
SHA256 62d0d264e9077ccc21c246d25f12429278dbf5bac7a4e79a5825ed15cff8ef02
MD5 0e974632fb64f5f47d3b7a38c3311801
BLAKE2b-256 125f060a4bf3815b2f7b1f8b7b76dfef6ecf7ad65e281b50df49dd429727812a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page