Skip to main content

Postgres Helper

The postgres-helper library is build on top of psycopg2. It will be really helpful for running the basic postgresql query in python.

Checkout the official documentation of this library here: postgres-helper.readthedocs.io/

Installation

For installation of postgres-helper, you need to run following command

pip install postgres-helper

Examples using this library

Please check the official documentation here: https://postgres-helper.readthedocs.io/.

#Library import
from pg.pg import Pg

# Initialization of library
pg = Db(dbname='postgres', user='postgres', password='admin', host='localhost', port='5432')

# Get the column names of the specific table
pg.get_columns_name(table='pg_table')

# Get values from specific column of table
pg.get_values_from_column(column='pg_table_col', table='pg_table', schema='public')

# Create schema
pg.create_schema(name='schema_name')

# Create column
pg.create_column(column='col_name', table='pg_table', col_datatype='varchar', schema='public')

# Update column
pg.update_column(column='col_name', value='updated_value', table='pg_table', where_column='where_col', where_value="where_val", schema='public')

# Delete table
pg.delete_table(name='pg_table', schema='public')

# Delete values
pg.delete_values(table_name='pg_table', condition='name=value', schema='public')

Metadata

Release files for postgres-helper 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for postgres-helper 0.0.5
File Size Uploaded
postgres-helper-0.0.5.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for postgres-helper 0.0.5
File Interpreter ABI Platform
postgres_helper-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / postgres-helper-0.0.5.tar.gz

Download URL postgres-helper-0.0.5.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d471cc8f82b84e10461583c29d00e122e57133a1bb734208f70096dd7b3d4912
BLAKE2b-256 checksum
How to use checksums
e5c2ee7ec2caba21bf9b85bdf181e08569da5efb76e52da9c05f33a58eb53b5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

Release files / postgres_helper-0.0.5-py3-none-any.whl

Download URL postgres_helper-0.0.5-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d7cf33b076f3a7544846f5d2f6219585294f6c39be77895941d7d2bc9ecfe1a
BLAKE2b-256 checksum
How to use checksums
ce2abc6bb455fc4ccb89f491110c2819d1e28b90448e68baa95e9e9be6f44242
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page