Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 1,323 for IsSkip (0.38 sec)

  1. 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):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 250 bytes
    - Viewed (0)
  2. docs_src/query_params/tutorial006b.py

    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_user_item(
        item_id: str, needy: str, skip: int = 0, limit: Union[int, None] = None
    ):
        item = {"item_id": item_id, "needy": needy, "skip": skip, "limit": limit}
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 301 bytes
    - Viewed (0)
  3. docs_src/dependencies/tutorial001_02_an_py310.py

    from typing import Annotated
    
    from fastapi import Depends, FastAPI
    
    app = FastAPI()
    
    
    async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100):
        return {"q": q, "skip": skip, "limit": limit}
    
    
    CommonsDep = Annotated[dict, Depends(common_parameters)]
    
    
    @app.get("/items/")
    async def read_items(commons: CommonsDep):
        return commons
    
    
    @app.get("/users/")
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 447 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_query_params/test_tutorial006.py

        assert response.status_code == 200
        assert response.json() == {
            "item_id": "foo",
            "needy": "very",
            "skip": 0,
            "limit": None,
        }
    
    
    def test_foo_no_needy(client: TestClient):
        response = client.get("/items/foo?skip=a&limit=b")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  5. src/cmd/go/testdata/script/test_fail_newline.txt

    go test
    ! stderr .
    stdout '^skippingok\s+example/skip'
    
    
    -- go.mod --
    module example
    
    go 1.18
    -- fail/fail_test.go --
    package fail
    
    import (
    	"os"
    	"testing"
    )
    
    func TestMain(m *testing.M) {
    	os.Stderr.WriteString("exitcode=1")
    	os.Exit(1)
    }
    -- skip/skip_test.go --
    package skip
    
    import (
    	"os"
    	"testing"
    )
    
    func TestMain(m *testing.M) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 04 21:33:23 UTC 2021
    - 1.4K bytes
    - Viewed (0)
  6. docs_src/sql_databases/sql_app/alt_main.py

        return crud.create_user(db=db, user=user)
    
    
    @app.get("/users/", response_model=List[schemas.User])
    def read_users(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)):
        users = crud.get_users(db, skip=skip, limit=limit)
        return users
    
    
    @app.get("/users/{user_id}", response_model=schemas.User)
    def read_user(user_id: int, db: Session = Depends(get_db)):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 1.9K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_dependencies/test_tutorial004_an_py39.py

            ),
            (
                "/items?q=foo&skip=1",
                200,
                {"items": [{"item_name": "Bar"}, {"item_name": "Baz"}], "q": "foo"},
            ),
            (
                "/items?q=bar&limit=2",
                200,
                {"items": [{"item_name": "Foo"}, {"item_name": "Bar"}], "q": "bar"},
            ),
            (
                "/items?q=bar&skip=1&limit=1",
                200,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  8. pkg/fuzz/util.go

    	f.Fuzz(func(t *testing.T, data []byte) {
    		defer Finalize()
    		fg := New(t, data)
    		ff(fg)
    	})
    }
    
    // Finalize works around an issue in the oss-fuzz logic that doesn't allow using Skip()
    // Instead, we send a panic which we handle and treat as skip.
    // https://github.com/AdamKorcz/go-118-fuzz-build/issues/6
    func Finalize() {
    	if r := recover(); r != nil {
    		if s, ok := r.(string); ok {
    			if strings.HasPrefix(s, panicPrefix) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Nov 30 15:31:14 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  9. src/cmd/go/testdata/script/build_plugin_reproducible.txt

    [!buildmode:plugin] skip
    [short] skip
    [!cgo] skip '-buildmode=plugin requires external linking'
    
    go build -trimpath -buildvcs=false -buildmode=plugin -o a.so main.go
    go build -trimpath -buildvcs=false -buildmode=plugin -o b.so main.go
    cmp -q a.so b.so
    
    -- main.go --
    package main
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 19:07:03 UTC 2024
    - 296 bytes
    - Viewed (0)
  10. docs_src/sql_databases_peewee/sql_app/crud.py

    
    def get_users(skip: int = 0, limit: int = 100):
        return list(models.User.select().offset(skip).limit(limit))
    
    
    def create_user(user: schemas.UserCreate):
        fake_hashed_password = user.password + "notreallyhashed"
        db_user = models.User(email=user.email, hashed_password=fake_hashed_password)
        db_user.save()
        return db_user
    
    
    def get_items(skip: int = 0, limit: int = 100):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 843 bytes
    - Viewed (0)
Back to top