Skip to main content

A Python package for Voiceflow API.

Project description

Voiceflow Python Package

This is an unofficial Python package for an easy use of the Voiceflow API.

Basic usage

In your virtual environment:

pip install voiceflow

Then in your Python code:

import os
from voiceflow import Voiceflow

vf = Voiceflow(
    api_key=os.getenv('VOICEFLOW_API_KEY'),
    user_id='abc123'
)

# Launch the agent
vf_response = vf.interact.launch()

# Send a simple text input
vf_response = vf.interact.text(user_input='hello')

Pass the version of your Voiceflow project to contact. It can be development (default) or production.

vf = Voiceflow(
    api_key=os.getenv('VOICEFLOW_API_KEY'),
    user_id='abc123',
    version_id='production'
)

You can also call launch() or text() with your custom config:

vf_response = vf.interact.launch(config={'stripSSML': False})

Default config values:

{
    'tts': False,
    'stripSSML': True,
    'stopAll': True,
    'stopTypes': [],
    'excludeTypes': [
        'block',
        'debug',
        'flow',
    ]
}

User State:

# Fetch the user's current state
vf_response = vf.user_state.fetch()

# Delete all state and session data for user.
vf_response = vf.user_state.delete()

# NotImplemented:
# Update the user's current state.

Variables:

variables = {
    'test1': 'one',
    'test2': 2,
}
vf_response = vf.variables.update(variables=variables)


About this project

This project is created and maintained by:
Daian Gan
Github: daiangan
E-mail: daian@ganmedia.com
Website: https://daiangan.com

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

voiceflow-1.0.6.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

voiceflow-1.0.6-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file voiceflow-1.0.6.tar.gz.

File metadata

  • Download URL: voiceflow-1.0.6.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.8

File hashes

Hashes for voiceflow-1.0.6.tar.gz
Algorithm Hash digest
SHA256 7f0bfcd8239558d84f6461f72661aed1793082490b383acf646086dc301c3038
MD5 6d74cb5aae1d99113e6fd5c1d07cecda
BLAKE2b-256 89128f71615c9a9bab5f60c393971654c9b8649aacdf5dfa0954b147b41169ff

See more details on using hashes here.

File details

Details for the file voiceflow-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: voiceflow-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.8

File hashes

Hashes for voiceflow-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 45e7dd0eff3c0d6e9e643f177f03ff11963199c442b384ebb5cd61f0feb25db0
MD5 ba07c9201d176be9d9043fa0d9511073
BLAKE2b-256 a7a1ac4077eb986a4a56b2ff7d0027c06e95bb81d589b134183404dac9ed127a

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