peewee Documentation Release 0.9.7pip install the git clone: pip install -e git+https://github.com/coleifer/peewee.git If you don’t want to use pip: git clone https://github.com/coleifer/peewee.git cd peewee python setup.py install SqliteDatabase('stats.db') >>> database.connect() It is possible to use multiple databases (provided that you don’t try and mix models from each): >>> custom_db = peewee.SqliteDatabase('custom.db') >>> class CustomModel(peewee (Entry, 'pub_date', 'DESC'), ... ) >>> qry.sql() ('SELECT t1.* FROM entry AS t1 INNER JOIN blog AS t2 ON t1.blog_id = t2.id ORDER BY t2.name ASC, t1.pub_date DESC', []) Paginating records The paginate0 码力 | 78 页 | 143.68 KB | 1 年前3
peewee Documentation Release 1.0.0pip install the git clone: pip install -e git+https://github.com/coleifer/peewee.git If you don’t want to use pip: git clone https://github.com/coleifer/peewee.git cd peewee python setup.py install class Meta: database = database It is possible to use multiple databases (provided that you don’t try and mix models from each): >>> custom_db = peewee.SqliteDatabase('custom.db') >>> class CustomModel(peewee (Entry, 'pub_date', 'DESC'), ... ) >>> qry.sql() ('SELECT t1.* FROM entry AS t1 INNER JOIN blog AS t2 ON t1.blog_id = t2.id ORDER BY t2.name ASC, t1.pub_date DESC', []) Paginating records The paginate0 码力 | 101 页 | 163.20 KB | 1 年前3
peewee Documentation
Release 2.0.2can pip install the git clone: pip install -e git+https://github.com/coleifer/peewee.git If you don’t want to use pip: git clone https://github.com/coleifer/peewee.git cd peewee python setup.py install and saner. I also cleaned up the primary key business. Basically it works like this: • if you don’t specify a primary key, one will be created named “id” • if you do specify a primary key and it is a CharField() class Meta: database = database It is possible to use multiple databases (provided that you don’t try and mix models from each): >>> custom_db = SqliteDatabase(’custom.db’) >>> class CustomModel(Model):0 码力 | 65 页 | 315.33 KB | 1 年前3
peewee Documentation
Release 0.9.7can pip install the git clone: pip install -e git+https://github.com/coleifer/peewee.git If you don’t want to use pip: git clone https://github.com/coleifer/peewee.git cd peewee python setup.py install SqliteDatabase(’stats.db’) >>> database.connect() It is possible to use multiple databases (provided that you don’t try and mix models from each): >>> custom_db = peewee.SqliteDatabase(’custom.db’) >>> class CustomModel(peewee Documentation, Release 0.9.7 ... ) >>> qry.sql() (’SELECT t1.* FROM entry AS t1 INNER JOIN blog AS t2 ON t1.blog_id = t2.id ORDER BY t2.name ASC, t1.pub_date DESC’, []) Paginating records The paginate method0 码力 | 53 页 | 347.03 KB | 1 年前3
peewee Documentation
Release 1.0.0can pip install the git clone: pip install -e git+https://github.com/coleifer/peewee.git If you don’t want to use pip: git clone https://github.com/coleifer/peewee.git cd peewee python setup.py install CharField() class Meta: database = database It is possible to use multiple databases (provided that you don’t try and mix models from each): >>> custom_db = peewee.SqliteDatabase(’custom.db’) >>> class CustomModel(peewee (Entry, ’pub_date’, ’DESC’), ... ) >>> qry.sql() (’SELECT t1.* FROM entry AS t1 INNER JOIN blog AS t2 ON t1.blog_id = t2.id ORDER BY t2.name ASC, t1.pub_date DESC’, []) Paginating records The paginate method0 码力 | 71 页 | 405.29 KB | 1 年前3
peewee Documentation Release 2.10.2with SQLite Note If you find any bugs, odd behavior, or have an idea for a new feature please don’t hesitate to open an issue [https://github.com/coleifer/peewee/issues?state=open] on GitHub or contact options, use: python runtests.py --help Optional dependencies Note To use Peewee, you typically won’t need anything outside the standard library, since most Python distributions are compiled with SQLite have stored 3 people in the database. Let’s give them some pets. Grandma doesn’t like animals in the house, so she won’t have any, but Herb is an animal lover: >>> bob_kitty = Pet.create(owner=uncle_bob0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation
Release 2.10.2use: python runtests.py --help 1.1.3 Optional dependencies Note: To use Peewee, you typically won’t need anything outside the standard library, since most Python distributions are compiled with SQLite have stored 3 people in the database. Let’s give them some pets. Grandma doesn’t like animals in the house, so she won’t have any, but Herb is an animal lover: >>> bob_kitty = Pet.create(owner=uncle_bob liking. The example app uses the flask web framework which is very easy to get started with. If you don’t have flask already, you will need to install it to run the example: pip install flask 1.3.1 Running0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation Release 3.4.0with SQLite Note If you find any bugs, odd behavior, or have an idea for a new feature please don’t hesitate to open an issue [https://github.com/coleifer/peewee/issues?state=open] on GitHub or contact postgres db. CREATE EXTENSION hstore; Optional dependencies Note To use Peewee, you typically won’t need anything outside the standard library, since most Python distributions are compiled with SQLite have stored 3 people in the database. Let’s give them some pets. Grandma doesn’t like animals in the house, so she won’t have any, but Herb is an animal lover: bob_kitty = Pet.create(owner=uncle_bob,0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation Release 3.0.0with SQLite Note If you find any bugs, odd behavior, or have an idea for a new feature please don’t hesitate to open an issue [https://github.com/coleifer/peewee/issues?state=open] on GitHub or contact postgres db. CREATE EXTENSION hstore; Optional dependencies Note To use Peewee, you typically won’t need anything outside the standard library, since most Python distributions are compiled with SQLite have stored 3 people in the database. Let’s give them some pets. Grandma doesn’t like animals in the house, so she won’t have any, but Herb is an animal lover: bob_kitty = Pet.create(owner=uncle_bob,0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation
Release 3.5.0New stuff Note If you find any bugs, odd behavior, or have an idea for a new feature please don’t hesitate to open an issue [https://github.com/coleifer/peewee/issues?state=open] on GitHub or contact postgres db. CREATE EXTENSION hstore; Optional dependencies Note To use Peewee, you typically won’t need anything outside the standard library, since most Python distributions are compiled with SQLite have stored 3 people in the database. Let’s give them some pets. Grandma doesn’t like animals in the house, so she won’t have any, but Herb is an animal lover: bob_kitty = Pet.create(owner=uncle_bob,0 码力 | 347 页 | 380.80 KB | 1 年前3
共 16 条
- 1
- 2













