Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pip install peewee
- from peewee import *
- db = MySQLDatabase('simplex', password='simplex',
- user='root',
- host='127.0.0.1',
- port=3306)
- class MonitoringLinks(Model):
- id = PrimaryKeyField()
- url = TextField()
- active = BooleanField()
- class Meta:
- database = db
- table_name = 'monitoring_links'
- for r in MonitoringLinks.select().where(MonitoringLinks.url.contains('.com.br')) :
- print(r.id, r.url, r.active)
Add Comment
Please, Sign In to add comment