-
Notifications
You must be signed in to change notification settings - Fork 4k
Add database tutorials to docs #3272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add database tutorials to docs #3272
Conversation
randyzwitch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking this as approved, though please fix the typos. Otherwise, I know that the plan is to have a revision pass to clean things up further, and my comments can be viewed as statements towards that goal. They do NOT need to be implemented in order to merge this PR.
docs/tutorial/postgresql.md
Outdated
|
|
||
| ## Create a PostgreSQL database | ||
|
|
||
| If you already have a database that you want to use, feel free to [skip this step](#add-username-and-password-to-your-local-app-secrets). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skip TO this step, make a NOTE
docs/tutorial/postgresql.md
Outdated
| ``` | ||
|
|
||
| ```eval_rst | ||
| .. note:: See ``st.cache`` above? Without it, Streamlit would run the query every time the app reruns (e.g. on a widget interaction). With ``st.cache``, it only runs when the query changes or after 10 minutes (that's what ``ttl`` is for). Watch out: If your database updates more frequently, you should adapt ``ttl`` or remove caching, so viewers always see the latest data. Read more about caching `here <../caching.html>`__. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to paragraph
docs/tutorial/postgresql.md
Outdated
| ```eval_rst | ||
| .. note:: See ``st.cache`` above? Without it, Streamlit would run the query every time the app reruns (e.g. on a widget interaction). With ``st.cache``, it only runs when the query changes or after 10 minutes (that's what ``ttl`` is for). Watch out: If your database updates more frequently, you should adapt ``ttl`` or remove caching, so viewers always see the latest data. Read more about caching `here <../caching.html>`__. | ||
|
|
||
| .. tip:: Alternatively, you can use ``pandas.read_sql`` to read directly from your database into a dataframe. More info in this `tutorial <https://pythontic.com/pandas/serialization/postgresql>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove for now, as it adds more information than necessary to show the example
|
Thanks for making those changes @snehankekre, I feel like the flow is much better now. |
* develop: Init test variables in beforeEach Init test variables in beforeEach Add database tutorials to docs (streamlit#3272) update contact email to support (streamlit#3282) Better typing Remove dummy script Add testing and some comments Fix the bug, don't love the solution Improve test name Add script for testing Fix test after merge Make sure selected options aren't visible in the dropdown Add test for the fuzzy filter Import filter function from another component
# By Ken McGrady (19) and others # Via GitHub (9) and others * develop: (96 commits) st.form: clear_on_submit (streamlit#3287) Init test variables in beforeEach Init test variables in beforeEach Add database tutorials to docs (streamlit#3272) update contact email to support (streamlit#3282) Better typing Remove dummy script Add testing and some comments Fix the bug, don't love the solution Improve test name Add script for testing Fix test after merge Make sure selected options aren't visible in the dropdown Widget test cleanup (streamlit#3286) Add test for the fuzzy filter Import filter function from another component Remove tag from PR template (streamlit#3284) Add test req version bound for TF to fix tests (streamlit#3266) pin click to < 8.0 (streamlit#3256) Up version to 0.82.0 ... # Conflicts: # frontend/src/components/shared/Dropdown/Selectbox.test.tsx
Migrated database tutorials from Notion pages to docs.
Description:
Updated TOC in
index.mdwith section for database tutorialsAdded the following tutorials to
docs/tutorial/:Note: Connect Streamlit to Firestore (blog) does not include an
.mdfile. I've linked to the blog post indocs/tutorial/databases.mdAdded images used in the tutorials to
docs/media/databases/Updated
docs/requirements.txtwith the sphinxcontrib-images Sphinx extension to allow for images in the tutorials to be expanded / enlarged when clicked. When required, we have placed images beside each other to reduce page length and allowed said images to be enlarged when clickedUpdated
conf.pywith thesphinxcontrib.imagesextension