> 使用装饰器的方式来执行sql操作.
# Install
* pip: `$ pip install sql-annotation`
* source:
* `$ git clone https://github.com/tomoncle/sql-annotation.git`
* `$ cd sql-annotation`
* `$ python setup.py`
# example:
```python
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):
pass
@select('select * from t_school WHERE name like "%#{name}%"')
def get_school_by_name(name):
pass
print get_school_by_id(id='60')
print get_school_by_name(name='乌克兰')
```
Metadata
Release files for sql-annotation 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sql-annotation-1.0.0.tar.gz | 3.3 kB | Without provenance | Details for sql-annotation-1.0.0.tar.gz |
Release files / sql-annotation-1.0.0.tar.gz
| Download URL | sql-annotation-1.0.0.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
575a985bce4603144e594653fd6b2eda034b346e68bba100ad2c8fe794a4e480
|
|
BLAKE2b-256 checksum How to use checksums |
d688d1aa4b0096e8d27188584707cc11858801ec01b378f7adbc785f1b87fe38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Security for sql-annotation 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.