Base modules to use in a Streamlit basic project
Project description
streamapp
Base modules to use in a Streamlit project.
- Snowflake connection with templates
- Cards generator for landing page
- Environment selector if needed
- Auth module to login users and grant roles
- Report generator for .xlsx files and templates
- Request handler to integrate with .secrets
- Subpages selector
Requirements
streamlit>=1.30.0
streamlit-authenticator==0.2.2
snowflake-connector-python>=3.0.4
openpyxl==3.1.2
pydantic>=2.5.3
Secrets file
# environment variables
key = key for hased passwords with Fernet
queries_path = 'static/queries' # your folder queries path
utils_files = 'static/consume' # your static files path
admin_contact = 'admin@admin.com' # show contact if something went wrong
# snowflake credentials
# see snowflake documentation
[SNOW_SERVER]
account = '************'
database = '*********'
warehouse = '******'
role = '*********'
user = '**********'
password = '***********'
# see streamlit authenticator documentation
[credentials.usernames]
Pepe.name = '**********'
Pepe.roles = ['admin', 'dev', 'other]
Pepe.password = 'password hash'
[ENVIRONMENTS]
name.image = '' # Some image to show for the environment
name.url = 'https://pokeapi.co' # host url for request with different environments
[REQUESTS]
get_pockemon.url = '/api/v2/berry/'
get_pockemon.method = 'get'
Generate Passwords
To generate passwords use Hasher
from streamlit_authenticator
Hasher([password]).generate()[0]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
streamapp-0.0.10.tar.gz
(16.5 kB
view hashes)
Built Distribution
streamapp-0.0.10-py3-none-any.whl
(19.6 kB
view hashes)
Close
Hashes for streamapp-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2191f6690f454bf0cd2cbecbdeebf58aa9d59982d57fcbdb57432638bdbb802 |
|
MD5 | 106b63e1b4cf5fa553a6adf90f832771 |
|
BLAKE2b-256 | b94ae02cc21b313c2609e6f33a17d59f71bcd4695d22c40f455540ef8d3837eb |