Flask-RESTful Documentation Release 0.3.6
when working with objects. To solve this problem, Flask- RESTful provides the fields module and the marshal_with() decorator. Similar to the Django ORM and WTForm, you use the fields module to describe the structure of your response. from collections import OrderedDict from flask_restful import fields, marshal_with resource_fields = { 'task': fields.String, 'uri': fields.Url('todo_ep') } 6 Chapter 1. User’s task # This field will not be sent in the response self.status = 'active' class Todo(Resource): @marshal_with(resource_fields) def get(self, **kwargs): return TodoDao(todo_id='my_todo', task='Remember0 码力 | 46 页 | 245.60 KB | 1 年前3Flask-RESTful Documentation Release 0.3.6
when working with objects. To solve this problem, Flask-RESTful provides the fields module and the marshal_with() decorator. Similar to the Django ORM and WTForm, you use the fields module to describe the structure of your response. from collections import OrderedDict from flask_restful import fields, marshal_with resource_fields = { 'task': fields.String, 'uri': fields.Url('todo_ep') } class field will not be sent in the response self.status = 'active' class Todo(Resource): @marshal_with(resource_fields) def get(self, **kwargs): return TodoDao(todo_id='my_todo', task='Remember0 码力 | 49 页 | 91.90 KB | 1 年前3Flask-RESTful Documentation Release 0.3.7
module and the marshal_with() decorator. Similar to the Django ORM and WTForm, you use the fields module to describe the structure of your response. from flask_restful import fields, marshal_with resource_fields Flask-RESTful Documentation, Release 0.3.7 (continued from previous page) class Todo(Resource): @marshal_with(resource_fields) def get(self, **kwargs): return TodoDao(todo_id='my_todo', task='Remember task='Remember the milk') The above example takes a python object and prepares it to be serialized. The marshal_with() decorator will apply the transformation described by resource_fields. The only field extracted0 码力 | 50 页 | 253.09 KB | 1 年前3Flask-RESTful Documentation Release 0.3.8
module and the marshal_with() decorator. Similar to the Django ORM and WTForm, you use the fields module to describe the structure of your response. from flask_restful import fields, marshal_with resource_fields Flask-RESTful Documentation, Release 0.3.8 (continued from previous page) class Todo(Resource): @marshal_with(resource_fields) def get(self, **kwargs): return TodoDao(todo_id='my_todo', task='Remember task='Remember the milk') The above example takes a python object and prepares it to be serialized. The marshal_with() decorator will apply the transformation described by resource_fields. The only field extracted0 码力 | 50 页 | 253.64 KB | 1 年前3Flask-RESTful Documentation Release 0.3.8
module and the marshal_with() decorator. Similar to the Django ORM and WTForm, you use the fields module to describe the structure of your response. from flask_restful import fields, marshal_with resource_fields field will not be sent in the response self.status = 'active' class Todo(Resource): @marshal_with(resource_fields) def get(self, **kwargs): return TodoDao(todo_id='my_todo', task='Remember task='Remember the milk') The above example takes a python object and prepares it to be serialized. The marshal_with() decorator will apply the transformation described by resource_fields. The only field extracted0 码力 | 55 页 | 93.30 KB | 1 年前3Flask-RESTful Documentation Release 0.3.7
module and the marshal_with() decorator. Similar to the Django ORM and WTForm, you use the fields module to describe the structure of your response. from flask_restful import fields, marshal_with resource_fields field will not be sent in the response self.status = 'active' class Todo(Resource): @marshal_with(resource_fields) def get(self, **kwargs): return TodoDao(todo_id='my_todo', task='Remember task='Remember the milk') The above example takes a python object and prepares it to be serialized. The marshal_with() decorator will apply the transformation described by resource_fields. The only field extracted0 码力 | 55 页 | 93.21 KB | 1 年前3Haskell 2010 Language Report
managed memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 30 Foreign.Marshal 249 31 Foreign.Marshal.Alloc 251 31.1 Memory allocation . . . . . . . . . . . . . . . . . . . . . . . . . Dynamic allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 32 Foreign.Marshal.Array 255 32.1 Marshalling arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 33 Foreign.Marshal.Error 259 34 Foreign.Marshal.Utils 261 34.1 General marshalling utilities . . . . . . . . . . . . . . . . . .0 码力 | 329 页 | 1.43 MB | 1 年前3Flask-RESTful Documentation Release 0.3.10
module and the marshal_with() decorator. Similar to the Django ORM and WTForm, you use the fields module to describe the structure of your response. from flask_restful import fields, marshal_with resource_fields field will not be sent in the response self.status = 'active' class Todo(Resource): @marshal_with(resource_fields) def get(self, **kwargs): return TodoDao(todo_id='my_todo', task='Remember task='Remember the milk') The above example takes a python object and prepares it to be serialized. The marshal_with() decorator will apply the transformation described by resource_fields. The only field extracted0 码力 | 42 页 | 84.60 KB | 1 年前3Flask-RESTful Documentation Release 0.3.10
module and the marshal_with() decorator. Similar to the Django ORM and WTForm, you use the fields module to describe the structure of your response. from flask_restful import fields, marshal_with resource_fields Flask-RESTful Documentation, Release 0.3.10 (continued from previous page) class Todo(Resource): @marshal_with(resource_fields) def get(self, **kwargs): return TodoDao(todo_id='my_todo', task='Remember task='Remember the milk') The above example takes a python object and prepares it to be serialized. The marshal_with() decorator will apply the transformation described by resource_fields. The only field extracted0 码力 | 39 页 | 212.29 KB | 1 年前3Golang Manual By AstaXie-20120522
Index func GenerateKey(curve Curve, rand io.Reader) (priv []byte, x, y *big.Int, err error) func Marshal(curve Curve, x, y *big.Int) []byte func Unmarshal(curve Curve, data []byte) (x, y *big.Int) type generated using the given reader, which must return random data. func Marshal func Marshal(curve Curve, x, y *big.Int) []byte Marshal converts a point into the form specified in section 4.3.6 of ANSI X9 func Unmarshal(curve Curve, data []byte) (x, y *big.Int) Unmarshal converts a point, serialized by Marshal, into an x, y pair. On error, x = nil. type Curve type Curve interface { // Params returns0 码力 | 6205 页 | 12.83 MB | 1 年前3
共 385 条
- 1
- 2
- 3
- 4
- 5
- 6
- 39