Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 81 - 90 of 4,515 for fromP2 (0.06 seconds)

  1. docs_src/encoder/tutorial001_py39.py

    from datetime import datetime
    from typing import Union
    
    from fastapi import FastAPI
    from fastapi.encoders import jsonable_encoder
    from pydantic import BaseModel
    
    fake_db = {}
    
    
    class Item(BaseModel):
        title: str
        timestamp: datetime
        description: Union[str, None] = None
    
    
    app = FastAPI()
    
    
    @app.put("/items/{id}")
    def update_item(id: str, item: Item):
        json_compatible_item_data = jsonable_encoder(item)
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 461 bytes
    - Click Count (0)
  2. docs_src/extra_data_types/tutorial001_an_py39.py

    from datetime import datetime, time, timedelta
    from typing import Annotated, Union
    from uuid import UUID
    
    from fastapi import Body, FastAPI
    
    app = FastAPI()
    
    
    @app.put("/items/{item_id}")
    async def read_items(
        item_id: UUID,
        start_datetime: Annotated[datetime, Body()],
        end_datetime: Annotated[datetime, Body()],
        process_after: Annotated[timedelta, Body()],
        repeat_at: Annotated[Union[time, None], Body()] = None,
    ):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Apr 19 00:11:40 GMT 2024
    - 801 bytes
    - Click Count (0)
  3. impl/maven-core/src/main/java/org/apache/maven/project/Graph.java

        }
    
        void addEdge(Vertex from, Vertex to) throws CycleDetectedException {
            from.children.add(to);
            to.parents.add(from);
            List<String> cycle = findCycle(to);
            if (cycle != null) {
                // remove edge which introduced cycle
                removeEdge(from, to);
                throw new CycleDetectedException(
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 4.1K bytes
    - Click Count (0)
  4. fastapi/encoders.py

    import datetime
    from collections import defaultdict, deque
    from decimal import Decimal
    from enum import Enum
    from ipaddress import (
        IPv4Address,
        IPv4Interface,
        IPv4Network,
        IPv6Address,
        IPv6Interface,
        IPv6Network,
    )
    from pathlib import Path, PurePath
    from re import Pattern
    from types import GeneratorType
    from typing import Annotated, Any, Callable, Optional, Union
    from uuid import UUID
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 10.7K bytes
    - Click Count (0)
  5. fastapi/dependencies/models.py

    import inspect
    import sys
    from dataclasses import dataclass, field
    from functools import cached_property, partial
    from typing import Any, Callable, Optional, Union
    
    from fastapi._compat import ModelField
    from fastapi.security.base import SecurityBase
    from fastapi.types import DependencyCacheKey
    from typing_extensions import Literal
    
    if sys.version_info >= (3, 13):  # pragma: no cover
        from inspect import iscoroutinefunction
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 7.1K bytes
    - Click Count (0)
  6. tests/test_param_class.py

    from typing import Optional
    
    from fastapi import FastAPI
    from fastapi.params import Param
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/items/")
    def read_items(q: Optional[str] = Param(default=None)):  # type: ignore
        return {"q": q}
    
    
    client = TestClient(app)
    
    
    def test_default_param_query_none():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 636 bytes
    - Click Count (0)
  7. docs/en/docs/reference/websockets.md

    # WebSockets
    
    When defining WebSockets, you normally declare a parameter of type `WebSocket` and with it you can read data from the client and send data to it.
    
    It is provided directly by Starlette, but you can import it from `fastapi`:
    
    ```python
    from fastapi import WebSocket
    ```
    
    /// tip
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Aug 06 04:48:30 GMT 2024
    - 1.7K bytes
    - Click Count (0)
  8. tests/lru_test.go

    	if !reflect.DeepEqual(lc.Keys(), []string{"key1"}) {
    		t.Fatalf("value differs from expected")
    	}
    
    	if lc.Resize(0) != 0 {
    		t.Fatalf("evicted count differs from expected")
    	}
    	if lc.Resize(2) != 0 {
    		t.Fatalf("evicted count differs from expected")
    	}
    	lc.Add("key2", "val2")
    	if lc.Resize(1) != 1 {
    		t.Fatalf("evicted count differs from expected")
    	}
    }
    
    func TestLRUEdgeCases(t *testing.T) {
    Created: Sun Dec 28 09:35:17 GMT 2025
    - Last Modified: Mon Sep 08 09:19:22 GMT 2025
    - 10.4K bytes
    - Click Count (0)
  9. android/guava/src/com/google/common/collect/RegularImmutableSortedMultiset.java

      }
    
      ImmutableSortedMultiset<E> getSubMultiset(int from, int to) {
        checkPositionIndexes(from, to, length);
        if (from == to) {
          return emptyMultiset(comparator());
        } else if (from == 0 && to == length) {
          return this;
        } else {
          RegularImmutableSortedSet<E> subElementSet = elementSet.getSubSet(from, to);
          return new RegularImmutableSortedMultiset<>(
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Sat Dec 28 01:26:26 GMT 2024
    - 4.3K bytes
    - Click Count (0)
  10. src/main/java/org/codelibs/fess/app/web/base/login/SpnegoCredential.java

     * Negotiation Protocol) authentication. It contains the username extracted from the
     * SPNEGO authentication process, typically from a Kerberos ticket.
     */
    public class SpnegoCredential implements LoginCredential, FessCredential {
    
        /** The username extracted from SPNEGO authentication. */
        private final String username;
    
        /**
    Created: Sat Dec 20 09:19:18 GMT 2025
    - Last Modified: Thu Jul 17 08:28:31 GMT 2025
    - 1.9K bytes
    - Click Count (1)
Back to Top