Skip to main content

psycopg3 db utils

Project description

Database utils for psycopg3

dbutils

Install

pip install dbutils3-gonzalo123

From github

pip install -e git+https://github.com/gonzalo123/dbutils3#egg=dbutils-gonzalo123

Run test

pytest

Note: Set up your connection parameters within pytest.ini. I also provide one docker-compose.yml file with a PostgreSQL database ready for the testing.

[pytest]
python_files = tests.py test_*.py *_tests.py
env =
    POSTGRES_HOST=localhost
    POSTGRES_PASSWORD=password
    POSTGRES_USER=username
    POSTGRES_DB=gonzalo123

In this database ther's one table and one stored procedure:

CREATE TABLE users
(
    email  VARCHAR(256) UNIQUE NOT NULL,
    "name" VARCHAR(256)        NOT NULL
);

CREATE OR REPLACE FUNCTION hello(name varchar(100))
    RETURNS VARCHAR AS
$$
BEGIN
    RETURN 'Hello ' || name;

END;
$$
    LANGUAGE plpgsql;

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

dbutils3-gonzalo123-3.0.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

dbutils3_gonzalo123-3.0.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file dbutils3-gonzalo123-3.0.2.tar.gz.

File metadata

  • Download URL: dbutils3-gonzalo123-3.0.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for dbutils3-gonzalo123-3.0.2.tar.gz
Algorithm Hash digest
SHA256 348dd94f9a7967eba91145d4de3036c67a00b31169ad49187899509342f8b4a8
MD5 03fe60fb79b47c102b0467e32c85886a
BLAKE2b-256 4b1f513629865af9c1b0c9d02c2a9a866b0e2c06e17eb0c81ff8e9faa0748c52

See more details on using hashes here.

File details

Details for the file dbutils3_gonzalo123-3.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dbutils3_gonzalo123-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0018ab24272a0e2ced6a23ebff31b2cc553a066df1ebe5d555ea36edb12d1bc7
MD5 31833088951c50ac87ce2f1f69df836b
BLAKE2b-256 835e7b98ce3ee351af577924e96417a57787945e00db49c25a941349b8fd8690

See more details on using hashes here.

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