Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for berate (0.24 sec)

  1. docs_src/app_testing/app_b/main.py

        if item_id not in fake_db:
            raise HTTPException(status_code=404, detail="Item not found")
        return fake_db[item_id]
    
    
    @app.post("/items/", response_model=Item)
    async def create_item(item: Item, x_token: str = Header()):
        if x_token != fake_secret_token:
            raise HTTPException(status_code=400, detail="Invalid X-Token header")
        if item.id in fake_db:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 14:44:08 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  2. docs_src/sql_databases_peewee/sql_app/main.py

                database.db.close()
    
    
    @app.post("/users/", response_model=schemas.User, dependencies=[Depends(get_db)])
    def create_user(user: schemas.UserCreate):
        db_user = crud.get_user_by_email(email=user.email)
        if db_user:
            raise HTTPException(status_code=400, detail="Email already registered")
        return crud.create_user(user=user)
    
    
    @app.get("/users/", response_model=List[schemas.User], dependencies=[Depends(get_db)])
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 2.2K bytes
    - Viewed (0)
  3. .github/actions/notify-translations/app/main.py

                settings=settings,
                discussion_number=discussion_number,
                after=last_edge.cursor,
            )
        return comment_nodes
    
    
    def create_comment(*, settings: Settings, discussion_id: str, body: str):
        data = get_graphql_response(
            settings=settings,
            query=add_comment_mutation,
            discussion_id=discussion_id,
            body=body,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  4. .github/actions/people/app/main.py

        result = subprocess.run(["git", "commit", "-m", message], check=True)
        logging.info("Pushing branch")
        subprocess.run(["git", "push", "origin", branch_name], check=True)
        logging.info("Creating PR")
        pr = repo.create_pull(title=message, body=message, base="master", head=branch_name)
        logging.info(f"Created PR: {pr.number}")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  5. docs_src/sql_databases/sql_app_py39/main.py

    from . import crud, models, schemas
    from .database import SessionLocal, engine
    
    models.Base.metadata.create_all(bind=engine)
    
    app = FastAPI()
    
    
    # Dependency
    def get_db():
        db = SessionLocal()
        try:
            yield db
        finally:
            db.close()
    
    
    @app.post("/users/", response_model=schemas.User)
    def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.6K bytes
    - Viewed (0)
  6. docs_src/sql_databases/sql_app/main.py

    from . import crud, models, schemas
    from .database import SessionLocal, engine
    
    models.Base.metadata.create_all(bind=engine)
    
    app = FastAPI()
    
    
    # Dependency
    def get_db():
        db = SessionLocal()
        try:
            yield db
        finally:
            db.close()
    
    
    @app.post("/users/", response_model=schemas.User)
    def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun May 17 10:14:14 GMT 2020
    - 1.6K bytes
    - Viewed (0)
  7. docs_src/app_testing/app_b_an_py39/main.py

        if item_id not in fake_db:
            raise HTTPException(status_code=404, detail="Item not found")
        return fake_db[item_id]
    
    
    @app.post("/items/", response_model=Item)
    async def create_item(item: Item, x_token: Annotated[str, Header()]):
        if x_token != fake_secret_token:
            raise HTTPException(status_code=400, detail="Invalid X-Token header")
        if item.id in fake_db:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  8. docs_src/app_testing/app_b_an_py310/main.py

        if item_id not in fake_db:
            raise HTTPException(status_code=404, detail="Item not found")
        return fake_db[item_id]
    
    
    @app.post("/items/", response_model=Item)
    async def create_item(item: Item, x_token: Annotated[str, Header()]):
        if x_token != fake_secret_token:
            raise HTTPException(status_code=400, detail="Invalid X-Token header")
        if item.id in fake_db:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  9. docs_src/sql_databases/sql_app_py310/main.py

    from . import crud, models, schemas
    from .database import SessionLocal, engine
    
    models.Base.metadata.create_all(bind=engine)
    
    app = FastAPI()
    
    
    # Dependency
    def get_db():
        db = SessionLocal()
        try:
            yield db
        finally:
            db.close()
    
    
    @app.post("/users/", response_model=schemas.User)
    def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.6K bytes
    - Viewed (0)
  10. docs_src/app_testing/app_b_py310/main.py

        if item_id not in fake_db:
            raise HTTPException(status_code=404, detail="Item not found")
        return fake_db[item_id]
    
    
    @app.post("/items/", response_model=Item)
    async def create_item(item: Item, x_token: str = Header()):
        if x_token != fake_secret_token:
            raise HTTPException(status_code=400, detail="Invalid X-Token header")
        if item.id in fake_db:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 14:44:08 GMT 2024
    - 1.1K bytes
    - Viewed (0)
Back to top