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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d850b65ef4481d7ff0305e8a30e3843d223871f36c1a81e37c5a712db7989fc |
|
MD5 | 9e7976783e7b6125194417ec0be2473e |
|
BLAKE2b-256 | d79c3a92600823b2b597cf315e90d7322f9fa74b79437a332f75b76fc1a92818 |
Close
Hashes for dbutils3_gonzalo123-3.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16aa079fd05eb79340c84aa6b198cbc298fe55265c733ae3047f5e97e5aa4287 |
|
MD5 | e170f175d27ffc8a3653fab1fe4e0c4b |
|
BLAKE2b-256 | 832efd7076b4ccb5cfae6e1926f45b653e9c0baf7f7af2bd68bb6955d873f32b |