Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for get_authors (0.17 sec)

  1. docs_src/dataclasses/tutorial003.py

    async def create_author_items(author_id: str, items: List[Item]):  # (5)
        return {"name": author_id, "items": items}  # (6)
    
    
    @app.get("/authors/", response_model=List[Author])  # (7)
    def get_authors():  # (8)
        return [  # (9)
            {
                "name": "Breaters",
                "items": [
                    {
                        "name": "Island In The Moon",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dataclasses/test_tutorial003.py

            "name": "foo",
            "items": [
                {"name": "Bar", "description": None},
                {"name": "Baz", "description": "Drop the Baz"},
            ],
        }
    
    
    def test_get_authors():
        response = client.get("/authors/")
        assert response.status_code == 200
        assert response.json() == [
            {
                "name": "Breaters",
                "items": [
                    {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 12.1K bytes
    - Viewed (0)
Back to top