psycopg2 db utils
Project description
Database utils for psycopg2
Install
pip install 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.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa24490ea3a95765d9092eabf29470e5e18158b3e484240f18055ac866dbc541 |
|
MD5 | 8d0d4554a5c1f8fba0229991032b3a58 |
|
BLAKE2b-256 | d0f8787f941ea0a7607990effde314b5f6a7f368f35be8380e22f85502c6b8e8 |