minipg


Nameminipg JSON
Version 0.9.0 PyPI version JSON
download
home_pagehttps://github.com/nakagami/minipg/
SummaryYet another PostgreSQL database driver
upload_time2024-01-29 09:34:49
maintainer
docs_urlNone
authorHajime Nakagami
requires_python
licenseMIT
keywords postgresql
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =============
minipg
=============

Yet another Python PostgreSQL database driver.

Requirements
-----------------

- PostgreSQL 9.6+
- Python 3.9+

Installation
-----------------

use pip
::

    $ pip install minipg

or

copy a module file.
::

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

Example
-----------------

::

   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()

SSL Connection
++++++++++++++++++

You can make an SSL connection with an instance of SSLContext.
Below is an example of an ssl connection without certificate validation.

::

   import ssl
   import minipg
   ssl_context = ssl.create_default_context()
   ssl_context.check_hostname = False
   ssl_context.verify_mode = ssl.CERT_NONE
   conn = minipg.connect(host='localhost',
                       user='postgres',
                       password='secret',
                       database='database_name',
                       ssl_context=ssl_context)


Restrictions and Unsupported Features
--------------------------------------

- Supported Authentication METHOD are only 'trust', 'md5' and 'scram-sha-256'.
- Not full support for array data types.
- Not support for prepared statements.

For MicroPython
----------------

See https://github.com/nakagami/micropg .
It's a minipg subset driver.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nakagami/minipg/",
    "name": "minipg",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "PostgreSQL",
    "author": "Hajime Nakagami",
    "author_email": "nakagami@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/da/e3/d51ef9add3bad39228942bea7bd553aebb794e54d0a5307f326c192227e6/minipg-0.9.0.tar.gz",
    "platform": null,
    "description": "=============\nminipg\n=============\n\nYet another Python PostgreSQL database driver.\n\nRequirements\n-----------------\n\n- PostgreSQL 9.6+\n- Python 3.9+\n\nInstallation\n-----------------\n\nuse pip\n::\n\n    $ pip install minipg\n\nor\n\ncopy a module file.\n::\n\n    $ cd $(SOMEWHERE_PYTHON_PATH)\n    $ wget https://github.com/nakagami/minipg/raw/master/minipg.py\n\nExample\n-----------------\n\n::\n\n   import minipg\n   conn = minipg.connect(host='localhost',\n                       user='postgres',\n                       password='secret',\n                       database='database_name')\n   cur = conn.cursor()\n   cur.execute('select foo, bar from baz')\n   for r in cur.fetchall():\n      print(r[0], r[1])\n   conn.close()\n\nSSL Connection\n++++++++++++++++++\n\nYou can make an SSL connection with an instance of SSLContext.\nBelow is an example of an ssl connection without certificate validation.\n\n::\n\n   import ssl\n   import minipg\n   ssl_context = ssl.create_default_context()\n   ssl_context.check_hostname = False\n   ssl_context.verify_mode = ssl.CERT_NONE\n   conn = minipg.connect(host='localhost',\n                       user='postgres',\n                       password='secret',\n                       database='database_name',\n                       ssl_context=ssl_context)\n\n\nRestrictions and Unsupported Features\n--------------------------------------\n\n- Supported Authentication METHOD are only 'trust', 'md5' and 'scram-sha-256'.\n- Not full support for array data types.\n- Not support for prepared statements.\n\nFor MicroPython\n----------------\n\nSee https://github.com/nakagami/micropg .\nIt's a minipg subset driver.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Yet another PostgreSQL database driver",
    "version": "0.9.0",
    "project_urls": {
        "Homepage": "https://github.com/nakagami/minipg/"
    },
    "split_keywords": [
        "postgresql"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dae3d51ef9add3bad39228942bea7bd553aebb794e54d0a5307f326c192227e6",
                "md5": "cde1182d6cad9b6e9d586ea98ba097bb",
                "sha256": "9cf4049238bafa5bb51f3413637c65a16216811ab7863862c72213ad3d0bcb92"
            },
            "downloads": -1,
            "filename": "minipg-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "cde1182d6cad9b6e9d586ea98ba097bb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10192,
            "upload_time": "2024-01-29T09:34:49",
            "upload_time_iso_8601": "2024-01-29T09:34:49.177855Z",
            "url": "https://files.pythonhosted.org/packages/da/e3/d51ef9add3bad39228942bea7bd553aebb794e54d0a5307f326c192227e6/minipg-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-29 09:34:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nakagami",
    "github_project": "minipg",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "minipg"
}
        
Elapsed time: 0.66520s