peewee Documentation Release 3.4.0extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; Optional dependencies Note To use Peewee, you typically won’t need anything by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation
Release 3.3.0extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; 1.1.3 Optional dependencies Note: To use Peewee, you typically won’t need by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses the "people.db" database0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; 1.1.3 Optional dependencies Note: To use Peewee, you typically won’t need by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses the "people.db" database0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation Release 3.1.0extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; Optional dependencies Note To use Peewee, you typically won’t need anything by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation Release 3.0.0extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; Optional dependencies Note To use Peewee, you typically won’t need anything by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation
Release 3.5.0extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; Optional dependencies Note To use Peewee, you typically won’t need anything by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation
Release 3.5.0extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; 1.1.3 Optional dependencies Note: To use Peewee, you typically won’t need by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses the "people.db" database0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation Release 2.10.2by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses uses the "people.db" database. Note Note that we named our model Person instead of People. This is a convention you should follow – even though the table will contain multiple people, we always name0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation
Release 2.10.2by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses the "people.db" database related_name='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses the "people.db" database Now that we have our models, let’s connect to the database. Although it’s0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation Release 3.6.0extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; Optional dependencies Note To use Peewee, you typically won’t need anything by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() class Meta: database = db # This model uses the "people.db" database. Note0 码力 | 377 页 | 399.12 KB | 1 年前3
共 16 条
- 1
- 2













