<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>URL on 每日拍拍</title>
    <link>https://dailypypy.org/tags/url/</link>
    <description>Recent content in URL on 每日拍拍</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-tw</language>
    <copyright>© 2026 每日拍拍</copyright>
    <lastBuildDate>Tue, 27 Oct 2026 12:18:00 +0800</lastBuildDate><atom:link href="https://dailypypy.org/tags/url/index.xml" rel="self" type="application/rss+xml" />
    <follow_challenge>
      <feedId>155076163427069952</feedId>
      <userId>154825760438254592</userId>
    </follow_challenge>
    
    
    <item>
      <title>Streamlit URL 狀態契約：Query Params、篩選還原與雙向同步</title>
      <link>https://dailypypy.org/learn/streamlit-query-params-state-contracts/</link>
      <pubDate>Tue, 27 Oct 2026 12:18:00 +0800</pubDate>
      
      <guid>https://dailypypy.org/learn/streamlit-query-params-state-contracts/</guid>
      <description>&lt;!---
1440x768
prompt: masterpiece, best quality, highres, clean anime illustration, japanese anime style, soft shading, flat color design, 1girl, black hair, green eyes, white off-shoulder shirt, black short skirt, high angle medium shot, standing with hands resting on hips, curious raised eyebrow and gentle closed-mouth smile, looking at viewer, pastel seafoam background, neat composition, detailed eyes, cute and smart vibe, minimal background, polished illustration, no text
negative prompt: worst quality, bad eye, bad hand, extra limbs, manga, multiple views, monochrome, text, signature
dedup note: Narrow follow-up to ../python-streamlit-advanced/, whose URL example owns only a single product parameter. This article owns typed public filter admission, repeated scalar rejection, canonical multivalue serialization, event-source precedence, reset and convergence. Unlike ../streamlit-apptest-pytest/, it tests a specific URL contract rather than surveying the testing API; no cache/multipage or custom-component tutorial is repeated.
---&gt;

&lt;h2 class=&#34;relative group&#34;&gt;一. 前言：你看到的篩選，不一定在分享連結裡 
    &lt;div id=&#34;一-前言你看到的篩選不一定在分享連結裡&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
    
    &lt;span
        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
        &lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700&#34;
            style=&#34;text-decoration-line: none !important;&#34; href=&#34;#%e4%b8%80-%e5%89%8d%e8%a8%80%e4%bd%a0%e7%9c%8b%e5%88%b0%e7%9a%84%e7%af%a9%e9%81%b8%e4%b8%8d%e4%b8%80%e5%ae%9a%e5%9c%a8%e5%88%86%e4%ba%ab%e9%80%a3%e7%b5%90%e8%a3%a1&#34; aria-label=&#34;定位點&#34;&gt;#&lt;/a&gt;
    &lt;/span&gt;        
    
&lt;/h2&gt;
&lt;p&gt;「我把連結傳給你了，你怎麼看到全部資料？」&lt;/p&gt;
&lt;p&gt;拍拍君很熟悉這種場面：自己的 Dashboard 已選好地區和標籤，
同事打開連結卻回到預設畫面。因為 Widget 狀態活在 Session State，
不代表它也活在 URL。&lt;/p&gt;
&lt;p&gt;反過來，直接把 URL 每輪塞回 Widget，也可能讓剛剛的選擇被舊參數蓋掉。
今天不重做 Dashboard，而是替「可分享的篩選條件」訂一份小契約。&lt;/p&gt;
&lt;p&gt;如果還不熟 key 與 rerun，先看&lt;a href=&#34;../python-streamlit-advanced/&#34;&gt;Streamlit 進階篇&lt;/a&gt;。
這次往下挖的是輸入邊界與同步順序，不是另一輪 cache 教學。&lt;/p&gt;</description>
      <media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://dailypypy.org/learn/streamlit-query-params-state-contracts/featured.png" />
    </item>
    
  </channel>
</rss>
