Skip to main content

HSL Builder for creating hsl elements

Project description

HSL Builder Repo

Python pip package for creating HSL Elements.

Installation:

You can install hsl builder using pip.

pip install --pre hsl_builder

OR

You can also add hsl_builder==0a1 it to your project requirements.txt

Usage:

#import hsl builder
from hsl_builder import Button
from hsl_builder.Elements import Actionable, ActionableType, URI

# Create a button
button = Button("Title")

# Create link actionable
actionable = Actionable("actionable text", ActionableType.APP_ACTION, URI.LINK)
actionable.payload = {
    'url': 'https://www.haptik.ai'
}
# Add actionable to button
button.actionables.append(actionable)

# generate hsl for our button object
hsl = button.to_hsl()

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

hsl_builder-0.0.1a0.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

hsl_builder-0.0.1a0-py3-none-any.whl (9.5 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