Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Database Annotation, author liyuanjun

Project description

# sql-annotation
> 使用装饰器的方式来执行sql操作.

# Install
* pip: `$ pip install sql-annotation`
* source:
* `$ git clone`
* `$ cd sql-annotation`
* `$ python`

# example:
from sql_annotation.annotation import select
from sql_annotation.conn import connection

connection(username='tom', password='123456', db='test')

@select('select * from t_school WHERE id="#{id}"')
def get_school_by_id(id):

@select('select * from t_school WHERE name like "%#{name}%"')
def get_school_by_name(name):

print get_school_by_id(id='60')
print get_school_by_name(name='乌克兰')

Project details

Download files

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

Files for sql-annotation, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size sql-annotation-1.0.0.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page