- Sort Score
- Result 10 results
- Languages All
Results 1051 - 1060 of 1,667 for byte1 (0.09 sec)
-
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) -
docs_src/request_files/tutorial001_02.py
from typing import Union from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: Union[bytes, None] = File(default=None)): if not file: return {"message": "No file sent"} else: return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: Union[UploadFile, None] = None): if not file:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 508 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) -
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) -
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) -
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) -
misc/go_android_exec/exitcode_test.go
// Embed a "fake" exit code in the middle to check that we don't get caught on it. pre := "abc" + exitStr + "123def" text := pre + exitStr + `1` for i := 0; i < len(text); i++ { _, err := f.Write([]byte{text[i]}) if err != nil { t.Fatal(err) } } // The "pre" output should all have been flushed already. if want, got := pre, out.String(); want != got {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed May 03 14:54:58 UTC 2023 - 2.1K bytes - Viewed (0) -
docs/em/docs/advanced/security/http-basic-auth.md
`secrets.compare_digest()` ๐ช โ `bytes` โ๏ธ `str` ๐ ๐ด ๐ ๐ ๐ฆน (๐ ๐ช๐ธ), ๐ โ โซ๏ธ ๐ซ๐ ๐ท โฎ๏ธ ๐ฆน ๐ `รก`, `Sebastiรกn`. ๐ต ๐, ๐ฅ ๐ฅ ๐ `username` & `password` `bytes` ๐ข ๐ซ โฎ๏ธ ๐ -8๏ธโฃ. โคด๏ธ ๐ฅ ๐ช โ๏ธ `secrets.compare_digest()` ๐ ๐ `credentials.username` `"stanleyjobson"`, & ๐ `credentials.password` `"swordfish"`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.1K bytes - Viewed (0)