- Sort Score
- Result 10 results
- Languages All
Results 1051 - 1060 of 1,667 for byte2 (0.04 sec)
-
docs_src/request_files/tutorial001_02_an_py310.py
from typing import Annotated from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: Annotated[bytes | None, File()] = None): if not file: return {"message": "No file sent"} else: return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: UploadFile | None = None): if not file:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 505 bytes - Viewed (0) -
docs_src/request_files/tutorial001_an_py39.py
from typing import Annotated from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: Annotated[bytes, File()]): return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: UploadFile):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 322 bytes - Viewed (0) -
fastapi/_compat.py
return is_pv1_scalar_sequence_field(field) def is_bytes_field(field: ModelField) -> bool: return lenient_issubclass(field.type_, bytes) def is_bytes_sequence_field(field: ModelField) -> bool: return field.shape in sequence_shapes and lenient_issubclass(field.type_, bytes) # type: ignore[attr-defined] def copy_field_info(*, field_info: FieldInfo, annotation: Any) -> FieldInfo: return copy(field_info)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:36:32 UTC 2024 - 23.4K bytes - Viewed (0) -
docs/en/docs/advanced/path-operation-advanced-configuration.md
``` In this example, we didn't declare any Pydantic model. In fact, the request body is not even <abbr title="converted from some plain format, like bytes, into Python objects">parsed</abbr> as JSON, it is read directly as `bytes`, and the function `magic_data_reader()` would be in charge of parsing it in some way. Nevertheless, we can declare the expected schema for the request body.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.6K bytes - Viewed (0) -
istioctl/pkg/waypoint/waypoint_test.go
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package waypoint import ( "bytes" "context" "fmt" "os" "strings" "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gateway "sigs.k8s.io/gateway-api/apis/v1" "istio.io/api/label" "istio.io/istio/istioctl/pkg/cli"
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Apr 04 15:53:09 UTC 2024 - 4.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Response.kt
fun trailers(): Headers = trailersFn() /** * Peeks up to [byteCount] bytes from the response body and returns them as a new response * body. If fewer than [byteCount] bytes are in the response body, the full response body is * returned. If more than [byteCount] bytes are in the response body, the returned value * will be truncated to [byteCount] bytes. * * It is an error to call this method after the body has been consumed.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jul 06 09:38:30 UTC 2024 - 15.6K bytes - Viewed (0) -
clause/expression.go
appendFieldsToMap(reflectValue.Field(i)) } } } } } appendFieldsToMap(reflect.ValueOf(value)) } } name := make([]byte, 0, 10) for _, v := range []byte(expr.SQL) { if v == '@' && !inName { inName = true name = name[:0] } else if v == ' ' || v == ',' || v == ')' || v == '"' || v == '\'' || v == '`' || v == '\r' || v == '\n' || v == ';' {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Oct 10 06:45:48 UTC 2023 - 8.3K bytes - Viewed (0) -
cni/pkg/install/cniconfig.go
} return "", fmt.Errorf("no valid networks found in %s", confDir) } // insertCNIConfig will append newCNIConfig to existingCNIConfig func insertCNIConfig(newCNIConfig, existingCNIConfig []byte) ([]byte, error) { var istioMap map[string]any err := json.Unmarshal(newCNIConfig, &istioMap) if err != nil { return nil, fmt.Errorf("error loading Istio CNI config (JSON error): %v", err) }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 01 18:38:14 UTC 2024 - 8.2K bytes - Viewed (0) -
internal/grid/muxclient.go
clientPingInterval: parent.clientPingInterval, } } // roundtrip performs a roundtrip, returning the first response. // This cannot be used concurrently. func (m *muxClient) roundtrip(h HandlerID, req []byte) ([]byte, error) { if m.init { return nil, errors.New("mux client already used") } m.init = true m.singleResp = true msg := message{ Op: OpRequest, MuxID: m.MuxID, Handler: h,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.9K bytes - Viewed (0) -
internal/ringbuffer/README.md
```go package main import ( "fmt" "github.com/smallnest/ringbuffer" ) func main() { rb := ringbuffer.New(1024) // write rb.Write([]byte("abcd")) fmt.Println(rb.Length()) fmt.Println(rb.Free()) // read buf := make([]byte, 4) rb.Read(buf) fmt.Println(string(buf)) } ``` It is possible to use an existing buffer with by replacing `New` with `NewBuffer`.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 2.1K bytes - Viewed (0)