Peewee is a lightweight ORM (Object-Relational Mapping) for Python
Peewee is a compact and easy-to-use ORM library for working with databases.
It supports SQLite, MySQL, and PostgreSQL, providing a convenient API for working with models, simplifying interaction with databases.
from peewee import *
db = SqliteDatabase('people.db')
class Person(Model):
name = CharField()
age = IntegerField()
class Meta:
database = db
db.connect()
db.create_tables([Person])
Person.create(name="Alice", age=30)
Page of .
Leave a comment
You must be logged in to leave a comment.
Log in or
sign up to join the discussion.
Comments (0)