Skip to main content

Yet another Python PostgreSQL database driver

Requirements

  • Python 2.7, 3.3+

Installation

Install as a package

$ pip install minipg

Install as a module

$ cd $(PROJECT_HOME)
$ wget https://github.com/nakagami/minipg/raw/master/minipg/minipg.py

Example

Query:

import minipg
conn = minipg.connect(host='localhost',
                    user='postgres',
                    password='secret',
                    database='database_name')
cur = conn.cursor()
cur.execute('select foo, bar from baz')
for r in cur.fetchall():
   print(r[0], r[1])
conn.close()

COPY TO:

import minipg
conn = minipg.connect(host='localhost',
                    user='postgres',
                    password='secret',
                    database='database_name')
f = open('foo.txt', 'bw')
conn.execute('COPY foo_table TO stdout', f)
f.close()
conn.close()

COPY FROM:

import minipg
conn = minipg.connect(host='localhost',
                    user='postgres',
                    password='secret',
                    database='database_name')
f = open('foo.txt', 'br')
conn.execute('COPY foo_table FROM stdin', f)
f.close()
conn.close()

Restrictions and Unsupported Features

  • Authentication METHOD only can ‘trust’ or ‘md5’ in pg_hba.conf.

  • Not full support for array data types.

  • Not support for prepared statements.

Metadata

Release files for minipg 0.4.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 minipg 0.4.0
File Size Uploaded Provenance Actions
minipg-0.4.0.tar.gz 128.7 kB Without provenance Details for minipg-0.4.0.tar.gz

Release files / minipg-0.4.0.tar.gz

Download URL minipg-0.4.0.tar.gz
Size 128.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dd6041f3c017e2f6f8b4ce2e433ebce191e9bb3ce311f8b1fb6ab735331edf81
BLAKE2b-256 checksum
How to use checksums
31fa7fa2b746c920c32bdbce4086acb0140e9283e42b73279bc84738d957c268
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for minipg 0.4.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

0.4.0 This release

1 release file 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