Skip to main content
# analytics-python-sdk
Voice insights analytics sdk for Python for Alexa skill platform

## instructions to build and distribute

### setup: create a file called .pypirc in your user home folder (~). Put the following contents in it:
```
[distutils]
index-servers =
pypi
pypitest

[pypi]
repository=https://pypi.python.org/pypi
username=voicelabs

[pypitest]
repository=https://testpypi.python.org/pypi
username=voicelabs
```

### cleanup the build artifacts (optional). Cleanup not needed if it wasnt done before on the machine.
```
rm -r dist/*

rm -r build/*

rm -r VoiceInsights.egg-info/*
```

### build
```
python setup.py sdist

python setup.py bdist_wheel
```
### distribute

```
#for publishing to sandbox PIP repo
twine register dist/VoiceInsights-0.0.1-py2.py3-none-any.whl -r pypitest
twine upload dist/* -r pypitest

#for publishing to sandbox PIP repo
twine register dist/VoiceInsights-0.0.1-py2.py3-none-any.whl -r pypi
twine upload dist/* -r pypi
```

when prompted for a password use: V0icelab5

Login to the urls provided above in .pypirc file to check the package has been correctly exported.

--------------------

## To test the uploaded package

you can install the package locally in the current folder by using the following command:
```
#from test PIP repo
pip install -t ./ -i https://testpypi.python.org/pypi VoiceInsights

#from main public PIP repo
pip install -t ./ -i https://pypi.python.org/pypi VoiceInsights
```

--------------------

## SDK usage:

```python
from VoiceInsights import VoiceInsights

appToken = '450f1ca5-da5b-3877-b6ad-389ba3f49f5d'
vi = VoiceInsights()

def on_session_started(session_started_request, session):
""" Called when the session starts """
vi.initialize(appToken, session)

def on_intent(intent_request, session):
intent = intent_request['intent']
intent_name = intent_request['intent']['name']

response = None
#Logic to populate response goes here

#invoke SDK track method like follows
vi.track(intent_name, intent_request, response)

return response

```

Release files for VoiceInsights 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for VoiceInsights 0.0.2
File Size Uploaded
VoiceInsights-0.0.2.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for VoiceInsights 0.0.2
File Interpreter ABI Platform
VoiceInsights-0.0.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 9.0 kB

Release files / VoiceInsights-0.0.2.tar.gz

Download URL VoiceInsights-0.0.2.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5ed078dd93437f570812e9cbacf871704117f817488834a5b26fdfc37d5929ce
BLAKE2b-256 checksum
How to use checksums
82a09d9b965e0ddec3a7766f0c343d96ad8bfb2551cababdedbd2be41437d85e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / VoiceInsights-0.0.2-py2.py3-none-any.whl

Download URL VoiceInsights-0.0.2-py2.py3-none-any.whl
Size 5.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
624fcf83056d610a9564fb2df7eeb1eca5f6509186b1ddc69c85816f654aa907
BLAKE2b-256 checksum
How to use checksums
107e64d5b7ef9ff4b4d983b14721afca263ad648eacf06487090074cabc5cf02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page