mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-25 02:26:53 +08:00
* version-1.9.0-docs * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
18 lines
441 B
Python
18 lines
441 B
Python
import os
|
|
|
|
import requests
|
|
|
|
url = f"{os.getenv('LANGFLOW_URL', '')}/api/v1/projects/download/{os.getenv('PROJECT_ID', '')}"
|
|
|
|
headers = {
|
|
"accept": "application/json",
|
|
"x-api-key": f"{os.getenv('LANGFLOW_API_KEY', '')}",
|
|
}
|
|
|
|
response = requests.request("GET", url, headers=headers)
|
|
response.raise_for_status()
|
|
|
|
with open("langflow-project.zip", "wb") as f:
|
|
f.write(response.content)
|
|
print("Saved response to langflow-project.zip")
|