Skip to main content

A Streamlit Aggrid custom component with Custom Button Modal and API integration

Project description

Aggrid Custom Grid Streamlit API Enablement

A Streamlit custom component that provides a chat window with voice capabilities for conversation handling.

Features

  • Voice-activated chat interface
  • Face recognition capabilities
  • Customizable conversation handling
  • React-based frontend with TypeScript
  • Integration with custom APIs for voice processing

Installation

pip install streamlit-ai-voice-chat

Usage

from custom_grid import st_custom_grid, GridOptionsBuilder, JsCode

gb = GridOptionsBuilder.create()
gb.configure_grid_options(pagination=True, 
                            paginationPageSize=100, 
                        #   suppressPaginationPanel=True, 
                            enableRangeSelection=True, 
                            copyHeadersToClipboard=True,
                            sideBar=True,
                            sortable=True
                        ) 
gb.configure_default_column(column_width=100, 
                            resizable=True, 
                            wrapText=False, 
                            wrapHeaderText=True, 
                            sortable=True, 
                            autoHeaderHeight=True, 
                            autoHeight=True, 
                            suppress_menu=False, 
                            filter=True, 
                            minWidth=89,
                            cellStyle={"fontSize": "15px"})            
gb.configure_index('symbol')
gb.configure_theme('ag-theme-material')
go = gb.build()
            st_custom_grid(
                key=f'key',
                client_user=client_user, # optional used for api 
                username=client_user, # optional used for api  
                api=f"{ip_address}/api/data/story",
                # api_ws=f"{ip_address}/api/data/ws_story", # use Websocket to handle data change
                api_update=f"{ip_address}/api/data/update_queenking_chessboard", # used for api secondary api plug option
                refresh_sec=refresh_sec, # how long grid awaits before calling to refresh data (use NONE for buttons)
                refresh_cutoff_sec=seconds_to_market_close, # timer for when to stop auto refreshing from refresh_sec
                prod=st.session_state['prod'], # optional used for api  
                grid_options=go,
                return_type='story', # optional used for api  
                # kwargs from here
                api_lastmod_key=f"REVREC", # optional used for api  
                prompt_message = "symbol", # optional used for api  
                prompt_field = "symbol", # optional used for api  
                api_key=os.environ.get("fastAPI_key"), # optional used for api  
                symbols=symbols, # optional used for api  
                buttons=g_buttons, # optional used for api  
                grid_height='550px',
                toggle_views = toggle_views, # optional
                allow_unsafe_jscode=True,
                columnOrder=story_col_order, # optional arrange columns
                refresh_success=True,
                total_col="symbol", # where total is located
                subtotal_cols = [], 
                filter_apply=True, # filters on grid
                filter_button='piece_name', # filters on grid speific columns for fast filters buttons
                show_clear_all_filters=True,
                column_sets ={},
#                 column_sets = {
#     "Simple View": ["col1", "col2"],
#     "Options Trader": ["col3", "col4"],
#   }, # used to arrange columns

        )

## Development

This project consists of:
- Python backend using Streamlit
- React/TypeScript frontend

### Requirements

- Python >= 3.7
- Streamlit >= 1.0.0
- Node.js (for frontend development)

## License

MIT License

## Author

Stefan Stapinski

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Submit a pull request



Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit-custom_api_grid-0.1.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_custom_api_grid-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file streamlit-custom_api_grid-0.1.0.tar.gz.

File metadata

File hashes

Hashes for streamlit-custom_api_grid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6be040fb9147c9bda274f1519b899ac6ee2a5d4dbbbfbcacf74a2a4b112b7076
MD5 daa30f502c98691680c9bad073b0d7db
BLAKE2b-256 c74b3ef61ab65c3473a85ea6a2cbfc3525dec1d96d34fb7d8902d15b07fe6c69

See more details on using hashes here.

File details

Details for the file streamlit_custom_api_grid-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_custom_api_grid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54d8875e1804a86d1a4367b57ce4e915d4f1c2502a6fab0ffd205bbe9aa19023
MD5 6d165d65ce440fc272ca9f670dfadff2
BLAKE2b-256 efff0982d337f30b7bfe60ccb937a57e5e34e534174783ebfde1c12777f4cd11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page