Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for 123_ (0.14 sec)

  1. docs_src/python_types/tutorial011.py

        friends: List[int] = []
    
    
    external_data = {
        "id": "123",
        "signup_ts": "2017-06-01 12:22",
        "friends": [1, "2", b"3"],
    }
    user = User(**external_data)
    print(user)
    # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
    print(user.id)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Sep 02 15:56:35 GMT 2023
    - 498 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_websockets/test_tutorial003.py

        with client.websocket_connect("/ws/1234") as connection, client.websocket_connect(
            "/ws/5678"
        ) as connection_two:
            connection.send_text("Hello from 1234")
            data1 = connection.receive_text()
            assert data1 == "You wrote: Hello from 1234"
            data2 = connection_two.receive_text()
            client1_says = "Client #1234 says: Hello from 1234"
            assert data2 == client1_says
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jul 29 09:26:07 GMT 2021
    - 872 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_websockets/test_tutorial003_py39.py

        with client.websocket_connect("/ws/1234") as connection, client.websocket_connect(
            "/ws/5678"
        ) as connection_two:
            connection.send_text("Hello from 1234")
            data1 = connection.receive_text()
            assert data1 == "You wrote: Hello from 1234"
            data2 = connection_two.receive_text()
            client1_says = "Client #1234 says: Hello from 1234"
            assert data2 == client1_says
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  4. docs_src/python_types/tutorial011_py310.py

        friends: list[int] = []
    
    
    external_data = {
        "id": "123",
        "signup_ts": "2017-06-01 12:22",
        "friends": [1, "2", b"3"],
    }
    user = User(**external_data)
    print(user)
    # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
    print(user.id)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Sep 02 15:56:35 GMT 2023
    - 461 bytes
    - Viewed (0)
  5. tests/test_webhooks_security.py

        """
    
    
    client = TestClient(app)
    
    
    def test_dummy_webhook():
        # Just for coverage
        new_subscription(body={}, token="Bearer 123")
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        # insert_assert(response.json())
        assert response.json() == {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Oct 20 09:00:44 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  6. docs_src/python_types/tutorial011_py39.py

        friends: list[int] = []
    
    
    external_data = {
        "id": "123",
        "signup_ts": "2017-06-01 12:22",
        "friends": [1, "2", b"3"],
    }
    user = User(**external_data)
    print(user)
    # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
    print(user.id)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Sep 02 15:56:35 GMT 2023
    - 492 bytes
    - Viewed (0)
  7. tests/test_ambiguous_params.py

        client = TestClient(app)
        response = client.get("/multi-query", params={"foo": "5"})
        assert response.status_code == 200
        assert response.json() == 5
    
        response = client.get("/multi-query", params={"foo": "123"})
        assert response.status_code == 422
    
        if PYDANTIC_V2:
            response = client.get("/multi-query", params={"foo": "1"})
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Dec 12 00:22:47 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  8. 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)
Back to top