py-pgorm


Namepy-pgorm JSON
Version 0.0.10 PyPI version JSON
download
home_pagehttp://github.com/ahuigo/py-pgorm
Summarysimple postgres orm for python
upload_time2023-10-11 12:56:05
maintainer
docs_urlNone
authorahuigo
requires_python>=3.6.1
licenseMIT
keywords orm python postgres
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/ahuigo/py-pgorm/blob/master/tests)

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/ahuigo/py-pgorm",
    "name": "py-pgorm",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6.1",
    "maintainer_email": "",
    "keywords": "orm,python,postgres",
    "author": "ahuigo",
    "author_email": "ahui132@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/fc/f4/a82e7a052ad9eb3f6f4f91fe850665bd35c2354a7b41df793f462d4d76a5/py-pgorm-0.0.10.tar.gz",
    "platform": null,
    "description": "# Pgorm\nPgorm is a simple orm for postgre in python\n\n## install\n\n    pip install py-pgorm==0.0.8\n\n## Usage\n\n    import pgorm \n    def getCursor():\n        dbconf={\n            \"database\":\"<dbname>\",\n            \"user\":\"<user>\", \n            \"password\": \"<password>\"\n        }\n        cursor = pgorm.getDbCursor(dbconf)\n        return cursor\n\n    def test_create_table():\n    \n        cursor = getCursor()\n        sql = '''\n            drop table t;\n            create table if not exists t(\n                code varchar(10) not null, \n                label real not null\n            );'''\n\n        try:\n            cursor.execute(sql) \n        except Exception as e:\n            pass\n    \n\n## Examples\nRefer to [examples](https://github.com/ahuigo/py-pgorm/blob/master/tests)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "simple postgres orm for python",
    "version": "0.0.10",
    "project_urls": {
        "Homepage": "http://github.com/ahuigo/py-pgorm"
    },
    "split_keywords": [
        "orm",
        "python",
        "postgres"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "61c6fdc6184e5e2ed9ddc2329a66f7b2b6eecdda214cc7a6e7bd33fd9f9117d5",
                "md5": "7d06964976e855e789e0875281f45989",
                "sha256": "aeb37b98c6d22ac121e5b7034716baa5ab29b49adb4b26d55485deff9da25ab4"
            },
            "downloads": -1,
            "filename": "py_pgorm-0.0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7d06964976e855e789e0875281f45989",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6.1",
            "size": 3149,
            "upload_time": "2023-10-11T12:56:04",
            "upload_time_iso_8601": "2023-10-11T12:56:04.267745Z",
            "url": "https://files.pythonhosted.org/packages/61/c6/fdc6184e5e2ed9ddc2329a66f7b2b6eecdda214cc7a6e7bd33fd9f9117d5/py_pgorm-0.0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fcf4a82e7a052ad9eb3f6f4f91fe850665bd35c2354a7b41df793f462d4d76a5",
                "md5": "91b9421724ff66de5cf062c9e1757fd6",
                "sha256": "cfb0777d194779b7739195904eea5c52ab7729290160a4deb3c9c697c3e6d96e"
            },
            "downloads": -1,
            "filename": "py-pgorm-0.0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "91b9421724ff66de5cf062c9e1757fd6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6.1",
            "size": 4561,
            "upload_time": "2023-10-11T12:56:05",
            "upload_time_iso_8601": "2023-10-11T12:56:05.913202Z",
            "url": "https://files.pythonhosted.org/packages/fc/f4/a82e7a052ad9eb3f6f4f91fe850665bd35c2354a7b41df793f462d4d76a5/py-pgorm-0.0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-11 12:56:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ahuigo",
    "github_project": "py-pgorm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "py-pgorm"
}
        
Elapsed time: 0.14844s