Python Fax Library - Send Faxes with a Few Lines of Code
Need a Python fax library? The InterFAX Python library lets you send faxes using only a few lines of code, with no installations. InterFAX accepts documents in formats including Microsoft Word, PDF, ASCII, HTML and URL, and sends them to a fax number you specify. We offer basic sending/receiving of faxes, and advanced features such as multiple destinations, deferred transmission, and document resolution.
Sign up now for our free developer program and receive immediate access to the Interfax Python fax library and fax APIs for other popular languages. No hardware installations, no software setup, no phone lines to order.
Python Fax Library Code Samples
|Python Fax - Send a Binary File Using SendFax||
This sample demonstrates how to submit a binary file to the fax Web service. This is done using SendFax with Python.
The SendFax method also indicates whether the submission succeeded. The return value of a successful submission is the transaction ID (positive number) of the fax in the system. Other return values indicate a failure (for more details, see Web Service Return Codes).
|Python Fax - Send Plain-Text Message Using SendCharFax||
This sample demonstrates how to send a basic, plain-text fax from Python, using the SendCharFax method. Text is limited to be standard ASCII (no 8-bit characters), but can include HTML markup.
|Python Fax - Get List of Inbound Faxes||
The GetList method allows you to display information for a number of submitted faxes.
|Python Fax - Retrieve Inbound Fax Image||
In this sample, you can learn how to retrieve an image for an inbound (received) fax with Python. This is done using the GetImageChunk method.
|Python Fax - Get Submitted Fax Information with FaxStatus||
Retrieving information about one or more submitted faxes with Python can be done using the FaxStatus method.
|Python Fax - Get Detailed Information About Submitted Faxes||
The FaxQuery method, which provides more advanced querying capabilities than FaxStatus (for more details, see Side-by-side Comparison of Web Service Methods), can be used to retrieve information about one or more submitted faxes with Python.
|Python Fax - Query Submitted Faxes with FaxQuery2||
This example shows you learn how to use the FaxQuery2 method to retrieve detailed information about submitted faxes with Python. The FaxQuery2 method provides more advanced querying options than FaxQuery (for more details, see Side-by-side Comparison of Web Service Methods).
|Python Fax - Cancel Pending Fax||
The CancelFax method demonstrated in this sample allows you to cancel a previously-submitted outbound fax with Python. The Python fax snippet below cancels a fax and checks if the cancellation was successful.
|Python Fax - Retrieve Outbound Fax Image||
This Python fax example demonstrates how to retrieve the image of an outbound (previously-submitted) fax with the GetFaxImage method:
|Python Fax - Hide Transaction from Online Control Panel||
This sample demonstrates how to use HideFax with Python. This method removes a fax transmission from the outbound fax queue in the online control panel, while a record is still retained for billing and tracking purposes.