Skip to main content

A streamlit component to make UI cards, adapted for Ogarantia applications from `streamlit-card` by gamcoh (cohengamliel8@gmail.com)

Project description

ogarantia-streamlit-card

Streamlit Component for a UI card - Adapted for Ogarantia applications.

Authors: Wilder Lopes (wilder@ogarantia.com) Based on the work by @gamcoh @Pernod Ricard

Installation

From pip

Install ogarantia-streamlit-card with pip

pip install ogarantia-streamlit-card

From source

  1. Build the react frontend

Go inside the frontend folder:

cd ogarantia_streamlit_card/frontend

Install npm packages (if you run into problems, just delete package-lock.json and run the install command again):

npm install

Build the frontend:

npm run build
  1. Build the python wheel

Go back to the project root and run (you might need to pip install build first):

python -m build .

This generates the folder dist that contains the python wheel. Finally,

pip install dist/*.whl

Usage

Import the card function from ogarantia-streamlit_card

from ogarantia_streamlit_card import card

hasClicked = card(
  title="Hello World!",
  text="Some description",
  image="https://get.ogre.run/images/ogarantia_logoBlue.png"
  url="https://github.com/Ogarantia/st-card"
)

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

ogarantia-streamlit-card-0.0.2.tar.gz (743.0 kB view hashes)

Uploaded Source

Built Distribution

ogarantia_streamlit_card-0.0.2-py3-none-any.whl (752.7 kB view hashes)

Uploaded Python 3

Supported by

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