Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 255 for Wain (0.14 sec)

  1. .github/actions/notify-translations/app/main.py

            comment_id=comment_id,
            body=body,
        )
        response = UpdateCommentResponse.parse_obj(data)
        return response.data.updateDiscussionComment.comment
    
    
    if __name__ == "__main__":
        settings = Settings()
        if settings.input_debug:
            logging.basicConfig(level=logging.DEBUG)
        else:
            logging.basicConfig(level=logging.INFO)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  2. .github/actions/people/app/main.py

                        "count": count,
                        "avatarUrl": author.avatarUrl,
                        "url": author.url,
                    }
                )
        return users
    
    
    if __name__ == "__main__":
        logging.basicConfig(level=logging.INFO)
        settings = Settings()
        logging.info(f"Using config: {settings.model_dump_json()}")
        g = Github(settings.input_token.get_secret_value())
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  3. docs_src/app_testing/app_b/test_main.py

    from fastapi.testclient import TestClient
    
    from .main import app
    
    client = TestClient(app)
    
    
    def test_read_item():
        response = client.get("/items/foo", headers={"X-Token": "coneofsilence"})
        assert response.status_code == 200
        assert response.json() == {
            "id": "foo",
            "title": "Foo",
            "description": "There goes my hero",
        }
    
    
    def test_read_item_bad_token():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  4. docs_src/settings/app02_an_py39/main.py

    Sebastián Ramírez <******@****.***> 1698179166 +0400
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 445 bytes
    - Viewed (0)
  5. tests/test_dependency_overrides.py

                ]
            }
        )
    
    
    def test_main_depends_q_foo():
        response = client.get("/main-depends/?q=foo")
        assert response.status_code == 200
        assert response.json() == {
            "in": "main-depends",
            "params": {"q": "foo", "skip": 0, "limit": 100},
        }
    
    
    def test_main_depends_q_foo_skip_100_limit_200():
        response = client.get("/main-depends/?q=foo&skip=100&limit=200")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/bigger-applications.md

    ## The main `FastAPI`
    
    Now, let's see the module at `app/main.py`.
    
    Here's where you import and use the class `FastAPI`.
    
    This will be the main file in your application that ties everything together.
    
    And as most of your logic will now live in its own specific module, the main file will be quite simple.
    
    ### Import `FastAPI`
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_settings/test_app02.py

        from docs_src.settings.app02 import main
    
        monkeypatch.setenv("ADMIN_EMAIL", "******@****.***")
        settings = main.get_settings()
        assert settings.app_name == "Awesome API"
        assert settings.items_per_user == 50
    
    
    @needs_pydanticv2
    def test_override_settings():
        from docs_src.settings.app02 import test_main
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 488 bytes
    - Viewed (0)
  8. docs/de/docs/advanced/async-tests.md

    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
    Die Datei `main.py` hätte als Inhalt:
    
    ```Python
    {!../../../docs_src/async_tests/main.py!}
    ```
    
    Die Datei `test_main.py` hätte die Tests für `main.py`, das könnte jetzt so aussehen:
    
    ```Python
    {!../../../docs_src/async_tests/test_main.py!}
    ```
    
    ## Es ausführen
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:25:57 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/debugging.md

    В вашем FastAPI приложении, импортируйте и вызовите `uvicorn` напрямую:
    
    ```Python hl_lines="1  15"
    {!../../../docs_src/debugging/tutorial001.py!}
    ```
    
    ### Описание `__name__ == "__main__"`
    
    Главная цель использования `__name__ == "__main__"` в том, чтобы код выполнялся при запуске файла с помощью:
    
    <div class="termy">
    
    ```console
    $ python myapp.py
    ```
    
    </div>
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/sub-applications.md

    ```Python hl_lines="11  19"
    {!../../../docs_src/sub_applications/tutorial001.py!}
    ```
    
    ### Check the automatic API docs
    
    Now, run `uvicorn` with the main app, if your file is `main.py`, it would be:
    
    <div class="termy">
    
    ```console
    $ uvicorn main:app --reload
    
    <span style="color: green;">INFO</span>:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    ```
    
    </div>
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 2.9K bytes
    - Viewed (0)
Back to top