Database utils for psycopg3
Install
pip install dbutils3-gonzalo123
From github
pip install -e git+https://github.com/gonzalo123/dbutils3#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 dbutils3-gonzalo123 3.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dbutils3-gonzalo123-3.0.2.tar.gz | 6.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dbutils3_gonzalo123-3.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.5 kB
Release files / dbutils3-gonzalo123-3.0.2.tar.gz
| Download URL | dbutils3-gonzalo123-3.0.2.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
348dd94f9a7967eba91145d4de3036c67a00b31169ad49187899509342f8b4a8
|
|
BLAKE2b-256 checksum How to use checksums |
4b1f513629865af9c1b0c9d02c2a9a866b0e2c06e17eb0c81ff8e9faa0748c52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / dbutils3_gonzalo123-3.0.2-py3-none-any.whl
| Download URL | dbutils3_gonzalo123-3.0.2-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0018ab24272a0e2ced6a23ebff31b2cc553a066df1ebe5d555ea36edb12d1bc7
|
|
BLAKE2b-256 checksum How to use checksums |
835e7b98ce3ee351af577924e96417a57787945e00db49c25a941349b8fd8690
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|