Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for files (0.29 sec)

  1. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an.py

                "schemas": {
                    "Body_create_file_files__post": {
                        "title": "Body_create_file_files__post",
                        "required": ["file", "fileb", "token"],
                        "type": "object",
                        "properties": {
                            "file": {"title": "File", "type": "string", "format": "binary"},
                            "fileb": {
                                "title": "Fileb",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_request_files/test_tutorial002.py

            }
        )
    
    
    def test_post_files(tmp_path):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
        path2 = tmp_path / "test2.txt"
        path2.write_bytes(b"<file content2>")
    
        client = TestClient(app)
        with path.open("rb") as file, path2.open("rb") as file2:
            response = client.post(
                "/files/",
                files=(
                    ("files", ("test.txt", file)),
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py

                "schemas": {
                    "Body_create_file_files__post": {
                        "title": "Body_create_file_files__post",
                        "required": ["file", "fileb", "token"],
                        "type": "object",
                        "properties": {
                            "file": {"title": "File", "type": "string", "format": "binary"},
                            "fileb": {
                                "title": "Fileb",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_request_files/test_tutorial001_an.py

            }
        )
    
    
    def test_post_file(tmp_path):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
    
        client = TestClient(app)
        with path.open("rb") as file:
            response = client.post("/files/", files={"file": file})
        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": 14}
    
    
    def test_post_large_file(tmp_path):
        default_pydantic_max_size = 2**16
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  5. scripts/docs.py

            ..., callback=lang_callback, autocompletion=complete_existing_lang
        ),
    ) -> None:
        """
        Build the docs for a language.
        """
        insiders_env_file = os.environ.get("INSIDERS_FILE")
        print(f"Insiders file {insiders_env_file}")
        if is_mkdocs_insiders():
            print("Using insiders")
        lang_path: Path = Path("docs") / lang
        if not lang_path.is_dir():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  6. tests/test_tutorial/test_request_files/test_tutorial002_py39.py

                        },
                    },
                    "Body_create_files_files__post": {
                        "title": "Body_create_files_files__post",
                        "required": ["files"],
                        "type": "object",
                        "properties": {
                            "files": {
                                "title": "Files",
                                "type": "array",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_files/test_tutorial002_an_py39.py

        client = TestClient(app)
        with path.open("rb") as file, path2.open("rb") as file2:
            response = client.post(
                "/files/",
                files=(
                    ("files", ("test.txt", file)),
                    ("files", ("test2.txt", file2)),
                ),
            )
        assert response.status_code == 200, response.text
        assert response.json() == {"file_sizes": [14, 15]}
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_files/test_tutorial001_an_py39.py

        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": 14}
    
    
    @needs_py39
    def test_post_large_file(tmp_path, client: TestClient):
        default_pydantic_max_size = 2**16
        path = tmp_path / "test.txt"
        path.write_bytes(b"x" * (default_pydantic_max_size + 1))
    
        with path.open("rb") as file:
            response = client.post("/files/", files={"file": file})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  9. fastapi/datastructures.py

        ## Example
    
        ```python
        from typing import Annotated
    
        from fastapi import FastAPI, File, UploadFile
    
        app = FastAPI()
    
    
        @app.post("/files/")
        async def create_file(file: Annotated[bytes, File()]):
            return {"file_size": len(file)}
    
    
        @app.post("/uploadfile/")
        async def create_upload_file(file: UploadFile):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  10. configure.py

    ]
    
    # List of files to configure when building Bazel on Apple platforms.
    APPLE_BAZEL_FILES = [
        'tensorflow/lite/ios/BUILD', 'tensorflow/lite/objc/BUILD',
        'tensorflow/lite/swift/BUILD',
        'tensorflow/lite/tools/benchmark/experimental/ios/BUILD'
    ]
    
    # List of files to move when building for iOS.
    IOS_FILES = [
        'tensorflow/lite/objc/TensorFlowLiteObjC.podspec',
    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)
Back to top