Skip to main content

Pyton database wrapper

Project description

zpy-database v0.1.1

Zguillez | Guillermo de la Iglesia

Pyton database wrapper

Getting Started

Install

pip install --upgrade zpy-database

Usage

from zpy_database import database as db

db.connect({
    'conn': os.environ['DB_HOST'],
    'database': os.environ['DB_NAME'],
    'user': os.environ['DB_USER'],
    'password': os.environ['DB_PASS']
})
data = db.sql("SELECT id, name FROM my_table")
print(data[0])
data = db.dict("SELECT id, name FROM my_table", ['id', 'name'])
print(data[0]['name'])
db.close()

Contributing and issues

Contributors are welcome, please fork and send pull requests! If you have any ideas on how to make this project better then please submit an issue or email me.

License

©2023 Zguillez.IO

Original code licensed under MIT Open Source projects used within this project retain their original licenses.

Changelog

v0.1.1 (February 13, 2023)

  • Initial commit

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

zpy-database-0.1.1.tar.gz (3.0 kB view hashes)

Uploaded Source

Supported by

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