Skip to main content

Provides basic postgres functions for databases request.

select:

def get_my_data():
   def _(cursor):
       cursor.execute(f"select data from database")
       return cursor.fetchone()

   result = select(_)

   return result.get('data') if result else None

insert:

def insert_my_data():
   data = {
       'data_1': data_1,
       'data_2': data_2
   }

   insert(TABLE_NAME, data)

update: the primary key can be a string for array who have only one primary key but if it's a tuple, you can put a table of string : ['first_primay_key', 'second_primay_key']

def update_my_data():
   data = {
       'data_1': data_1,
       'data_2': data_2
   }

   update(TABLE_NAME, 'my_primary_key', data)

upsert: Upsert is a function who insert if the data doesn't exist. And update if the data can be updated. the primary key can be a string for array who have only one primary key but if it's a tuple, you can put a table of string : ['first_primay_key', 'second_primay_key']

def upsert_my_data():
   data = {
       'data_1': data_1,
       'data_2': data_2
   }

   upsert(TABLE_NAME, 'my_primary_key', data)

delete:

def delete_my_data():
   delete(TABLE_NAME, primary_key, data_id)

Metadata

Release files for comapsmarthome-postgres-client 0.1.3

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

Source distribution (sdist)

Source distribution for comapsmarthome-postgres-client 0.1.3
File Size Uploaded Provenance
comapsmarthome-postgres-client-0.1.3.tar.gz 1.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for comapsmarthome-postgres-client 0.1.3
File Interpreter ABI Platform
comapsmarthome_postgres_client-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 3.4 kB

Release files / comapsmarthome-postgres-client-0.1.3.tar.gz

Download URL comapsmarthome-postgres-client-0.1.3.tar.gz
Size 1.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d91bef3020f5c8207f7ee52d9022e25d5e95ce01f066125d18c5da7027dfc302
BLAKE2b-256 checksum
How to use checksums
00c51f0ab7c0129b02c8e27453f989fbf09fe819574bdc7531bfab2d8371e088
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

Release files / comapsmarthome_postgres_client-0.1.3-py3-none-any.whl

Download URL comapsmarthome_postgres_client-0.1.3-py3-none-any.whl
Size 1.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd688af5985fb3dba3a8ebd5ef583419e4523cf0ea6f04b272b7bf659f692007
BLAKE2b-256 checksum
How to use checksums
a050b539602d1e68491a613578496f8ff1c58f05ac156fd2f252a322341fad24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

Security for comapsmarthome-postgres-client 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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