Skip to main content

Python API Client library for Mifiel.com

Project description

Coverage Status Build Status PyPI version

Pyton library for Mifiel API. Please read our documentation for instructions on how to start using the API.

Installation

pip install mifiel

Usage

To start using the API you will need an APP_ID and a APP_SECRET which will be provided upon request (contact us at hola@mifiel.com).

You will first need to create an account in mifiel.com since the APP_ID and APP_SECRET will be linked to your account.

Document methods:

For now, the only methods available are find and create. Contributions are greatly appreciated.

  • Find:

from mifiel import Document, Client
client = Client(app_id='APP_ID', secret_key='APP_SECRET')

doc = Document.find(client, 'id')
document.original_hash
document.file
document.file_signed
# ...
  • Create:

from mifiel import Document, Client
client = Client(app_id='APP_ID', secret_key='APP_SECRET')

signatories = [
  {
    'name': 'Signer 1',
    'email': 'signer1@email.com',
    'tax_id': 'AAA010101AAA'
  },
  {
    'name': 'Signer 2',
    'email':
    'signer2@email.com',
    'tax_id': 'AAA010102AAA'
  }
]
# Providde the SHA256 hash of the file you want to sign.
doc = Document.create(client, signatories, dhash='some-sha256-hash')
# Or just send the file and we'll take care of everything.
# We will store the file for you.
doc = Document.create(client, signatories, file='test/fixtures/example.pdf')

doc.id # -> '7500e528-ac6f-4ad3-9afd-74487c11576a'
doc.id # -> '7500e528-ac6f-4ad3-9afd-74487c11576a'
  • Save Document related files

from mifiel import Document, Client
client = Client(app_id='APP_ID', secret_key='APP_SECRET')

doc = Document.find(client, 'id')
# save the original file
doc.save_file('path/to/save/file.pdf')
# save the signed file (original file + signatures page)
doc.save_file_signed('path/to/save/file-signed.pdf')
# save the signed xml file
doc.save_xml('path/to/save/xml.xml')

Development

Install dependencies

pip install -r requirements.txt

Test

Just clone the repo, install dependencies as you would in development and run nose2 or python setup.py test

Contributing

  1. Fork it ( https://github.com/Mifiel/python-api-client/fork )

  2. Create your feature branch (git checkout -b my-new-feature)

  3. Commit your changes (git commit -am 'Add some feature')

  4. Push to the branch (git push origin my-new-feature)

  5. Create a new Pull Request

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

mifiel-0.0.9.tar.gz (6.0 kB view details)

Uploaded Source

Built Distributions

mifiel-0.0.9-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

mifiel-0.0.9-py2-none-any.whl (9.3 kB view details)

Uploaded Python 2

File details

Details for the file mifiel-0.0.9.tar.gz.

File metadata

  • Download URL: mifiel-0.0.9.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.7

File hashes

Hashes for mifiel-0.0.9.tar.gz
Algorithm Hash digest
SHA256 8c754feb7d637256f608a9e14cd9c5460c2f20b00e93cb63a6312d3929319d8d
MD5 1c2ac4ef2b8c09fa17d1d826c06c8a9d
BLAKE2b-256 a5b6b311a9a93b7195359f73724e1a1fc04bbb641aa50fba3f296005e25837ea

See more details on using hashes here.

File details

Details for the file mifiel-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: mifiel-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.7

File hashes

Hashes for mifiel-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 5d7c75b7b017fe82fbd49a3eaef8cbbdec5e845fa9dd57fb3e911edfeb253adc
MD5 077cc24b6523acaf042afd0ab72749db
BLAKE2b-256 d5659e115c099fbca1dffca2e65ad189f0cc82dda26d9f1c5f0e31369eb4d0b8

See more details on using hashes here.

File details

Details for the file mifiel-0.0.9-py2-none-any.whl.

File metadata

  • Download URL: mifiel-0.0.9-py2-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.7

File hashes

Hashes for mifiel-0.0.9-py2-none-any.whl
Algorithm Hash digest
SHA256 007ae5947746a1e0a3a12ba639480b15e70b7f1d8ce828d7b41454b99713ecb1
MD5 6bf93e31699edcb8d10221bca917fe73
BLAKE2b-256 5d432414e97629356fb74f0ad5fc8a0da79d36434da9dd0c620e8d2b9525329e

See more details on using hashes here.

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