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.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb231c93b3dcc74fdd32dcb89bf6719a137ac534eb07b22f23446d68018d8c3c |
|
MD5 | 0b271b6b50af1d099949b9839d8b1384 |
|
BLAKE2b-256 | 58b2c93e89c40d6571af23ec55bd2103814478dc4dec100cd2deffa84321037b |
Close
Hashes for dbutils_gonzalo123-1.3.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc16e8b23f71a66f826656a27ddb06a348f7bb4dca78590258eec95a82d30148 |
|
MD5 | 39439262800bf194ea54633ff41e1f7d |
|
BLAKE2b-256 | 721504929b0d60219f282409c12285485538c0ad061587d36abdf2dddbc1ad23 |