Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for mp4 (0.19 sec)

  1. docs_src/custom_response/tutorial009.py

    from fastapi import FastAPI
    from fastapi.responses import FileResponse
    
    some_file_path = "large-video-file.mp4"
    app = FastAPI()
    
    
    @app.get("/")
    async def main():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 202 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_custom_response/test_tutorial009.py

    from docs_src.custom_response import tutorial009
    from docs_src.custom_response.tutorial009 import app
    
    client = TestClient(app)
    
    
    def test_get(tmp_path: Path):
        file_path: Path = tmp_path / "large-video-file.mp4"
        tutorial009.some_file_path = str(file_path)
        test_content = b"Fake video bytes"
        file_path.write_bytes(test_content)
        response = client.get("/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jul 03 19:51:28 GMT 2021
    - 487 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_custom_response/test_tutorial009b.py

    from docs_src.custom_response import tutorial009b
    from docs_src.custom_response.tutorial009b import app
    
    client = TestClient(app)
    
    
    def test_get(tmp_path: Path):
        file_path: Path = tmp_path / "large-video-file.mp4"
        tutorial009b.some_file_path = str(file_path)
        test_content = b"Fake video bytes"
        file_path.write_bytes(test_content)
        response = client.get("/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jul 03 19:51:28 GMT 2021
    - 490 bytes
    - Viewed (0)
  4. docs_src/custom_response/tutorial008.py

    from fastapi.responses import StreamingResponse
    
    some_file_path = "large-video-file.mp4"
    app = FastAPI()
    
    
    @app.get("/")
    def main():
        def iterfile():  # (1)
            with open(some_file_path, mode="rb") as file_like:  # (2)
                yield from file_like  # (3)
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jul 19 19:14:58 GMT 2021
    - 360 bytes
    - Viewed (0)
  5. docs_src/custom_response/tutorial009b.py

    from fastapi import FastAPI
    from fastapi.responses import FileResponse
    
    some_file_path = "large-video-file.mp4"
    app = FastAPI()
    
    
    @app.get("/", response_class=FileResponse)
    async def main():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jul 03 19:51:28 GMT 2021
    - 217 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_custom_response/test_tutorial008.py

    from docs_src.custom_response import tutorial008
    from docs_src.custom_response.tutorial008 import app
    
    client = TestClient(app)
    
    
    def test_get(tmp_path: Path):
        file_path: Path = tmp_path / "large-video-file.mp4"
        tutorial008.some_file_path = str(file_path)
        test_content = b"Fake video bytes"
        file_path.write_bytes(test_content)
        response = client.get("/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 487 bytes
    - Viewed (0)
Back to top