Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 5,674 for Same (0.16 sec)

  1. cni/pkg/nodeagent/pod_cache_test.go

    	netns1 := p.UpsertPodCacheWithNetns(string(pod.UID), wl)
    	if !reflect.DeepEqual(netns1, ns) {
    		t.Fatalf("Expected the same Netns for the same uid, got %v and %v", netns1, ns)
    	}
    
    	ns2 := newFakeNsInode(inc(), 1)
    	wl2 := WorkloadInfo{
    		Workload: podToWorkload(pod),
    		Netns:    ns2,
    	}
    	// when using same uid, the original netns should be returned
    	netns2 := p.UpsertPodCacheWithNetns(string(pod.UID), wl2)
    	if netns2 != ns {
    Go
    - Registered: Wed Apr 17 22:53:10 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  2. docs/en/docs/how-to/sql-databases-peewee.md

    On top of that, an async framework could run some sync code in a threadpool (using `asyncio.run_in_executor`), but belonging to the same request.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/bigger-applications.md

    But it's still part of the same **FastAPI** application/web API (it's part of the same "Python Package").
    
    You can create the *path operations* for that module using `APIRouter`.
    
    ### Import `APIRouter`
    
    You import it and create an "instance" the same way you would with the class `FastAPI`:
    
    ```Python hl_lines="1  3" title="app/routers/users.py"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  4. docs/en/docs/alternatives.md

    And these same full-stack generators were the base of the [**FastAPI** Project Generators](project-generation.md){.internal-link target=_blank}.
    
    !!! info
        Flask-apispec was created by the same Marshmallow developers.
    
    !!! check "Inspired **FastAPI** to"
        Generate the OpenAPI schema automatically, from the same code that defines serialization and validation.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/testing.md

    ```
    
    ### Testing file
    
    Then you could have a file `test_main.py` with your tests. It could live on the same Python package (the same directory with a `__init__.py` file):
    
    ``` hl_lines="5"
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
    Because this file is in the same package, you can use relative imports to import the object `app` from the `main` module (`main.py`):
    
    ```Python hl_lines="3"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/templates.md

    * Use the `templates` you created to render and return a `TemplateResponse`, pass the name of the template, the request object, and a "context" dictionary with key-value pairs to be used inside of the Jinja2 template.
    
    ```Python hl_lines="4  11  15-18"
    {!../../../docs_src/templates/tutorial001.py!}
    ```
    
    !!! note
        Before FastAPI 0.108.0, Starlette 0.29.0, the `name` was the first parameter.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 22:25:37 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/response-model.md

    ```Python hl_lines="3  5"
    {
        "name": "Bar",
        "description": "The bartenders",
        "price": 62,
        "tax": 20.2
    }
    ```
    
    they will be included in the response.
    
    #### Data with the same values as the defaults
    
    If the data has the same values as the default ones, like the item with ID `baz`:
    
    ```Python hl_lines="3  5-6"
    {
        "name": "Baz",
        "description": None,
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/security/get-current-user.md

    Do you want to just have a `str`? Or just a `dict`? Or a database class model instance directly? It all works the same way.
    
    You actually don't have users that log in to your application but robots, bots, or other systems, that have just an access token? Again, it all works the same.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/testing-database.md

    You can use the same dependency overrides from [Testing Dependencies with Overrides](testing-dependencies.md){.internal-link target=_blank} to alter a database for testing.
    
    You could want to set up a different database for testing, rollback the data after the tests, pre-fill it with some testing data, etc.
    
    The main idea is exactly the same you saw in that previous chapter.
    
    ## Add tests for the SQL app
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  10. tests/test_response_model_as_return_annotation.py

    def no_response_model_no_annotation_return_dict():
        return {"name": "John", "surname": "Doe"}
    
    
    @app.get("/response_model-no_annotation-return_same_model", response_model=User)
    def response_model_no_annotation_return_same_model():
        return User(name="John", surname="Doe")
    
    
    @app.get("/response_model-no_annotation-return_exact_dict", response_model=User)
    def response_model_no_annotation_return_exact_dict():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Aug 14 09:49:57 GMT 2023
    - 47.7K bytes
    - Viewed (0)
Back to top