StreamlitCurrency: Customize Your Currency Input Field with Streamlit

Streamlit Customised Currency Input Field

Welcome to the Streamlit Customised Currency Input Field project. This project provides a customised input field for Streamlit applications that is designed to handle large currency values.

Screenshot of the input field

Features

Currently, the component has the following features:

  • Conversion of shorthand notations:
  • ‘k’ is converted to thousand (1,000)
  • ‘m’ is converted to million (1,000,000)
  • ‘b’ is converted to billion (1,000,000,000)
  • Input field formatting: The input field is formatted as a currency field, including the $ sign.

Installation

To use this package, download the .whl file from the dist directory in the repository. Install it by running:

pip install /path_to_your_file/your_file.whl

Usage

Here’s a simple Streamlit script that uses the custom currency input field:


import streamlit as st
import karina_input_ccy as kinput

st.title("Test project")
amount = kinput.karina_input_ccy(name="test_field", label="Currency Input Field (AUD)")
st.write(amount)

Extending This Component

Development

To set the application to development mode, change _RELEASE to False in the __init__.py file found in the /karina_input_ccy directory.

To start the web server for the React component, open a command prompt, navigate to your local directory /karina_input_ccy/frontend, and enter the command npm start.


To start the web server that hosts the Streamlit code for testing changes, open a different command prompt, navigate to your local directory /karina_input_ccy, and enter the command streamlit run __init__.py.

Modify the KarinaInputCcy.tsx file to add more features. Then, you can test your newly implemented functionalities.

Build

To build the project, first navigate to the /karina_input_ccy/frontend directory in a command prompt and enter npm run build.

Afterwards, set _RELEASE to True in the __init__.py file under /karina_input_ccy.

Next, navigate to the parent directory where the setup.py file is located and run the command python setup.py sdist bdist_wheel. This will update the .whl and .gz files in the dist folder.

Finally, commit your changes and create a pull request.

GitHub

View Github

Related Posts

Recent Posts

ഇടുക്കിയിലെ മലയോര മേഖലകളിൽ രാത്രിയാത്ര നിരോധിച്ചു. രാത്രി ഏഴു മുതൽ രാവിലെ ആറു വരെയാണ് നിരോധനം

ഏന്തയാർ ഈസ്റ്റിൽ പ്രളയത്തിൽ തകർന്ന പാലത്തിന് പകരം പുതിയ പാലം നിർമ്മിക്കുവാൻ താത്ക്കാലിക പാലം പൊളിച്ച് നീക്കി

Explore the Investment Opportunities: A Comprehensive Guide to Different Types of Mutual Funds

Title: Understanding Mutual Funds: A Beginner's Guide to Investing

തീവ്രമഴ മുന്നറിയിപ്പിന്റെ പശ്ചാതലത്തിൽ സംസ്ഥാനം ജാഗ്രതയിൽ

250,000 അപേക്ഷകൾ വർദ്ധിച്ചതിനാൽ ട്രാൻസ്‌പോർട്ട് കമ്മീഷണർ പരിശോധന പുനരാരംഭിക്കും

ഏലക്കയിൽ കീടനാശിനി സാന്നിധ്യം; ആറര ലക്ഷത്തിലധികം ടിൻ അരവണ നശിപ്പിക്കാൻ ടെൻഡർ ക്ഷണിച്ച് ദേവസ്വം ബോർഡ്‌

ഭീമൻ പാറക്കഷണങ്ങൾ അടർന്ന് ദേശീയ പാതയിലേക്ക് വീഴുന്നത് പതിവാകുന്നു. കുട്ടിക്കാനത്തിനും മുണ്ടക്കയത്തിനുമിടയിൽ നിലനിൽക്കുന്നത് വൻ അപകട ഭീഷണി

ചക്രവാതച്ചുഴി:അതിശക്തമായ മഴ വരുന്നു

പ്ലസ് വൺ പ്രവേശനം. അക്ഷയയിൽ തിക്കി തിരക്കേണ്ട, നെറ്റിവിറ്റി/ജാതി തെളിയിക്കാൻ പത്താംതരം സർട്ടിഫിക്കറ്റ് മതി