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 hashes)
Built Distribution
Close
Hashes for py_pgorm-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeb37b98c6d22ac121e5b7034716baa5ab29b49adb4b26d55485deff9da25ab4 |
|
MD5 | 7d06964976e855e789e0875281f45989 |
|
BLAKE2b-256 | 61c6fdc6184e5e2ed9ddc2329a66f7b2b6eecdda214cc7a6e7bd33fd9f9117d5 |