peewee Documentation
Release 2.0.2bulk of the code lives. 1.4 Peewee Cookbook Below are outlined some of the ways to perform typical database-related tasks with peewee. Examples will use the following models: 1.4. Peewee Cookbook 7 peewee share a connection across threads, so if you would prefer to reuse a connection in multiple threads: 1.4. Peewee Cookbook 9 peewee Documentation, Release 2.0.0 native_concurrent_db = SqliteDatabase(’stats Selecting multiple records To simply get all instances in a table, call the Model.select() method: 1.4. Peewee Cookbook 11 peewee Documentation, Release 2.0.0 >>> for user in User.select(): ... print0 码力 | 65 页 | 315.33 KB | 1 年前3
peewee Documentation
Release 0.9.7Cookbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 Example app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . models that were introspected from the database tables The generated code is written to stdout. 1.4 Example app peewee ships with an example web app that runs on the Flask microframework. If you already related_name=’relationships’) to_user = ForeignKeyField(User, related_name=’related_to’) class Message(BaseModel): 1.4. Example app 15 peewee Documentation, Release 0.9.7 user = ForeignKeyField(User) content = TextField()0 码力 | 53 页 | 347.03 KB | 1 年前3
peewee Documentation
Release 1.0.0Database.drop_column_sql() Honestly, your best bet is to script any migrations and use plain ol’ SQL. 1.4 Example app peewee ships with an example web app that runs on the Flask microframework. If you already stores the text content of the message, when it was created, and who posted it (foreign key to User). 1.4. Example app 15 peewee Documentation, Release 1.0.0 If you like UML, this is basically what it looks decorators to make this a snap: @app.before_request def before_request(): g.db = database g.db.connect() 1.4. Example app 17 peewee Documentation, Release 1.0.0 @app.after_request def after_request(response):0 码力 | 71 页 | 405.29 KB | 1 年前3
peewee Documentation
Release 3.6.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.4 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . provides a django-like Admin interface, RESTful API, Authentication and more for your peewee models. 1.4 Contributing In order to continually improve, Peewee needs the help of developers like you. Whether helping to make Peewee a better library. In this document I’ll describe some of the ways you can help. 1.4. Contributing 17 peewee Documentation, Release 3.6.0 1.4.1 Patches Do you have an idea for a new0 码力 | 302 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 2.10.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4 Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . provides a django-like Admin interface, RESTful API, Authentication and more for your peewee models. 1.4 Additional Resources I’ve written a number of blog posts about building applications and web-services0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation
Release 3.5.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.4 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . provides a django-like Admin interface, RESTful API, Authentication and more for your peewee models. 1.4 Contributing In order to continually improve, Peewee needs the help of developers like you. Whether0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.3.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.4 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Authentication and more for your peewee models. 1.3. Example app 17 peewee Documentation, Release 3.3.0 1.4 Contributing In order to continually improve, Peewee needs the help of developers like you. Whether0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.4 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Authentication and more for your peewee models. 1.3. Example app 17 peewee Documentation, Release 3.4.0 1.4 Contributing In order to continually improve, Peewee needs the help of developers like you. Whether0 码力 | 284 页 | 1.03 MB | 1 年前3
共 8 条
- 1













