{"id":23613716,"url":"https://github.com/interfax/interfax-python","last_synced_at":"2025-09-02T08:34:59.340Z","repository":{"id":53793960,"uuid":"66478350","full_name":"interfax/interfax-python","owner":"interfax","description":"Fax send and receive in Python with the InterFAX REST API","archived":false,"fork":false,"pushed_at":"2024-05-16T16:58:56.000Z","size":82,"stargazers_count":13,"open_issues_count":6,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-25T21:44:43.880Z","etag":null,"topics":["fax","fax-api","hipaa","inbound","interfax","interfax-api","library","online-fax","outbound","python","receive","sdk","send"],"latest_commit_sha":null,"homepage":"https://www.interfax.net/en/dev/python","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interfax.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-08-24T15:57:52.000Z","updated_at":"2025-07-05T14:49:33.000Z","dependencies_parsed_at":"2025-05-13T08:45:33.969Z","dependency_job_id":null,"html_url":"https://github.com/interfax/interfax-python","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/interfax/interfax-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interfax%2Finterfax-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interfax%2Finterfax-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interfax%2Finterfax-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interfax%2Finterfax-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interfax","download_url":"https://codeload.github.com/interfax/interfax-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interfax%2Finterfax-python/sbom","scorecard":{"id":491319,"data":{"date":"2025-08-11","repo":{"name":"github.com/interfax/interfax-python","commit":"2dbbd295063fac15bf21fc44e4dacda620483389"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 2/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating python:3.6-alpine to python:3.6-alpine@sha256:579978dec4602646fe1262f02b96371779bfb0294e92c91392707fa999c0c989","Warn: pipCommand not pinned by hash: Dockerfile:8-9","Warn: pipCommand not pinned by hash: Dockerfile:8-9","Warn: pipCommand not pinned by hash: Dockerfile:12","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.0.1 not signed: https://api.github.com/repos/interfax/interfax-python/releases/21632963","Warn: release artifact v1.0.1 does not have provenance: https://api.github.com/repos/interfax/interfax-python/releases/21632963"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T19:14:18.750Z","repository_id":53793960,"created_at":"2025-08-19T19:14:18.750Z","updated_at":"2025-08-19T19:14:18.750Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273256918,"owners_count":25073527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fax","fax-api","hipaa","inbound","interfax","interfax-api","library","online-fax","outbound","python","receive","sdk","send"],"created_at":"2024-12-27T17:19:17.381Z","updated_at":"2025-09-02T08:34:59.243Z","avatar_url":"https://github.com/interfax.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"InterFAX Python Package\n=======================\n\n.. image:: https://badge.fury.io/py/interfax.svg\n    :target: https://badge.fury.io/py/interfax\n.. image:: https://travis-ci.org/interfax/interfax-python.svg?branch=master\n    :target: https://travis-ci.org/interfax/interfax-python\n\n`Installation`_ \\| `Getting Started`_ \\| `Contributing`_ \\| `Usage`_ \\| `License`_\n\nSend and receive faxes in Python with the\n`InterFAX \u003chttps://www.interfax.net/en/dev\u003e`__ REST API.\n\nInstallation\n------------\n\nThis package requires Python 2.7+. You can install it using:\n\n::\n\n    pip install interfax\n\nThis module requires libmagic, for help installing on OSX or windows check the\n`python-magic \u003chttps://github.com/ahupp/python-magic#dependencies\u003e`__ \ndocumentation.\n\nGetting started\n---------------\n\nTo send a fax from a PDF file:\n\n.. code:: python\n\n    from interfax import InterFAX\n\n    interfax = InterFAX(username=\"username\", password=\"password\")\n    fax = interfax.deliver(fax_number=\"+11111111112\", files=[\"folder/fax.pdf\"])\n    fax = fax.reload() # resync with API to get latest status\n    fax.status # Success if 0. Pending if \u003c 0. Error if \u003e 0\n\nUsage\n=====\n\n`Client`_ \\| `Account`_ \\| `Outbound`_ \\| `Inbound`_ \\| `Documents`_ \\| `Helper Classes`_\n\nClient\n------\n\nThe client follows the `12-factor \u003chttp://12factor.net/config\u003e`__ apps\nprinciple and can be either set directly or via environment variables.\n\n.. code:: python\n\n    # Initialize using parameters\n    interfax = InterFAX(username=\"...\", password=\"...\")\n\n    # Alternative: Initialize using environment variables\n    # * INTERFAX_USERNAME\n    # * INTERFAX_PASSWORD\n    interfax = InterFAX()\n\nAll connections are established over HTTPS.\n\nTimeouts\n~~~~~~~~\n\nThe client takes a timeout parameter, this is a floating point number of seconds\nfor the client to wait between receiving data before issuing a timeout error.\n\n.. code:: python\n    interfax = InterFAX(timeout=0.001)\n\n**More:**\n`documentation \u003chttp://docs.python-requests.org/en/master/user/quickstart/#timeouts\u003e`\n\nAccount\n-------\n\nBalance\n~~~~~~~\n\nDetermine the remaining faxing credits in your account.\n\n.. code:: python\n\n    \u003e\u003e\u003e  interfax.account.balance()\n    9.86\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/3001\u003e`__\n\nOutbound\n--------\n\n`Send fax`_ \\| `Get list \u003c#get-outbound-fax-list\u003e`__ \\| `Get completed list \u003c#get-completed-fax-list\u003e`__ \\| `Get record \u003c#get-outbound-fax-record\u003e`__ \\| `Get image \u003c#get-outbound-fax-image\u003e`__ \\| `Cancel fax \u003c#get-outbound-fax-image\u003e`__ \\| `Cancel fax \u003c#cancel-a-fax\u003e`__ \\| `Search \u003c#search-fax-list\u003e`__\n\nSend fax\n~~~~~~~~\n\n``interfax.outbound.deliver(fax_number, files, **kwargs)``\n\nSubmit a fax to a single destination number.\n\nThere are a few ways to send a fax. One way is to directly provide a\nfile path or url.\n\n.. code:: python\n\n    # with a path\n    interfax.outbound.deliver(fax_number=\"+11111111112\", files=[\"folder/fax.txt\"])\n    # with a URL\n    interfax.outbound.deliver(fax_number=\"+11111111112\", files=[\"https://s3.aws.com/example/fax.html\"])\n\nInterFAX supports over 20 file types including HTML, PDF, TXT, Word, and\nmany more. For a full list see the `Supported File\nTypes \u003chttps://www.interfax.net/en/help/supported_file_types\u003e`__\ndocumentation.\n\nThe returned object is a ``OutboundFax`` with just an ``id``. You can\nuse this object to load more information, get the image, or cancel the\nsending of the fax.\n\n.. code:: python\n\n    fax = interfax.outbound.deliver(fax_number=\"+11111111112\", files=[\"fax.pdf\"])\n    fax = fax.reload() # Reload fax, allowing you to inspect the status and more\n\n    fax.id        # the ID of the fax that can be used in some of the other API calls\n    fax.image()     # returns an image representing the fax sent to the fax_number\n    fax.cancel()    # cancel the sending of the fax\n\nAlternatively you can create an `File \u003c#file\u003e`__ with binary data and\npass this in as well.\n\n.. code:: python\n\n    with open(\"fax.pdf\", \"rb\") as fp:\n        f = interfax.files.create(fp.read(), mime_type=\"application/pdf\")\n    interfax.outbound.deliver(fax_number=\"+11111111112\", files=[f])\n\nTo send multiple files just pass in a list of strings and `File`_ objects.\n\n.. code:: python\n\n    interfax.outbound.deliver(fax_number=\"+11111111112\", files=[\"fax.pdf\", \"https://s3.aws.com/example/fax.html\"])\n\nUnder the hood every path and string is turned into a\n`File \u003c#interfaxfile\u003e`__ object. For more information see `the\ndocumentation \u003c#interfaxfile\u003e`__ for this class.\n\n**Keyword Arguments:** ``contact``, ``postpone_time``,\n``retries_to_perform``, ``csid``, ``page_header``, ``reference``,\n``page_size``, ``fit_to_page``, ``page_orientation``, ``resolution``,\n``rendering``\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2918\u003e`__\n\n**Alias**: ``interfax.deliver``\n\n--------------\n\nGet outbound fax list\n~~~~~~~~~~~~~~~~~~~~~\n\n``interfax.outbound.all(**kwargs)``\n\nGet a list of recent outbound faxes (which does not include batch\nfaxes).\n\n.. code:: python\n\n    \u003e\u003e\u003e interfax.outbound.all()\n    [OutboundFax(id=1), ...]\n    \u003e\u003e\u003e interfax.outbound.all(limit=1)\n    [OutboundFax(id=1)]\n\n**Keyword Arguments:** ``limit``, ``last_id``, ``sort_order``,\n``user_id``\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2920\u003e`__\n\n--------------\n\nGet completed fax list\n~~~~~~~~~~~~~~~~~~~~~~\n\n``interfax.outbound.completed(*args)``\n\nGet details for a subset of completed faxes from a submitted list.\n(Submitted id's which have not completed are ignored).\n\n.. code:: python\n\n    \u003e\u003e interfax.outbound.completed(123, 234)\n    [OutboundFax(id=123), ...]\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2972\u003e`__\n\n--------------\n\nGet outbound fax record\n~~~~~~~~~~~~~~~~~~~~~~~\n\n``interfax.outbound.find(fax_id)``\n\nRetrieves information regarding a previously-submitted fax, including\nits current status.\n\n.. code:: python\n\n    \u003e\u003e\u003e interfax.outbound.find(123456)\n    OutboundFax(id=123456)\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2921\u003e`__\n\n--------------\n\nGet outbound fax image\n~~~~~~~~~~~~~~~~~~~~~~\n\n``interfax.outbound.image(fax_id)``\n\nRetrieve the fax image (TIFF file) of a submitted fax.\n\n.. code:: python\n\n    \u003e\u003e\u003e image = interfax.outbound.image(123456)\n    Image(id=123456)\n    \u003e\u003e\u003e image.data\n    \"....binary data....\"\n    \u003e\u003e\u003e image.save(\"fax.tiff\")\n    # saves image to file\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2941\u003e`__\n\n--------------\n\nCancel a fax\n~~~~~~~~~~~~\n\n``interfax.outbound.cancel(fax_id)``\n\nCancel a fax in progress.\n\n.. code:: python\n\n    interfax.outbound.cancel(123456)\n    =\u003e true\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2939\u003e`__\n\n--------------\n\nSearch fax list\n~~~~~~~~~~~~~~~\n\n``interfax.outbound.search(**kwargs)``\n\nSearch for outbound faxes.\n\n.. code:: python\n\n    \u003e\u003e\u003e interfax.outbound.search(fax_number=\"+1230002305555\")\n    [OutboundFax(id=1234), ...]\n\n**Keyword Arguments:** ``ids``, ``reference``, ``date_from``,\n``date_to``, ``status``, ``user_id``, ``fax_number``, ``limit``,\n``offset``\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2959\u003e`__\n\nInbound\n-------\n\n`Get list \u003c#get-inbound-fax-list\u003e`__ \\| `Get record \u003c#get-inbound-fax-record\u003e`__ \\| `Get image \u003c#get-inbound-fax-image\u003e`__ \\| `Get emails \u003c#get-forwarding-emails\u003e`__ \\| `Mark as read \u003c#mark-as-read-unread\u003e`__ \\| `Resend to email \u003c#resend-inbound-fax\u003e`__\n\nGet inbound fax list\n~~~~~~~~~~~~~~~~~~~~\n\n``interfax.inbound.all(**kwargs)``\n\nRetrieves a user's list of inbound faxes. (Sort order is always in\ndescending ID).\n\n.. code:: python\n\n    interfax.inbound.all()\n    =\u003e [InboundFax(id=1234), ...]\n    interfax.inbound.all(limit=1)\n    =\u003e [InboundFax(id=1234)]\n\n**Keyword Arguments:** ``unread_only``, ``limit``, ``last_id``,\n``all_users``\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2935\u003e`__\n\n--------------\n\nGet inbound fax record\n~~~~~~~~~~~~~~~~~~~~~~\n\n``interfax.inbound.find(fax_id)``\n\nRetrieves a single fax's metadata (receive time, sender number, etc.).\n\n.. code:: python\n\n    \u003e\u003e\u003e interfax.inbound.find(123456)\n    InboundFax(id=123456)\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2938\u003e`__\n\n--------------\n\nGet inbound fax image\n~~~~~~~~~~~~~~~~~~~~~\n\n``interfax.inbound.image(fax_id)``\n\nRetrieves a single fax's image.\n\n.. code:: python\n\n    \u003e\u003e\u003e image = interfax.inbound.image(123456)\n    Image(id=123456)\n    \u003e\u003e\u003e image.data\n    \"....binary data....\"\n    \u003e\u003e\u003e image.save(\"fax.tiff\")\n    # saves image to file\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2937\u003e`__\n\n--------------\n\nGet forwarding emails\n~~~~~~~~~~~~~~~~~~~~~\n\n``interfax.inbound.emails(fax_id)``\n\nRetrieve the list of email addresses to which a fax was forwarded.\n\n.. code:: python\n\n    interfax.inbound.email(123456)\n    [ForwardingEmail()]\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2930\u003e`__\n\n--------------\n\nMark as read/unread\n~~~~~~~~~~~~~~~~~~~\n\n``interfax.inbound.mark(fax_id, read=True)``\n\nMark a transaction as read/unread.\n\n.. code:: python\n\n    interfax.inbound.mark(123456, read=True) # mark read\n    interfax.inbound.mark(123456, read=False) # mark unread\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2936\u003e`__\n\n--------------\n\nResend inbound fax\n~~~~~~~~~~~~~~~~~~\n\n``interfax.inbound.resend(fax_id, email=None)``\n\nResend an inbound fax to a specific email address.\n\n.. code:: python\n\n    \u003e\u003e\u003e # resend to the email(s) to which the fax was previously forwarded\n    \u003e\u003e\u003e interfax.inbound.resend(123456)\n    True\n    \u003e\u003e\u003e # resend to a specific address\n    \u003e\u003e\u003e interfax.inbound.resend(123456, email=\"test@example.com\")\n    True\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2929\u003e`__\n\n--------------\n\nDocuments\n---------\n\n`Create \u003c#create-documents\u003e`__ \\| `Upload chunk`_ \\| `Get list \u003c#get-document-list\u003e`__ \\| `Status \u003c#get-document-status\u003e`__ \\| `Cancel \u003c#cancel-document\u003e`__\n\nDocument allow for uploading of large files up to 20MB in 200kb chunks.\nThe `File`_ format automatically uses this if needed but a\nsample implementation would look as followed.\n\n.. code:: python\n\n    document = interfax.documents.create(\"test.pdf\", os.stat(\"test.pdf\").st_size)\n\n    with open(\"test.pdf\", \"rb\") as fp:\n        cursor = 0\n        while True:\n            chunk = fp.read(500)\n            if not chunk:\n                break\n            next_cursor = cursor + len(chunk)\n            document.upload(cursor, next_cursor-1, chunk)\n            cursor = next_cursor\n\nCreate Documents\n~~~~~~~~~~~~~~~~\n\n``interfax.documents.create(name, size, **kwargs)``\n\nCreate a document upload session, allowing you to upload large files in\nchunks.\n\n.. code:: python\n\n    \u003e\u003e\u003e interfax.documents.create(\"large_file.pdf\", 231234)\n    Document(id=123456)\n\n**Keyword Arguments:** ``disposition``, ``sharing``\n\n**More:**\n`documentation  \u003chttps://www.interfax.net/en/dev/rest/reference/2967\u003e`__\n\n--------------\n\nUpload chunk\n~~~~~~~~~~~~\n\n``interfax.documents.upload(id, range_start, range_end, chunk)``\n\nUpload a chunk to an existing document upload session.\n\n.. code:: python\n\n    \u003e\u003e\u003e interfax.documents.upload(123456, 0, 999, \"....binary-data....\")\n    True\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2966\u003e`__\n\n--------------\n\nGet document list\n~~~~~~~~~~~~~~~~~\n\n``interfax.documents.all(options = {})``\n\nGet a list of previous document uploads which are currently available.\n\n.. code:: python\n\n    \u003e\u003e\u003e interfax.documents.all()\n    [Document(id=123456), ...]\n    \u003e\u003e\u003e interfax.documents.all(offset=10)\n    [Document(id=123466), ...]\n\n**Keyword Arguments:** ``limit``, ``offset``\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2968\u003e`__\n\n--------------\n\nGet document status\n~~~~~~~~~~~~~~~~~~~\n\n``interfax.documents.find(id)``\n\nGet the current status of a specific document upload.\n\n.. code:: python\n\n    \u003e\u003e\u003e interfax.documents.find(123456)\n    Document(id=123456)\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2965\u003e`__\n\n--------------\n\nCancel document\n~~~~~~~~~~~~~~~\n\n``interfax.documents.cancel(id)``\n\nCancel a document upload and tear down the upload session, or delete a\nprevious upload.\n\n.. code:: python\n\n    \u003e\u003e\u003e interfax.documents.cancel(123456)\n    True\n\n**More:**\n`documentation \u003chttps://www.interfax.net/en/dev/rest/reference/2964\u003e`__\n\n--------------\n\nHelper Classes\n--------------\n\nOutboundFax\n~~~~~~~~~~~\n\nThe ``OutboundFax`` is returned in most Outbound APIs. As a convenience\nthe following methods are available.\n\n.. code:: python\n\n    fax = interfax.outbound.find(123)\n    fax = fax.reload() # Loads or reloads object\n    fax.cancel() # Cancels the fax\n    fax.image() # Returns an `Image` for this fax\n\nInboundFax\n~~~~~~~~~~\n\nThe ``InboundFax`` is returned in some of the Inbound APIs. As a\nconvenience the following methods are available.\n\n.. code:: python\n\n    fax = interfax.inbound.find(123)\n    fax = fax.reload() # Loads or reloads object\n    fax.mark(true) # Marks the fax as read/unread\n    fax.resend(email) # Resend the fax to a specific email address.\n    fax.image() # Returns an `Image` for this fax\n    fax.emails() # Returns a list of ForwardingEmail objects that the fax was forwarded on to\n\nImage\n~~~~~\n\nA lightweight wrapper around the image data for a sent or received fax.\nProvides the following convenience methods.\n\n.. code:: python\n\n    image = interfax.outbound.image(123)\n    image.data # Returns the raw binary data for the TIFF image.\n    image.save(\"folder/fax.tiff\") # Saves the TIFF to the path provided\n\nFile\n~~~~\n\nThis class is used by ``interfax.outbound.deliver`` and\n``interfax.files`` to turn every URL, path and binary data into a\nuniform format, ready to be sent out to the InterFAX API.\n\nIt is most useful for sending binary data to the ``.deliver`` method.\n\n.. code:: python\n\n    \u003e\u003e\u003e # binary data\n    \u003e\u003e\u003e f = File(interfax, \"....binary data.....\", mime_type=\"application/pdf\")\n    File()\n\n    \u003e\u003e\u003e # Alternatively\n    \u003e\u003e\u003e f = interfax.files.create(\"....binary data.....\", mime_type=\"application/pdf\")\n    \u003e\u003e\u003e f.headers\n    {\"Content-Type\": \"application/pdf\"}\n    \u003e\u003e\u003e f.body\n    \"....binary data.....\"\n\n    interfax.outbound.deliver(fax_number=\"+1111111111112\", files=[f])\n\nAdditionally it can be used to turn a URL or path into a valid object as\nwell, though the ``.deliver`` method does this conversion automatically.\n\n.. code:: python\n\n    \u003e\u003e\u003e # a file by path\n    \u003e\u003e\u003e f = interfax.files.create(\"foo/bar.pdf\")\n    \u003e\u003e\u003e f.headers\n    { \"Content-Type\": \"application/pdf\" }\n    \u003e\u003e\u003e f.body\n    \"....binary data.....\"\n\n    \u003e\u003e\u003e # a file by url\n    \u003e\u003e\u003e f = interfax.files.create(\"https://foo.com/bar.html\")\n    \u003e\u003e\u003e f.headers\n    {\"Content-Location\": \"https://foo.com/bar.html\"}\n    \u003e\u003e\u003e f.body\n    None\n\nForwardingEmail\n~~~~~~~~~~~~~~~\n\nA light wrapper around `the\nresponse \u003chttps://www.interfax.net/en/dev/rest/reference/2930\u003e`__ received by\nasking for the forwarded emails for a fax.\n\n.. code:: python\n\n    fax = interfax.inbound.find(123)\n    email = fax.emails()[0]\n    email.email_address # An email address to which forwarding of the fax was attempted.\n    email.message_status # 0 = OK; number smaller than zero = in progress; number greater than zero = error.\n    email.completion_time # Completion timestamp.\n\nDocument\n~~~~~~~~\n\nThe ``Document`` is returned in most of the Document APIs. As a\nconvenience the following methods are available.\n\n.. code:: python\n\n    document = interfax.documents.find(123)\n    document = document.reload() # Loads or reloads object\n    document.upload(0, 999, \".....binary data....\" # Maps to the interfax.documents.upload method\n    document.cancel() # Maps to the interfax.documents.cancel method\n    document.id  # Extracts the ID from the URI (the API does not return the ID)\n\n\nContributing\n------------\n\n#. **Fork** the repo on GitHub\n#. **Clone** the project to your own machine\n#. **Commit** changes to your own branch\n#. **Push** your work back up to your fork\n#. Submit a **Pull request** so that we can review your changes\n\n\nTests\n~~~~~\n\nBefore submitting a contribution please ensure all tests pass.\n\n.. code:: shell\n\n    pip install tox # install tox\n    tox # run all tests\n\nor\n\n.. code:: shell\n\n    vagrant up\n    vagrant exec tox\n\nLicense\n-------\n\nThis library is released under the `MIT License \u003chttps://github.com/interfax/interfax-python/blob/master/LICENSE\u003e`__.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterfax%2Finterfax-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterfax%2Finterfax-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterfax%2Finterfax-python/lists"}