This release is a pre-release and may not be stable for production use.
|Build Status| | |Test Coverage| | |Code Climate|
============
Python Five9
============
This library allows you to interact with the Five9 Settings and Statistics Web
Services using Python.
* `Read The API Documentation <https://laslabs.github.io/python-five9>`_
Installation
============
Installation is easiest using Pip and PyPi::
pip install five9
If you would like to contribute, or prefer Git::
git clone https://github.com/LasLabs/python-five9.git
cd python-five9
pip install -r requirements.txt
pip install .
Usage
=====
Connect
-------
.. code-block:: python
from five9 import Five9
client = Five9('user', 'password')
Configuration Web Services
--------------------------
Documentation:
* `Five9 <http://webapps.five9.com/assets/files/for_customers/documentation/apis/config-webservices-api-reference-guide.pdf>`_
* `API Docs <https://laslabs.github.io/python-five9/AdminWebService.html>`_
Example - Get All Skills:
.. code-block:: python
client.configuration.getSkills()
# Returns
[{
'description': None,
'id': 266184L,
'messageOfTheDay': None,
'name': 'TestSkill',
'routeVoiceMails': False
}]
Example - Create a contact field to track modified time:
.. code-block:: python
client.configuration.createContactField({
'name': 'modified_at',
'displayAs': 'Invisible',
'mapTo': 'LastModifiedDateTime',
'type': 'DATE_TIME',
'system': True,
})
Example - Search for a contact by first and last name and get a list of ``dict``s
representing the result:
.. code-block:: python
criteria = client.create_criteria({
'first_name': 'Test',
'last_name': 'User',
})
result = client.configuration.getContactRecords(criteria)
# The above result is basically unusable. Parse into a list of dicts::
client.parse_response(result['fields'], result['records'])
Example - Update a contact using their first and last name as the search keys:
.. code-block:: python
contact = {
'first_name': 'Test',
'last_name': 'User',
'city': 'Las Vegas',
'state': 'NV',
'number1': '1234567890',
}
mapping = client.create_mapping(contact, keys=['first_name', 'last_name'])
client.configuration.updateCrmRecord(
record={'fields': mapping['fields']},
crmUpdateSettings={
'fieldsMapping': mapping['field_mappings'],
'skipHeaderLine': True,
'crmAddMode': 'DONT_ADD',
'crmUpdateMode': 'UPDATE_SOLE_MATCHES',
}
)
Statistics Web Services
-----------------------
Documentation:
* `Five9 <http://webapps.five9.com/assets/files/for_customers/documentation/apis/statistics-webservices-api-reference-guide.pdf>`_
* `API Docs <https://laslabs.github.io/python-five9/SupervisorWebService.html>`_
A supervisor session is required in order to perform most actions provided in the
Supervisor Web Service. Due to this, a session is implicitly created before the
supervisor is used.
The session is created with the following defaults. You can change the parameters
by changing the proper instance variable on the `Five9` object:
+----------------------+------------------------+---------------+
| Five9 Parameter | Instance Variable | Default |
+======================+========================+===============+
| `forceLogoutSession` | `force_logout_session` | `True` |
+----------------------+------------------------+---------------+
| `rollingPeriod` | `rolling_period` | `Minutes30` |
+----------------------+------------------------+---------------+
| `statisticsRange` | `statistics_range` | `CurrentWeek` |
+----------------------+------------------------+---------------+
| `shiftStart` | `shift_start_hour` | `8` |
+----------------------+------------------------+---------------+
| `timeZone` | `time_zone_offset` | `-7` |
+----------------------+------------------------+---------------+
Example Use:
.. code-block:: python
# Setup a session - required for most things
client.supervisor.getUserLimits()
# Returns
{
'mobileLimit': 0L,
'mobileLoggedin': 0L,
'supervisorLimit': 1L,
'supervisorsLoggedin': 1L
}
Known Issues / Roadmap
======================
* The supervisor session options should be represented in a class and documented,
instead of the mostly undocumented free-form dictionary mapped to instance
variables.
Credits
=======
Images
------
* LasLabs: `Icon <https://repo.laslabs.com/projects/TEM/repos/odoo-module_template/browse/module_name/static/description/icon.svg?raw>`_.
Contributors
------------
* Dave Lasley <dave@laslabs.com>
Maintainer
----------
.. image:: https://laslabs.com/logo.png
:alt: LasLabs Inc.
:target: https://laslabs.com
This module is maintained by LasLabs Inc.
.. |Build Status| image:: https://img.shields.io/travis/LasLabs/python-five9/master.svg
:target: https://travis-ci.org/LasLabs/python-five9
.. |Test Coverage| image:: https://img.shields.io/codecov/c/github/LasLabs/python-five9/master.svg
:target: https://codecov.io/gh/LasLabs/python-five9
.. |Code Climate| image:: https://img.shields.io/codeclimate/github/LasLabs/python-five9.svg
:target: https://codeclimate.com/github/LasLabs/python-five9
.. |License MIT| image:: https://img.shields.io/github/license/laslabs/python-five9.svg
:target: https://opensource.org/licenses/MIT
:alt: License: MIT
.. |PyPi Package| image:: https://img.shields.io/pypi/v/five9.svg
:target: https://pypi.python.org/pypi/five9
:alt: PyPi Package
.. |PyPi Versions| image:: https://img.shields.io/pypi/pyversions/five9.svg
:target: https://pypi.python.org/pypi/five9
:alt: PyPi Versions
Metadata
Release files for five9 0.0.3b192
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| five9-0.0.3b192.tar.gz | 15.5 kB | Without provenance | Details for five9-0.0.3b192.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| five9-0.0.3b192-py3-none-any.whl | Python 3 | none | any | Details for five9-0.0.3b192-py3-none-any.whl |
| five9-0.0.3b192-py2-none-any.whl | Python 2 | none | any | Details for five9-0.0.3b192-py2-none-any.whl |
Total release size: 68.2 kB
Release files / five9-0.0.3b192.tar.gz
| Download URL | five9-0.0.3b192.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c254feba71cbeb83398b3a4395745f36ae854a5afcaca17589394f2970e4efc
|
|
BLAKE2b-256 checksum How to use checksums |
01213c370df48943eb83ee5b221ec48a3e2f045ae03fa848c5d29577b8ebdddb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / five9-0.0.3b192-py3-none-any.whl
| Download URL | five9-0.0.3b192-py3-none-any.whl |
|---|---|
| Size | 26.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
245c4dd275ca95883544a5e5e030d3f7f451a7d0a2dc4a3b9ed7e9b366f45b16
|
|
BLAKE2b-256 checksum How to use checksums |
3222855f423474bccc2ad1fa605dd2bdc554798d4334240b299d05669ffbf112
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / five9-0.0.3b192-py2-none-any.whl
| Download URL | five9-0.0.3b192-py2-none-any.whl |
|---|---|
| Size | 26.4 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
83d40b11329e0c27c57a4ab7be205e24db146b142f255bf76c26c29dbbd32ac3
|
|
BLAKE2b-256 checksum How to use checksums |
d232be63cdcd1023f24a86516618c5a446d1d631069055c45ecf4509114ef6e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for five9 0.0.3b192
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.