<#337 supporting the file_name parameter in the ne...
# flyte-github
a
#337 supporting the file_name parameter in the new_remote function Pull request opened by 0yukali0 on <!date^1763388390^{date_short}|2025-11-17T14:06:30Z> ## Tracking issues flyteorg/flyte#6745 ## Why are the changes needed? Allow user to set remote file name in flyte-sdk. ## What changes were proposed in this pull request? Adding the file_name parameter in new_remote function to new the remote file which path is joined with the file_name. ## How was this patch tested? @env.task async def demonstrate_streaming_write(content: str) -> File: """ Demonstrates streaming write to a remote file. """ f = File.new_remote(file_name="chunk.txt") async with f.open("wb") as fh: # Write in chunks to demonstrate streaming data = content.encode("utf-8") chunk_size = 10 for i in range(0, len(data), chunk_size): chunk = data[i : i + chunk_size] await fh.write(chunk) print(f"Streamed content to file: {f.path}") return f Run following step to reproduce. uv venv -p 3.13 source .venv/bin/activate uv pip install -e ./flyte-sdk flyte run --local file.py demonstrate_streaming_write --content "This is streaming content that will be written in chunks!" [image](https://private-user-images.githubusercontent.com/45888688/515203795-a32af19a-d9d4-4486-9d6e-e1446888e43a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjM0Mjc2NzgsIm5iZiI6MTc2MzQyNzM3OCwicGF0aCI6Ii80NTg4ODY4OC81MTUyMDM3OTUtYTMyYWYxOWEtZDlkNC00NDg2LTlkNmUtZTE0NDY4ODhlNDNhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTExMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMTE4VDAwNTYxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI3NzFjMjJiNDc3NGZlZWU5ZWMzZDUyZmNmYWIxODUzOTIxNzdlNWFkNTYyNDNkNjI3YjZiNmYwMTczZWVlNTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.cs25y5MBxgnx9frMY-dDsAe09wZshuh8j-Mb7Kfmfm0) ## Check all the applicable boxes • make fmt (done) • make mypy (pass) • make unit_test (pass) ## Docs link flyteorg/flyte-sdk