Phaxio
A Python module for interacting with the Phaxio API.
Installation
Via pip:
$ pip install pyphaxio
Usage
Send a fax to multiple people using HTML message:
from phaxio import PhaxioApi
api = PhaxioApi(key, secret)
r = api.send(to=['4141234567', '5141234567', '6151234567'],
string_data='Hello World!',
string_data_type='text')
print(r.get('faxId'))
Generally, each supported method takes keyword arguments with the exact same names of the API method parameters as they’re described in the documentation. One exception to this rule is that filename is instead referred to as files. For example, to send a fax using files:
llama = os.path.join(os.path.dirname(__file__), 'tests/llama.pdf')
alpaca = os.path.join(os.path.dirname(__file__), 'tests/alpaca.pdf')
f = open(alpaca, 'rb')
r = api.send(to='4141234567', files=(llama, f))
See the tests for additional examples.
Error Handling
By default, the api calls return a dictionary. However, you can use PhaxioApi(key, secret, raise_errors=True) which will raise the following errors: * AuthenticationError - key/secret are invalid * APIError - error with api call * ServerError - server had an error and could not complete your request
Errors can be imported from the phaxio.exceptions module.
Currently Supported API Calls
Implemented and tested:
send
testReceive
faxStatus
faxFile
Implemented and untested:
attachPhaxCodeToPdf
createPhaxCode
getHostedDocument
provisionNumber
releaseNumber
numberList
faxList
faxCancel
accountStatus
Testing
python setup.py test
You will be prompted for a test api key and secret
Contributing
Fork it
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am 'Added some feature')
Push to the branch (git push origin my-new-feature)
Create new Pull Request
Metadata
Release files for pyphaxio 0.11
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 |
|---|---|---|---|---|
| pyphaxio-0.11.tar.gz | 4.7 kB | Without provenance | Details for pyphaxio-0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyphaxio-0.11-py2-none-any.whl | Python 2 | none | any | Details for pyphaxio-0.11-py2-none-any.whl |
Total release size: 12.5 kB
Release files / pyphaxio-0.11.tar.gz
| Download URL | pyphaxio-0.11.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bdbf63c5542c5c7f52bb2520fd090a0598b44791cf9547afbecac6cf78a966ae
|
|
BLAKE2b-256 checksum How to use checksums |
c226fc4c381cff019c5e269a1d61c0bee55d2a7484e4c62270763de67721cc96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyphaxio-0.11-py2-none-any.whl
| Download URL | pyphaxio-0.11-py2-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
f952e4c1fac5ee502d18ac686c55dcf2837f4819d160fdfafff104dcf56dbfe9
|
|
BLAKE2b-256 checksum How to use checksums |
67d80f04f25e47c69659c078709615c12fa31321da0b2fcc225f6802efda8e7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyphaxio 0.11
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.