Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 107 for Make (0.14 sec)

  1. tests/test_ws_router.py

    async def router_ws_custom_error(websocket: WebSocket):
        raise CustomError()
    
    
    def make_app(app=None, **kwargs):
        app = app or FastAPI(**kwargs)
        app.include_router(router)
        app.include_router(prefix_router, prefix="/prefix")
        app.include_router(native_prefix_route)
        return app
    
    
    app = make_app(app)
    
    
    def test_app():
        client = TestClient(app)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  2. tensorflow/api_template.__init__.py

    from tensorflow.python.util.lazy_loader import KerasLazyLoader as _KerasLazyLoader
    
    # Make sure code inside the TensorFlow codebase can use tf2.enabled() at import.
    _os.environ["TF2_BEHAVIOR"] = "1"
    from tensorflow.python import tf2 as _tf2
    _tf2.enable()
    
    # API IMPORTS PLACEHOLDER
    
    # WRAPPER_PLACEHOLDER
    
    # Make sure directory containing top level submodules is in
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 05 06:27:59 GMT 2024
    - 6.7K bytes
    - Viewed (3)
  3. docs/sts/client_grants/__init__.py

                # all duplicate headers and pick one.
                headers = {}
                headers['content-type'] = 'application/x-www-form-urlencoded'
                headers['authorization'] = urllib3.make_headers(
                    basic_auth='%s:%s' % (self.cid, self.csec))['authorization']
    
                response = self._http.urlopen('POST', self.idp_ep,
                                              body="grant_type=client_credentials",
    Python
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 4.6K bytes
    - Viewed (1)
  4. scripts/docs.py

        This is here only to preview a site with translations already built.
    
        Make sure you run the build-all command first.
        """
        typer.echo("Warning: this is a very simple server.")
        typer.echo("For development, use the command live instead.")
        typer.echo("This is here only to preview a site with translations already built.")
        typer.echo("Make sure you run the build-all command first.")
        os.chdir("site")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  5. fastapi/openapi/utils.py

                        (param["in"], param["name"]): param
                        for param in parameters
                        if param.get("required")
                    }
                    # Make sure required definitions of the same parameter take precedence
                    # over non-required definitions
                    all_parameters.update(required_parameters)
                    operation["parameters"] = list(all_parameters.values())
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  6. docs_src/extra_models/tutorial002.py

        password: str
    
    
    class UserOut(UserBase):
        pass
    
    
    class UserInDB(UserBase):
        hashed_password: str
    
    
    def fake_password_hasher(raw_password: str):
        return "supersecret" + raw_password
    
    
    def fake_save_user(user_in: UserIn):
        hashed_password = fake_password_hasher(user_in.password)
        user_in_db = UserInDB(**user_in.dict(), hashed_password=hashed_password)
        print("User saved! ..not really")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 824 bytes
    - Viewed (0)
  7. docs_src/security/tutorial004_an_py310.py

    
    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):
        user = get_user(fake_db, username)
        if not user:
            return False
        if not verify_password(password, user.hashed_password):
            return False
        return user
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  8. docs_src/security/tutorial005_an.py

    
    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):
        user = get_user(fake_db, username)
        if not user:
            return False
        if not verify_password(password, user.hashed_password):
            return False
        return user
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  9. docs_src/query_params/tutorial001.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
    
    
    @app.get("/items/")
    async def read_item(skip: int = 0, limit: int = 10):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 250 bytes
    - Viewed (0)
  10. docs_src/dependencies/tutorial004_py310.py

    from fastapi import Depends, FastAPI
    
    app = FastAPI()
    
    
    fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
    
    
    class CommonQueryParams:
        def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100):
            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: CommonQueryParams = Depends()):
        response = {}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 607 bytes
    - Viewed (0)
Back to top