psycopg2 db utils
Project description
Database utils for psycopg2
Install
pip install dbutils-gonzalo123
From github
pip install -e git+https://github.com/gonzalo123/dbutils#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 dbutils-gonzalo123-1.3.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77b1ec8053d3399cc5d83f4ca299351dcde243de621ed6651996d1b8fb78b89e |
|
MD5 | 3941de0087ba712b5c2a91c3b6a3b21c |
|
BLAKE2b-256 | bc06fdc56b3b5113a796c9271505f5778de4a102ede1c5e2621572fbded4db5e |
Close
Hashes for dbutils_gonzalo123-1.3.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46d0b8af1559c35146ac24ae08554e76c3015ba4a4a1754af46b428c011c6c4b |
|
MD5 | 5259e44a60d48575f06affdf1fdb3742 |
|
BLAKE2b-256 | 698dc40c574d286cd4e872a254b6e87f182203f9b2c63d42d175ac4b5a5beeda |