Flask Documentation (1.1.x)the API section. Flask depends on the Jinja [https://www.palletsprojects.com/p/jinja/] template engine and the Werkzeug [https://www.palletsprojects.com/p/werkzeug/] WSGI toolkit. The documentation for Extensions Deploying to a Web Server Tutorial Project Layout Application Setup Define and Access the Database Blueprints and Views Templates Static Files Blog Blueprint Make the Project Installable Test Coverage interested. Design Decisions in Flask The Explicit Application Object The Routing System One Template Engine Micro with Dependencies Thread Locals What Flask is, What Flask is Not HTML/XHTML FAQ History of0 码力 | 428 页 | 895.98 KB | 1 年前3
Flask Documentation (1.1.x)of Flask in detail, with a full reference in the API section. Flask depends on the Jinja template engine and the Werkzeug WSGI toolkit. The documentation for these libraries can be found at: • Jinja documentation extensible. Flask won’t make many decisions for you, such as what database to use. Those decisions that it does make, such as what templating engine to use, are easy to change. Everything else is up to you, so that Flask can be everything you need and nothing you don’t. By default, Flask does not include a database abstraction layer, form validation or anything else where different libraries already exist that0 码力 | 291 页 | 1.25 MB | 1 年前3
Flask-RESTful Documentation Release 0.3.10db_get_todo() # Some function that queries the db This example assumes that you have a custom database object (todo) that has attributes name, address, and date_updated. Any additional attributes on __init__(self, **kwargs): # smart_engine is a black box dependency self.smart_engine = kwargs['smart_engine'] def get(self): return self.smart_engine.next_todo() You can inject the required required dependency into TodoNext like so: smart_engine = SmartEngine() api.add_resource(TodoNext, '/next', resource_class_kwargs={ 'smart_engine': smart_engine }) Same idea applies for forwarding args0 码力 | 42 页 | 84.60 KB | 1 年前3
Flask-RESTful Documentation
Release 0.3.10return db_get_todo() # Some function that queries the db This example assumes that you have a custom database object (todo) that has attributes name, address, and date_updated. Any additional attributes on TodoNext(Resource): def __init__(self, **kwargs): # smart_engine is a black box dependency self.smart_engine = kwargs['smart_engine'] def get(self): return self.smart_engine.next_todo() You can inject the required dependency dependency into TodoNext like so: smart_engine = SmartEngine() api.add_resource(TodoNext, '/next', resource_class_kwargs={ 'smart_engine': smart_engine }) Same idea applies for forwarding args. 260 码力 | 39 页 | 212.29 KB | 1 年前3
Flask-RESTful Documentation
Release 0.3.6return db_get_todo() # Some function that queries the db This example assumes that you have a custom database object (todo) that has attributes name, address, and date_updated. Any additional attributes on TodoNext(Resource): def __init__(self, **kwargs): # smart_engine is a black box dependency self.smart_engine = kwargs['smart_engine'] def get(self): return self.smart_engine.next_todo() You can inject the required dependency dependency into TodoNext like so: smart_engine = SmartEngine() api.add_resource(TodoNext, '/next', resource_class_kwargs={ 'smart_engine': smart_engine }) Same idea applies for forwarding args. 260 码力 | 46 页 | 245.60 KB | 1 年前3
Flask-RESTful Documentation Release 0.3.6db_get_todo() # Some function that queries the db This example assumes that you have a custom database object (todo) that has attributes name, address, and date_updated. Any additional attributes on __init__(self, **kwargs): # smart_engine is a black box dependency self.smart_engine = kwargs['smart_engine'] def get(self): return self.smart_engine.next_todo() You can inject the required required dependency into TodoNext like so: smart_engine = SmartEngine() api.add_resource(TodoNext, '/next', resource_class_kwargs={ 'smart_engine': smart_engine }) Same idea applies for forwarding args0 码力 | 49 页 | 91.90 KB | 1 年前3
Flask-RESTful Documentation
Release 0.3.7return db_get_todo() # Some function that queries the db This example assumes that you have a custom database object (todo) that has attributes name, address, and date_updated. Any additional attributes on TodoNext(Resource): def __init__(self, **kwargs): # smart_engine is a black box dependency self.smart_engine = kwargs['smart_engine'] def get(self): return self.smart_engine.next_todo() You can inject the required dependency dependency into TodoNext like so: smart_engine = SmartEngine() api.add_resource(TodoNext, '/next', resource_class_kwargs={ 'smart_engine': smart_engine }) Same idea applies for forwarding args. 260 码力 | 50 页 | 253.09 KB | 1 年前3
Flask-RESTful Documentation
Release 0.3.8return db_get_todo() # Some function that queries the db This example assumes that you have a custom database object (todo) that has attributes name, address, and date_updated. Any additional attributes on TodoNext(Resource): def __init__(self, **kwargs): # smart_engine is a black box dependency self.smart_engine = kwargs['smart_engine'] def get(self): return self.smart_engine.next_todo() You can inject the required dependency dependency into TodoNext like so: smart_engine = SmartEngine() api.add_resource(TodoNext, '/next', resource_class_kwargs={ 'smart_engine': smart_engine }) Same idea applies for forwarding args. 260 码力 | 50 页 | 253.64 KB | 1 年前3
Flask-RESTful Documentation Release 0.3.8db_get_todo() # Some function that queries the db This example assumes that you have a custom database object (todo) that has attributes name, address, and date_updated. Any additional attributes on __init__(self, **kwargs): # smart_engine is a black box dependency self.smart_engine = kwargs['smart_engine'] def get(self): return self.smart_engine.next_todo() You can inject the required required dependency into TodoNext like so: smart_engine = SmartEngine() api.add_resource(TodoNext, '/next', resource_class_kwargs={ 'smart_engine': smart_engine }) Same idea applies for forwarding args0 码力 | 55 页 | 93.30 KB | 1 年前3
Flask-RESTful Documentation Release 0.3.7db_get_todo() # Some function that queries the db This example assumes that you have a custom database object (todo) that has attributes name, address, and date_updated. Any additional attributes on __init__(self, **kwargs): # smart_engine is a black box dependency self.smart_engine = kwargs['smart_engine'] def get(self): return self.smart_engine.next_todo() You can inject the required required dependency into TodoNext like so: smart_engine = SmartEngine() api.add_resource(TodoNext, '/next', resource_class_kwargs={ 'smart_engine': smart_engine }) Same idea applies for forwarding args0 码力 | 55 页 | 93.21 KB | 1 年前3
共 11 条
- 1
- 2













