# Cannot save input at csv file Github

**URL:** <https://discuss.streamlit.io/t/cannot-save-input-at-csv-file-github/29065>\
**Category:** Community Cloud\
**Created:** [August 11, 2022, 12:29pm UTC](https://discuss.streamlit.io/t/cannot-save-input-at-csv-file-github/29065 "2022-08-11T12:29:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AliceKoh](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/alicekoh/32/16877_2.png) [@AliceKoh](https://discuss.streamlit.io/u/AliceKoh)\
**Post date:** [August 11, 2022, 12:29pm UTC](https://discuss.streamlit.io/t/cannot-save-input-at-csv-file-github/29065/1 "2022-08-11T12:29:56Z")

</div>

Hi I have an app where request people to provide input. The input is then auto save at a csv file at Github. It works when I run the apps at my local drive but when I deploy at streamlit using Github, the csv file is not updated. I create a test folder at below link. Appreciate if someone could assist me how to get the input save at the csv file.

> **[GitHub - AliceKoh/test: test](https://github.com/AliceKoh/test)**
>
> test. Contribute to AliceKoh/test development by creating an account on GitHub.

app name → streamlit\_app.py  
csv file is save at → data/test.csv

---

<div class="post-metadata">

**Author:** ![blackary](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/blackary/32/47725_2.png) [@blackary](https://discuss.streamlit.io/u/blackary)\
**Post date:** [August 12, 2022, 2:05pm UTC](https://discuss.streamlit.io/t/cannot-save-input-at-csv-file-github/29065/2 "2022-08-12T14:05:40Z")

</div>

Most likely it is “working”, in that it successfully saves the csv file, but it saves it on the Streamlit Cloud server that it’s running on, not on Github. If you wanted to then save the file to github, you would have to use git to add, commit and push the file to the repo after it is updated. You could probably accomplish that using GitPython [Overview / Install — GitPython 3.1.27 documentation](https://gitpython.readthedocs.io/en/stable/intro.html) if you really wanted to.

Alternative methods to saving the file somewhere include:

1. Writing the file to S3 with boto3: [python - How to upload a file to directory in S3 bucket using boto - Stack Overflow](https://stackoverflow.com/a/47099059)
2. Saving the csv to Google Sheets using [gspread — gspread 5.4.0 documentation](https://docs.gspread.org/en/latest/)
3. Allowing the user to download the csv after updating it [How to download a Pandas DataFrame as a CSV? - Streamlit Docs](https://docs.streamlit.io/knowledge-base/using-streamlit/how-download-pandas-dataframe-csv)

Hope that’s helpful!

---

<div class="post-metadata">

**Author:** ![AliceKoh](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/alicekoh/32/16877_2.png) [@AliceKoh](https://discuss.streamlit.io/u/AliceKoh)\
**Post date:** [August 12, 2022, 2:40pm UTC](https://discuss.streamlit.io/t/cannot-save-input-at-csv-file-github/29065/3 "2022-08-12T14:40:27Z")

</div>

HI blackary,  
Thanks for your reply. It is informative. May I know how can I access my csv file at streamlit server? If there is no way to access, then probably I will try learn one of the method like google sheet. But if I can access the file at streamlit server, than I will be very happy to access this way. 😃

---

<div class="post-metadata">

**Author:** ![blackary](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/blackary/32/47725_2.png) [@blackary](https://discuss.streamlit.io/u/blackary)\
**Post date:** [August 12, 2022, 5:52pm UTC](https://discuss.streamlit.io/t/cannot-save-input-at-csv-file-github/29065/4 "2022-08-12T17:52:39Z")

</div>

Hi @AliceKoh,

The easiest way to access the csv file on the server is just to add a file download button [How to download a file in Streamlit? - Streamlit Docs](https://docs.streamlit.io/knowledge-base/using-streamlit/how-download-file-streamlit)

---

<div class="post-metadata">

**Author:** ![AliceKoh](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/alicekoh/32/16877_2.png) [@AliceKoh](https://discuss.streamlit.io/u/AliceKoh)\
**Post date:** [August 15, 2022, 2:42am UTC](https://discuss.streamlit.io/t/cannot-save-input-at-csv-file-github/29065/5 "2022-08-15T02:42:19Z")

</div>

Hi blackary,  
Oh ok. Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [August 15, 2023, 2:42am UTC](https://discuss.streamlit.io/t/cannot-save-input-at-csv-file-github/29065/6 "2023-08-15T02:42:43Z")

</div>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
