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;
Metadata
Release files for dbutils-gonzalo123 1.3.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dbutils-gonzalo123-1.3.11.tar.gz | 5.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dbutils_gonzalo123-1.3.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.4 kB
Release files / dbutils-gonzalo123-1.3.11.tar.gz
| Download URL | dbutils-gonzalo123-1.3.11.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb231c93b3dcc74fdd32dcb89bf6719a137ac534eb07b22f23446d68018d8c3c
|
|
BLAKE2b-256 checksum How to use checksums |
58b2c93e89c40d6571af23ec55bd2103814478dc4dec100cd2deffa84321037b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / dbutils_gonzalo123-1.3.11-py3-none-any.whl
| Download URL | dbutils_gonzalo123-1.3.11-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc16e8b23f71a66f826656a27ddb06a348f7bb4dca78590258eec95a82d30148
|
|
BLAKE2b-256 checksum How to use checksums |
721504929b0d60219f282409c12285485538c0ad061587d36abdf2dddbc1ad23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|