Skip to main content

A Python package for managing database operations with a focus on logging and simple CRUD operations.

Project description

DBops Manager

A Python package for managing database operations with a focus on logging and CRUD operations.

Installation

You can install the package using pip:

pip install dbops-manager==0.1.6

Features

  • Connection Management: Easily manage database connections with support for environment variables.
  • CRUD Operations: Perform Create, Read, Update, and Delete operations on your database.
  • Logging: Log operations to the database for better tracking and debugging.

Usage

Basic Usage

from dbops_manager.postgres_ops import PostgresOps

# Initialize the PostgreSQL operations
db_ops = PostgresOps()

# Create a table
db_ops.create_table('test_table', 'id SERIAL PRIMARY KEY, name VARCHAR(100), age INTEGER')

# Insert a row
db_ops.insert('test_table', {'name': 'Alice', 'age': 30})

# Fetch rows
rows = db_ops.fetch('test_table')
print(rows)

# Update a row
db_ops.update('test_table', {'name': 'Bob'}, 'id = 1')

# Delete a row
db_ops.delete('test_table', 'id = 1')

Logging

The package logs operations to the dbops_manager_logs table. Ensure that the logging_enabled parameter is set to True when initializing PostgresOps.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

dbops_manager-0.1.7.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

dbops_manager-0.1.7-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file dbops_manager-0.1.7.tar.gz.

File metadata

  • Download URL: dbops_manager-0.1.7.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for dbops_manager-0.1.7.tar.gz
Algorithm Hash digest
SHA256 aaf374cb9f8e6e097cea819eae622574bd617c8c959962204efbe5fbad25e350
MD5 61e2b40a9fa3762f890cd6c5ade39a1e
BLAKE2b-256 0111227982412beafbd68d60b04ac00ff326002c3c3ea6122e1d77127c59a194

See more details on using hashes here.

File details

Details for the file dbops_manager-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: dbops_manager-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for dbops_manager-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 742952fc289b4d05da11e6145ee28bbd4b88f50e08583726864128f36c7286a6
MD5 d989de447abc4074cb89d12aa8c9806b
BLAKE2b-256 b13cf2ec1b34759f024b111f50d341c5d828d9e1011ca29aefcdb0d01f7882f6

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