<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python Package on Biraj Koirala</title><link>https://birajkoirala.com.np/tags/python-package/</link><description>Recent content in Python Package on Biraj Koirala</description><generator>Source Themes academia (https://sourcethemes.com/academic/)</generator><language>en-us</language><copyright>Copyright &amp;copy; {year}</copyright><lastBuildDate>Sat, 22 Feb 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://birajkoirala.com.np/tags/python-package/index.xml" rel="self" type="application/rss+xml"/><item><title>Discovering Rupantaran: Simplifying Nepali Measurements for Everyone</title><link>https://birajkoirala.com.np/post/5.rupantaran/</link><pubDate>Sat, 22 Feb 2025 00:00:00 +0000</pubDate><guid>https://birajkoirala.com.np/post/5.rupantaran/</guid><description>&lt;h2>Table of Contents&lt;/h2>
&lt;nav id="TableOfContents">
&lt;ul>
&lt;li>&lt;a href="#the-journey-behind-rupantaran">The Journey Behind Rupantaran&lt;/a>&lt;/li>
&lt;li>&lt;a href="#spotlight-bigha-busters">Spotlight: Bigha Busters&lt;/a>&lt;/li>
&lt;li>&lt;a href="#open-source-philosophy">Open Source Philosophy&lt;/a>&lt;/li>
&lt;li>&lt;a href="#a-quick-taste-sample-code">A Quick Taste: Sample Code&lt;/a>&lt;/li>
&lt;/ul>
&lt;/nav>
&lt;p>Imagine you&amp;rsquo;re buying land in Nepal, and someone tells you it&amp;rsquo;s &amp;ldquo;2 bigha, 5 kattha&amp;rdquo; in the Terai region or &amp;ldquo;3 ropani, 2 aana&amp;rdquo; in the hilly areas. Or perhaps you&amp;rsquo;re at a market, and a vendor offers &amp;ldquo;5 pau&amp;rdquo; of rice. If you&amp;rsquo;re scratching your head wondering how these traditional Nepali measurements translate into something familiar—like square meters or kilograms—you&amp;rsquo;re not alone. That&amp;rsquo;s exactly why I created &lt;a href="https://github.com/biraj094/rupantaran" target="_blank" rel="noopener noreferrer">Rupantaran&lt;/a> , an open-source Python package designed to make these conversions simple and accessible to everyone.&lt;/p>
&lt;hr>
&lt;h2 id="the-journey-behind-rupantaran">The Journey Behind Rupantaran&lt;/h2>
&lt;p>&amp;ldquo;Rupantaran,&amp;rdquo; meaning &amp;ldquo;transformation&amp;rdquo; in Nepali, reflects the goal of making traditional measurements more accessible. Fascinated by Nepal&amp;rsquo;s rich heritage, I noticed that traditional units—like bigha for land or tola for weight—are still widely used, especially in rural areas. Yet, in today&amp;rsquo;s globalized world, where metric units like meters and kilograms dominate, these local measurements can sometimes feel like a puzzle. Hoping to bridge this gap, I worked on a tool that makes conversions easier. Believing that knowledge should be shared and accessible to everyone, Rupantaran is open-source, welcoming others to use, refine, and contribute to its growth.&lt;/p>
&lt;hr>
&lt;h2 id="spotlight-bigha-busters">Spotlight: Bigha Busters&lt;/h2>
&lt;figure class="figure">
&lt;img src="bigha-busters.jpg"
alt=""
title="Bigha Busters"
style="width: 75%; height: auto;">
&lt;/figure>
&lt;p>One of my favorite bits is &lt;a href="https://bigha-busters.streamlit.app/" target="_blank" rel="noopener noreferrer">Bigha Busters&lt;/a> , a little app I whipped up with Rupantaran. It&amp;rsquo;s got a cool vibe—pick a Nepali unit like &amp;ldquo;2 bigha&amp;rdquo; or &amp;ldquo;5 ropani,&amp;rdquo; and it not only converts it to square meters but also shows you fun equivalents. How many Olympic pools could fit? What about Taj Mahals? It&amp;rsquo;s a playful way to wrap your head around these sizes, and I had a blast making it. The code&amp;rsquo;s right &lt;a href="https://github.com/biraj094/rupantaran/tree/main/example-streamlit-app" target="_blank" rel="noopener noreferrer">here&lt;/a> if you want to peek or build your own.&lt;/p>
&lt;hr>
&lt;h2 id="open-source-philosophy">Open Source Philosophy&lt;/h2>
&lt;p>Rupantaran is released under the MIT License, embodying the spirit of open collaboration. This means you can:
&lt;div class="custom-list ">
&lt;ul style="list-style: none; padding-left: 1.2em;">
&lt;li>
&lt;span class="list-marker">✓&lt;/span>
Use it freely in your projects
&lt;/li>
&lt;li>
&lt;span class="list-marker">✓&lt;/span>
Modify the code to suit your needs
&lt;/li>
&lt;li>
&lt;span class="list-marker">✓&lt;/span>
Build upon it to create new tools
&lt;/li>
&lt;li>
&lt;span class="list-marker">✓&lt;/span>
Contribute improvements back to the community
&lt;/li>
&lt;/ul>
&lt;/div> &lt;/p>
&lt;hr>
&lt;h2 id="a-quick-taste-sample-code">A Quick Taste: Sample Code&lt;/h2>
&lt;div style="position: relative;">
&lt;pre>&lt;code>
pip install rupantaran
&lt;/code>&lt;/pre>
&lt;button class="copy-button" onclick="copyToClipboard(this)"
style="position: absolute; top: 10px; right: 10px; cursor: pointer;">
Copy
&lt;/button>
&lt;/div>
&lt;script>
function copyToClipboard(button) {
const codeBlock = button.previousElementSibling.textContent;
navigator.clipboard.writeText(codeBlock).then(() => {
button.textContent = 'Copied!';
setTimeout(() => { button.textContent = 'Copy'; }, 2000);
});
}
&lt;/script>
&lt;div style="position: relative;">
&lt;pre>&lt;code>
from rupantaran.land import mixed_units
result = mixed_units.hilly_mixed_to_terai_mixed(expression = "2 ropani 3 aana 2 paisa", precision = 2)
&lt;/code>&lt;/pre>
&lt;button class="copy-button" onclick="copyToClipboard(this)"
style="position: absolute; top: 10px; right: 10px; cursor: pointer;">
Copy
&lt;/button>
&lt;/div>
&lt;script>
function copyToClipboard(button) {
const codeBlock = button.previousElementSibling.textContent;
navigator.clipboard.writeText(codeBlock).then(() => {
button.textContent = 'Copied!';
setTimeout(() => { button.textContent = 'Copy'; }, 2000);
});
}
&lt;/script>
&lt;p>That&amp;rsquo;s it! One line, and you&amp;rsquo;ve gone from bigha to ropani. Check the docs &lt;a href="https://rupantaran.readthedocs.io/en/latest/" target="_blank" rel="noopener noreferrer">here&lt;/a> for more.&lt;/p>
&lt;a class="btn btn-primary "
href="https://github.com/biraj094/rupantaran"
target="_blank">Visit Rupantaran on GitHub
&lt;/a>
&lt;hr>
&lt;div class="alert alert-blue d-flex align-items-center" role="alert">
&lt;i class="fas fa-info-circle me-2">&lt;/i>
&lt;div>
The project is actively maintained and welcomes contributions from the community.
&lt;/div>
&lt;/div>
&lt;style>
.alert {
padding: 1rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.alert-blue {
color: #004085;
background-color: #cce5ff;
border-color: #b8daff;
}
.alert-green {
color: #155724;
background-color: #d4edda;
border-color: #c3e6cb;
}
.alert-yellow {
color: #856404;
background-color: #fff3cd;
border-color: #ffeeba;
}
.alert-red {
color: #721c24;
background-color: #f8d7da;
border-color: #f5c6cb;
}
.d-flex {
display: flex !important;
}
.align-items-center {
align-items: center !important;
}
.me-2 {
margin-right: 0.5rem !important;
}
&lt;/style></description></item></channel></rss>