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
File details
Details for the file dbutils-gonzalo123-1.3.11.tar.gz
.
File metadata
- Download URL: dbutils-gonzalo123-1.3.11.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb231c93b3dcc74fdd32dcb89bf6719a137ac534eb07b22f23446d68018d8c3c |
|
MD5 | 0b271b6b50af1d099949b9839d8b1384 |
|
BLAKE2b-256 | 58b2c93e89c40d6571af23ec55bd2103814478dc4dec100cd2deffa84321037b |
File details
Details for the file dbutils_gonzalo123-1.3.11-py3-none-any.whl
.
File metadata
- Download URL: dbutils_gonzalo123-1.3.11-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc16e8b23f71a66f826656a27ddb06a348f7bb4dca78590258eec95a82d30148 |
|
MD5 | 39439262800bf194ea54633ff41e1f7d |
|
BLAKE2b-256 | 721504929b0d60219f282409c12285485538c0ad061587d36abdf2dddbc1ad23 |