Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 907 for fdef (0.07 sec)

  1. docs_src/security/tutorial005_py39.py

    )
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return pwd_context.verify(plain_password, hashed_password)
    
    
    def get_password_hash(password):
        return pwd_context.hash(password)
    
    
    def get_user(db, username: str):
        if username in db:
            user_dict = db[username]
            return UserInDB(**user_dict)
    
    
    def authenticate_user(fake_db, username: str, password: str):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon May 20 17:37:28 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  2. bin/diff_yaml.py

    import sys
    import yaml  # pyyaml
    
    # returns fully qualified resource name of the k8s resource
    
    
    def by_resource_name(res):
        if res is None:
            return ""
    
        return "{}::{}::{}".format(res['apiVersion'],
                                   res['kind'],
                                   res['metadata']['name'])
    
    
    def keydiff(k0, k1):
        k0s = set(k0)
        k1s = set(k1)
        added = k1s - k0s
        removed = k0s - k1s
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Mar 03 16:14:57 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  3. docs/em/docs/async.md

    ### ๐ŸŽง-๐Ÿ”—
    
    ๐Ÿ‘† ๐Ÿ’ช โœ”๏ธ ๐Ÿ’— ๐Ÿ”— & [๐ŸŽง-๐Ÿ”—](tutorial/dependencies/sub-dependencies.md){.internal-link target=_blank} ๐Ÿšซ ๐Ÿ”  ๐ŸŽ (๐Ÿ”ข ๐Ÿ”ข ๐Ÿ”‘), ๐Ÿ‘ซ ๐Ÿ’ช โœ โฎ๏ธ `async def` & โฎ๏ธ ๐Ÿ˜ `def`. โšซ๏ธ ๐Ÿ”œ ๐Ÿ‘ท, & ๐Ÿ• โœ โฎ๏ธ ๐Ÿ˜ `def` ๐Ÿ”œ ๐Ÿค™ ๐Ÿ”› ๐Ÿ”ข ๐Ÿงต (โšช๏ธโžก๏ธ ๐Ÿงต) โ†ฉ๏ธ โž– "โŒ›".
    
    ### ๐ŸŽ ๐Ÿš™ ๐Ÿ”ข
    
    ๐Ÿ™† ๐ŸŽ ๐Ÿš™ ๐Ÿ”ข ๐Ÿ‘ˆ ๐Ÿ‘† ๐Ÿค™ ๐Ÿ”— ๐Ÿ’ช โœ โฎ๏ธ ๐Ÿ˜ `def` โš–๏ธ `async def` & FastAPI ๐Ÿ† ๐Ÿšซ ๐Ÿ“‰ ๐ŸŒŒ ๐Ÿ‘† ๐Ÿค™ โšซ๏ธ.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  4. docs_src/sql_databases/tutorial002_an_py39.py

    engine = create_engine(sqlite_url, connect_args=connect_args)
    
    
    def create_db_and_tables():
        SQLModel.metadata.create_all(engine)
    
    
    def get_session():
        with Session(engine) as session:
            yield session
    
    
    SessionDep = Annotated[Session, Depends(get_session)]
    app = FastAPI()
    
    
    @app.on_event("startup")
    def on_startup():
        create_db_and_tables()
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  5. scripts/docs.py

    build_site_path = Path("site_build").absolute()
    
    
    @lru_cache
    def is_mkdocs_insiders() -> bool:
        version = metadata.version("mkdocs-material")
        return "insiders" in version
    
    
    def get_en_config() -> Dict[str, Any]:
        return mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8"))
    
    
    def get_lang_paths() -> List[Path]:
        return sorted(docs_path.iterdir())
    
    
    def lang_callback(lang: Optional[str]) -> Union[str, None]:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 08 11:01:17 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  6. docs_src/sql_databases/tutorial001_an.py

    engine = create_engine(sqlite_url, connect_args=connect_args)
    
    
    def create_db_and_tables():
        SQLModel.metadata.create_all(engine)
    
    
    def get_session():
        with Session(engine) as session:
            yield session
    
    
    SessionDep = Annotated[Session, Depends(get_session)]
    
    app = FastAPI()
    
    
    @app.on_event("startup")
    def on_startup():
        create_db_and_tables()
    
    
    @app.post("/heroes/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  7. tests/test_dependency_normal_exceptions.py

    state = initial_state.copy()
    
    app = FastAPI()
    
    
    async def get_database():
        temp_database = fake_database.copy()
        try:
            yield temp_database
            fake_database.update(temp_database)
        except HTTPException:
            state["except"] = True
            raise
        finally:
            state["finally"] = True
    
    
    @app.put("/invalid-user/{user_id}")
    def put_invalid_user(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  8. build-logic/documentation/src/test/groovy/gradlebuild/docs/XmlSpecification.groovy

        }
    
        def formatTree(Closure cl) {
            withCategories {
                return formatTree(cl.call())
            }
        }
    
        def withCategories(Closure cl) {
            use(BuildableDOMCategory) {
                return cl.call()
            }
        }
    
        def format(Node... nodes) {
            format(nodes as List)
        }
    
        def formatTree(Node... nodes) {
            formatTree(nodes as List)
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 4.1K bytes
    - Viewed (0)
  9. build-logic/documentation/src/test/groovy/gradlebuild/docs/model/SimpleClassMetaDataRepositoryTest.groovy

        def canAddMetaData() {
            TestDomainObject value = new TestDomainObject('a')
    
            when:
            repository.put('class', value)
    
            then:
            repository.find('class') == value
            repository.get('class') == value
        }
    
        def findReturnsNullForUnknownClass() {
            expect:
            repository.find('unknown') == null
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Sat Apr 06 02:21:33 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  10. tests/test_read_with_orm_mode.py

    from pydantic import BaseModel, ConfigDict
    
    from .utils import needs_pydanticv1, needs_pydanticv2
    
    
    @needs_pydanticv2
    def test_read_with_orm_mode() -> None:
        class PersonBase(BaseModel):
            name: str
            lastname: str
    
        class Person(PersonBase):
            @property
            def full_name(self) -> str:
                return f"{self.name} {self.lastname}"
    
            model_config = ConfigDict(from_attributes=True)
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 2.4K bytes
    - Viewed (0)
Back to top