Skip to main content

psycopg2-iam

Custom Connection Factory class (RDS, Redshift) with build-in IAM authentication and SSL bundle downloader support.

Installation

Install package

poetry add psycopg2-iam

Usage

Create connection directly from secret

from psycopg2_iam import connect

conn = connect(secret="secretId")

Using connect function

from psycopg2_iam import connect
connect(dsn="...")

Pass connection factory class to psycopg2.connect()

import psycopg2 
from psycopg2_iam import IAMConnection

psycopg2.connect(dsn="...", connection_factory=IAMConnection)

Create DSN from AWS generated RDS secret

import boto3
import json
import psycopg2 
from psycopg2_iam import IAMConnection, dsn_from_rds_secret

secrets = boto3.client("secretsmanager")
db_secret = json.loads(secrets.get_secret_value(SecretId="/dynks/rds/readonly").get("SecretString"))

psycopg2.connect(dsn=dsn_from_rds_secret(db_secret), connection_factory=IAMConnection)

Metadata

Release files for psycopg2-iam 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for psycopg2-iam 1.1.0
File Size Uploaded Provenance
psycopg2-iam-1.1.0.tar.gz 3.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for psycopg2-iam 1.1.0
File Interpreter ABI Platform
psycopg2_iam-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.6 kB

Release files / psycopg2-iam-1.1.0.tar.gz

Download URL psycopg2-iam-1.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dea67c8f11b0fea21d124b72f19e0166a4ebf6960285bac5fdf358b0f671f08a
BLAKE2b-256 checksum
How to use checksums
f78dd6ad2ada58f71d568ebc2a604d395a1050370c63083f988462fefb17890b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.8.5 Darwin/20.6.0

Release files / psycopg2_iam-1.1.0-py3-none-any.whl

Download URL psycopg2_iam-1.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba756e57864e7ccee3e9aadf7c7625d2f7bd6b04509f788ec422f8b9147f7099
BLAKE2b-256 checksum
How to use checksums
753a7a497a26a1a1599f620433f6fc7c01bc1f818bd4de69d16e5da9e0c952ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.8.5 Darwin/20.6.0

Security for psycopg2-iam 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page