Skip to main content

A Python implementation of the WestFax API (http://westfax.com/)

Usage requires a WestFax account.

Usage

wf = new westfax.WestFax( username, password, product )
wf.add_number('555-555-5555')
wf.set_header('This is a fax')
wf.set_job_name('My fax job')
wf.set_content("Yah! I'm a fax message!")

try:
        wf.send()
except westfax.FaxFail:
        print "Failed to send"

Methods

add_number( number )

Adds a number to the send the fax to. Mulitple numbers can be added. send() will raise westfax.NoRecipients if no valid numbers are found.

set_billing_code( billing_code )

Sets an optional billing code to track billing for the message in the WestFax dashboard

set_job_name( name )

Sets an optional job name to identify the message in the WestFax dashboard

set_header( header )

Sets the top header on the fax. (Sent with the fax. Often a company name or subject message)

set_content( content )

Text or HTML content of the message. send() will raise westfax.MissingFaxContent if no content was added to the message.

send()

Send the message to all recipients. If WestFax returns anything other than a 200 status then send() will raise westfax.FaxFail

Exceptions

All exceptions are raised on send()

NoRecipients

Raised when no numbers were added.

MissingFaxContent

Raised when no content was added to the fax message

FaxFail

Raised when the WestFax API returns anything other than a 200 status. The error message is returned as the exception message.

TODO

  • verify phone number validity on add_number()

  • Parse the error message from WestFax to raise more useful exceptions

AUTHOR

ConstituentVoice opensource@constituentvoice.com

Metadata

Release files for WestFax 0.1.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 WestFax 0.1.2
File Size Uploaded Provenance
WestFax-0.1.2.tar.gz 3.5 kB Without provenance Details

Release files / WestFax-0.1.2.tar.gz

Download URL WestFax-0.1.2.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
36e38e9dae3f4b05a90d1287376eb0b804a5dcd1686279a4f851d55b6ca23401
BLAKE2b-256 checksum
How to use checksums
9d76f90f87197806cdecd77567a8c70d922d2829f24a64502dade4e2a0c11e67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for WestFax 0.1.2

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.1.2 This release

1 release file No provenance

0.1.1

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