Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 801 - 810 of 1,188 for EXAMPLE (0.06 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_tutorial/test_background_tasks/test_tutorial001.py

        if log.is_file():
            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/foo@example.com")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Notification sent in the background"}
        with open("./log.txt") as f:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 27 10:53:47 GMT 2026
    - 635 bytes
    - Click Count (0)
  2. CHANGELOG/CHANGELOG-1.11.md

        * If you have to use the legacy in-tree cloud providers, you can rearrange your config like the example below. In case you need the `cloud-config` file (located in `{cloud-config-path}`), you can mount it into the API Server and controller-manager containers using ExtraVolumes like the example below.
    Created: Fri Apr 03 09:05:14 GMT 2026
    - Last Modified: Thu Feb 06 06:04:15 GMT 2020
    - 328.4K bytes
    - Click Count (0)
  3. android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java

       * semantics of builder can be arbitrarily complex. Still, a factory class can be created in the
       * test to facilitate equality testing. For example:
       *
       * <pre>
       * public class FooTest {
       *
       *   private static final class FooFactoryForTest {
       *     public static Foo create(String a, String b, int c, boolean d) {
       *       return Foo.builder()
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Apr 02 14:49:41 GMT 2026
    - 32.5K bytes
    - Click Count (0)
  4. docs_src/advanced_middleware/tutorial002_py310.py

    from fastapi import FastAPI
    from fastapi.middleware.trustedhost import TrustedHostMiddleware
    
    app = FastAPI()
    
    app.add_middleware(
        TrustedHostMiddleware, allowed_hosts=["example.com", "*.example.com"]
    )
    
    
    @app.get("/")
    async def main():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 279 bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/collect/TreeMultiset.java

       * {@code ClassCastException} for any elements {@code e1} and {@code e2} in the multiset. If the
       * user attempts to add an element to the multiset that violates this constraint (for example, the
       * user attempts to add a string element to a set whose elements are integers), the {@code
       * add(Object)} call will throw a {@code ClassCastException}.
       *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 13:11:08 GMT 2026
    - 34K bytes
    - Click Count (0)
  6. docs_src/behind_a_proxy/tutorial003_py310.py

    from fastapi import FastAPI, Request
    
    app = FastAPI(
        servers=[
            {"url": "https://stag.example.com", "description": "Staging environment"},
            {"url": "https://prod.example.com", "description": "Production environment"},
        ],
        root_path="/api/v1",
    )
    
    
    @app.get("/app")
    def read_main(request: Request):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 405 bytes
    - Click Count (0)
  7. docs_src/behind_a_proxy/tutorial004_py310.py

    from fastapi import FastAPI, Request
    
    app = FastAPI(
        servers=[
            {"url": "https://stag.example.com", "description": "Staging environment"},
            {"url": "https://prod.example.com", "description": "Production environment"},
        ],
        root_path="/api/v1",
        root_path_in_servers=False,
    )
    
    
    @app.get("/app")
    def read_main(request: Request):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 437 bytes
    - Click Count (0)
  8. docs_src/settings/app02_py310/test_main.py

    
    def get_settings_override():
        return Settings(admin_email="testing_admin@example.com")
    
    
    app.dependency_overrides[get_settings] = get_settings_override
    
    
    def test_app():
        response = client.get("/info")
        data = response.json()
        assert data == {
            "app_name": "Awesome API",
            "admin_email": "testing_admin@example.com",
            "items_per_user": 50,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 515 bytes
    - Click Count (0)
  9. tests/test_tutorial/test_advanced_middleware/test_tutorial002.py

    from docs_src.advanced_middleware.tutorial002_py310 import app
    
    
    def test_middleware():
        client = TestClient(app, base_url="http://example.com")
        response = client.get("/")
        assert response.status_code == 200, response.text
        client = TestClient(app, base_url="http://subdomain.example.com")
        response = client.get("/")
        assert response.status_code == 200, response.text
        client = TestClient(app, base_url="http://invalidhost")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 576 bytes
    - Click Count (0)
  10. android/guava/src/com/google/common/collect/ImmutableMultiset.java

        return new Builder<>();
      }
    
      /**
       * A builder for creating immutable multiset instances, especially {@code public static final}
       * multisets ("constant multisets"). Example:
       *
       * {@snippet :
       * public static final ImmutableMultiset<Bean> BEANS =
       *     new ImmutableMultiset.Builder<Bean>()
       *         .addCopies(Bean.COCOA, 4)
       *         .addCopies(Bean.GARDEN, 6)
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Sep 22 21:07:18 GMT 2025
    - 22.3K bytes
    - Click Count (0)
Back to Top