Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 219 for something (0.22 sec)

  1. tests/test_custom_schema_fields.py

    class Item(BaseModel):
        name: str
    
        if PYDANTIC_V2:
            model_config = {
                "json_schema_extra": {
                    "x-something-internal": {"level": 4},
                }
            }
        else:
    
            class Config:
                schema_extra = {
                    "x-something-internal": {"level": 4},
                }
    
    
    @app.get("/foo", response_model=Item)
    def foo():
        return {"name": "Foo item"}
    
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  2. cni/pkg/repair/repair_test_helpers.go

    			"sidecar.istio.io/status": "something",
    		},
    		Labels: map[string]string{
    			"testlabel": "true",
    		},
    		NodeName:            "test-node",
    		InitContainerStatus: &brokenInitContainerTerminating,
    	})
    
    	brokenPodWaiting = makePod(makePodArgs{
    		PodName: "broken-pod-waiting",
    		Annotations: map[string]string{
    			"sidecar.istio.io/status": "something",
    		},
    		NodeName:            "test-node",
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri May 12 17:39:53 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/encoder.md

    # JSON Compatible Encoder
    
    There are some cases where you might need to convert a data type (like a Pydantic model) to something compatible with JSON (like a `dict`, `list`, etc).
    
    For example, if you need to store it in a database.
    
    For that, **FastAPI** provides a `jsonable_encoder()` function.
    
    ## Using the `jsonable_encoder`
    
    Let's imagine that you have a database `fake_db` that only receives JSON compatible data.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  4. docs/en/docs/async.md

    Asynchronous code just means that the language 💬 has a way to tell the computer / program 🤖 that at some point in the code, it 🤖 will have to wait for *something else* to finish somewhere else. Let's say that *something else* is called "slow-file" 📝.
    
    So, during that time, the computer can go and do some other work, while "slow-file" 📝 finishes.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/security/http-basic-auth.md

    At that point, by noticing that the server took some microseconds longer to send the "Incorrect username or password" response, the attackers will know that they got _something_ right, some of the initial letters were right.
    
    And then they can try again knowing that it's probably something more similar to `stanleyjobsox` than to `johndoe`.
    
    #### A "professional" attack
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 14:33:05 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  6. .github/ISSUE_TEMPLATE/30_contributor_regression.yml

    name: Regression
    description: Report a problem about something that used to work
    labels: [ "a:regression", "to-triage" ]
    assignees: [ ]
    body:
      - type: markdown
        attributes:
          value: |
            Please use our bug report template to report problems with something that has never worked.
            Regressions reports are greatly appreciated during our RC phase and before a final release.
      - type: textarea
        id: current-behavior
        attributes:
    Others
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Fri Feb 16 07:49:32 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  7. tests/test_repeated_dependency_schema.py

    app = FastAPI()
    
    
    def get_header(*, someheader: str = Header()):
        return someheader
    
    
    def get_something_else(*, someheader: str = Depends(get_header)):
        return f"{someheader}123"
    
    
    @app.get("/")
    def get_deps(dep1: str = Depends(get_header), dep2: str = Depends(get_something_else)):
        return {"dep1": dep1, "dep2": dep2}
    
    
    client = TestClient(app)
    
    schema = {
        "components": {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/events.md

    ### Async Context Manager
    
    If you check, the function is decorated with an `@asynccontextmanager`.
    
    That converts the function into something called an "**async context manager**".
    
    ```Python hl_lines="1  13"
    {!../../../docs_src/events/tutorial003.py!}
    ```
    
    A **context manager** in Python is something that you can use in a `with` statement, for example, `open()` can be used as a context manager:
    
    ```Python
    with open("file.txt") as file:
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/io/CharSourceTest.java

        return suite;
      }
    
      private static final String STRING = ASCII + I18N;
      private static final String LINES = "foo\nbar\r\nbaz\rsomething";
      private static final ImmutableList<String> SPLIT_LINES =
          ImmutableList.of("foo", "bar", "baz", "something");
    
      private TestCharSource source;
    
      @Override
      public void setUp() {
        source = new TestCharSource(STRING);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13K bytes
    - Viewed (0)
  10. internal/grid/README.md

    The server handler function has this signature: `type SingleHandlerFn func(payload []byte) ([]byte, *RemoteErr)`.
    
    Sample handler:
    ```go
        handler :=  func(payload []byte) ([]byte, *grid.RemoteErr) {
            // Do something with payload
            return []byte("response"), nil
        }
    
        err := manager.RegisterSingleHandler(grid.HandlerDiskInfo, handler)
    ```
    
    Sample call:
    ```go
        // Get a connection to the remote host
    Plain Text
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.4K bytes
    - Viewed (0)
Back to top