Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for notes (0.21 sec)

  1. docs_src/async_sql_databases/tutorial001.py

    
    @app.post("/notes/", response_model=Note)
    async def create_note(note: NoteIn):
        query = notes.insert().values(text=note.text, completed=note.completed)
        last_record_id = await database.execute(query)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 1.4K bytes
    - Viewed (0)
  2. scripts/mkdocs_hooks.py

    from mkdocs.structure.files import File, Files
    from mkdocs.structure.nav import Link, Navigation, Section
    from mkdocs.structure.pages import Page
    
    non_traslated_sections = [
        "reference/",
        "release-notes.md",
    ]
    
    
    @lru_cache
    def get_missing_translation_content(docs_dir: str) -> str:
        docs_dir_path = Path(docs_dir)
        missing_translation_path = docs_dir_path.parent.parent / "missing-translation.md"
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_async_sql_databases/test_tutorial001.py

        with TestClient(app) as client:
            note = {"text": "Foo bar", "completed": False}
            response = client.post("/notes/", json=note)
            assert response.status_code == 200, response.text
            data = response.json()
            assert data["text"] == note["text"]
            assert data["completed"] == note["completed"]
            assert "id" in data
            response = client.get("/notes/")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 6K bytes
    - Viewed (0)
  4. configure.py

              'errors.\n' %
              (android_ndk_home_path, ndk_version, _SUPPORTED_ANDROID_NDK_VERSIONS))
      write_action_env_to_bazelrc('ANDROID_NDK_VERSION', ndk_version)
    
      # Now grab the NDK API level to use. Note that this is different from the
      # SDK API level, as the NDK API level is effectively the *min* target SDK
      # version.
      meta = open(os.path.join(android_ndk_home_path, 'meta/platforms.json'))
      platforms = json.load(meta)
    Python
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 18:25:36 GMT 2024
    - 53.8K bytes
    - Viewed (0)
  5. tests/test_request_body_parameters_media_type.py

    import typing
    
    from fastapi import Body, FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    media_type = "application/vnd.api+json"
    
    
    # NOTE: These are not valid JSON:API resources
    # but they are fine for testing requestBody with custom media_type
    class Product(BaseModel):
        name: str
        price: float
    
    
    class Shop(BaseModel):
        name: str
    
    
    @app.post("/products")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 6.4K bytes
    - Viewed (0)
  6. fastapi/security/oauth2.py

            if form_data.client_id:
                data["client_id"] = form_data.client_id
            if form_data.client_secret:
                data["client_secret"] = form_data.client_secret
            return data
        ```
    
        Note that for OAuth2 the scope `items:read` is a single scope in an opaque string.
        You could have custom internal logic to separate it by colon caracters (`:`) or
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  7. fastapi/routing.py

                    """
                ),
            ] = None,
            routes: Annotated[
                Optional[List[BaseRoute]],
                Doc(
                    """
                    **Note**: you probably shouldn't use this parameter, it is inherited
                    from Starlette and supported for compatibility.
    
                    ---
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  8. fastapi/applications.py

                    """
                ),
            ] = False,
            routes: Annotated[
                Optional[List[BaseRoute]],
                Doc(
                    """
                    **Note**: you probably shouldn't use this parameter, it is inherited
                    from Starlette and supported for compatibility.
    
                    ---
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  9. .github/actions/people/app/main.py

        repo = g.get_repo(settings.github_repository)
        discussion_nodes = get_discussion_nodes(settings=settings)
        experts_results = get_discussions_experts(discussion_nodes=discussion_nodes)
        pr_nodes = get_pr_nodes(settings=settings)
        contributors_results = get_contributors(pr_nodes=pr_nodes)
        authors = {**experts_results.authors, **contributors_results.authors}
        maintainers_logins = {"tiangolo"}
    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)
  10. .github/actions/notify-translations/app/main.py

        *, settings: Settings, discussion_number: int
    ):
        comment_nodes: List[Comment] = []
        discussion_edges = get_graphql_translation_discussion_comments_edges(
            settings=settings, discussion_number=discussion_number
        )
    
        while discussion_edges:
            for discussion_edge in discussion_edges:
                comment_nodes.append(discussion_edge.node)
            last_edge = discussion_edges[-1]
    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)
Back to top