Skip to main content

python-callfire

https://travis-ci.org/iMedicare/python-callfire.svg?branch=master

Thin wrapper in Python which implements CallFire v2 interface definitions based on Swagger specification.

Usage

Python method names follow CallFire’s API. Wrapper does not introduce any additional complexity or conventions above those defined in original API, which makes usage pretty straightforward:

>>> from callfire import CallFireAPI
>>> api = CallFireAPI('<api-app-username>', '<api-app-password>')

>>> api.get_account().json()
{
    u'email': u'your-email@your-domain.com',
    u'firstName': u'John',
    u'id': 700321776,
    u'lastName': u'Smith',
    u'name': u'Metacortex',
    u'permissions': [u'ACCOUNT_HOLDER']
}

>>> text = dict(phoneNumber='13408887345', message='Hi!')
>>> api.send_texts(body=[text]).json()
{
    u'items': [{
        u'batchId': 11428003374,
        u'campaignId': 60000313259,
        u'contact': {
            u'id': 152100378045,
            u'properties': {
                u'UNDEFINED': u'13471521003'
            }
        },
        u'created': 1470222349000,
        u'finalTextResult': u'SENT',
        u'fromNumber': u'67076',
        u'id': 1038052003407,
        u'inbound': False,
        u'message': u'Hi!',
        u'modified': 1470222348000,
        u'records': [{
            u'billedAmount': 1.0,
            u'finishTime': 1470222349000,
            u'id': 579287900394,
            u'message': u'Hi!',
            u'textResult': u'SENT'
        }],
        u'state': u'FINISHED',
        u'toNumber': u'13408887345'
    }]
}

>>> broadcast = dict(
    fromNumber='13471521003',
    labels=['via-api'],
    name='Test voice broadcast'),
    answeringMachineConfig='AM_AND_LIVE',
    recipients=[dict(phoneNumber='(347) 1521003')],
    sounds=dict(
        liveSoundText='Voice message',
        machineSoundText='Voice message'
    )
)
>>> api.create_call_broadcast(query=dict(start=True), body=broadcast).json()
{u'id': 13750937003}

>>> api.get_call_broadcast(13750937003).json()
{
    u'id': 13750937003,
    ...
    u'status': u'FINISHED'
}

Error Handling

Whenever low level exception occurs it is wrapped and re-raised as CallFireError, while original traceback preserved and displayed and original exception is also available for inspection under wrapped_exc attribute.

Documentation

Generated python methods do contain docstrings with described query and body params. Official API documentation is available at developers.callfire.com.

Metadata

Release files for python-callfire 0.10.0

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

Source distribution (sdist)

Source distribution for python-callfire 0.10.0
File Size Uploaded Provenance Actions
python-callfire-0.10.0.tar.gz 16.0 kB Without provenance Details for python-callfire-0.10.0.tar.gz

Release files / python-callfire-0.10.0.tar.gz

Download URL python-callfire-0.10.0.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5fb678b7b2458029a64ba1f088c420075a8c42206f28b2e7869bbc0448b60466
BLAKE2b-256 checksum
How to use checksums
c64fba8bcfaddca3dcabc35f1e7261ee9c2f89ebae6e54bbcdcb3142869630e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for python-callfire 0.10.0

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.

Release history Release notifications | RSS feed

This release

0.10.0 This release

1 release file No provenance

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