Skip to main content

simple postgres orm for python

Project description

Pgorm

Pgorm is a simple orm for postgre in python

install

pip install py-pgorm==0.0.8

Usage

import pgorm 
def getCursor():
    dbconf={
        "database":"<dbname>",
        "user":"<user>", 
        "password": "<password>"
    }
    cursor = pgorm.getDbCursor(dbconf)
    return cursor

def test_create_table():

    cursor = getCursor()
    sql = '''
        drop table t;
        create table if not exists t(
            code varchar(10) not null, 
            label real not null
        );'''

    try:
        cursor.execute(sql) 
    except Exception as e:
        pass

Examples

Refer to examples

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-pgorm-0.0.10.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

py_pgorm-0.0.10-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file py-pgorm-0.0.10.tar.gz.

File metadata

  • Download URL: py-pgorm-0.0.10.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.13

File hashes

Hashes for py-pgorm-0.0.10.tar.gz
Algorithm Hash digest
SHA256 cfb0777d194779b7739195904eea5c52ab7729290160a4deb3c9c697c3e6d96e
MD5 91b9421724ff66de5cf062c9e1757fd6
BLAKE2b-256 fcf4a82e7a052ad9eb3f6f4f91fe850665bd35c2354a7b41df793f462d4d76a5

See more details on using hashes here.

File details

Details for the file py_pgorm-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: py_pgorm-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.13

File hashes

Hashes for py_pgorm-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 aeb37b98c6d22ac121e5b7034716baa5ab29b49adb4b26d55485deff9da25ab4
MD5 7d06964976e855e789e0875281f45989
BLAKE2b-256 61c6fdc6184e5e2ed9ddc2329a66f7b2b6eecdda214cc7a6e7bd33fd9f9117d5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page