Skip to main content

A Python package to get data from Doccle.

Project description

py-doccle

Retrieve documents from Doccle with an easy to use interface

Example usage

# Import the library
from doccle import doccle

# Create a new connector object. Make sure to safely store and retrieve your credentials (don't hardcode them!)
docs = doccle.Connector('<your-doccle-username>', '<your-doccle-password>')

# Get a list of the 5 latest documents available in your Doccle account that are marked as new
# Arguments are optional. When left empty, all documents will be listed.
docs.get_documents(only_new=True, max_docs=2)
# This will yield the following dictionary (limited to 1 for documentation purposes):
{
    'documents': [
        {
            'sender': '<Name of the sender>',
            'name': '<document name in Doccle>',
            'publish_date': '<Date that the document has been published in Doccle>', 
            'document_type': '<Type of document. For example, an invoice', 
            'file_url': '<File URL>', 
            'file_name': '<Filename as saved in Doccle>', 
            'mime_type': '<MIME type, for example application/pdf>', 
            'payment_info': {
                'amount_to_pay': '<Amount to pay as stated on the invoice, if applicable>',
                'sender_bic': '<BIC of the sender, if applicable>',
                'sender_iban': '<IBAN of the sender, if applicable>',
                'payment_reference': '<Payment reference on the invoice, if applicable>',
                'payment_status': '<Payment status of the invoice, if applicable>'
            }
        }
    ]
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-doccle-0.0.2.tar.gz (14.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page