psycopg3 db utils
Project description
Database utils for psycopg3
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for dbutils3-gonzalo123-3.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a246f11de3c0d96e92935a1e61810c6823b08890b80f4e329331d624dbb52ee |
|
MD5 | 8b8a9c47f17192b748a69ce300bfc1c8 |
|
BLAKE2b-256 | c218deae4b0180e4cdb4b1ac5072985e5160a022bf3cd8d7dd70dae35d8fd440 |
Close
Hashes for dbutils3_gonzalo123-3.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6188a3df0cb7e71db96a7dc54a5496b55ab2b6241c8e8f6de30b4b7291940c1a |
|
MD5 | 62b0ef05ed09c43cfaab21565f235c20 |
|
BLAKE2b-256 | d8534647b7d6c658927992a7329e3567c1649404e4651e0eb27536c48843aace |