Python API Client library for Mifiel.com
Project description
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
Fork it ( https://github.com/Mifiel/python-api-client/fork )
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am 'Add some feature')
Push to the branch (git push origin my-new-feature)
Create a new Pull Request
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file mifiel-0.0.7.tar.gz
.
File metadata
- Download URL: mifiel-0.0.7.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 089e3eee9f0accc33ed2a6787c5a8715d4cd87b6c23c0d0d9ff0675351cae2a1 |
|
MD5 | e773b6b17c685bfaa170a149b8d0c2bd |
|
BLAKE2b-256 | e253c99a8d24686ad6038283352812b81f0dd61ec1e3eefcca82fe922a84e7cb |
File details
Details for the file mifiel-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: mifiel-0.0.7-py3-none-any.whl
- Upload date:
- Size: 9.2 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a38e486d2f95de7b4f1779f7753d3798dffdab05f2fcc53805ed5c8732220d14 |
|
MD5 | 9c6a70de6505f2f5ada3de2c3b87d524 |
|
BLAKE2b-256 | b892915495fd6c7ca17e40645a4ce47420e6044a2ce162a484de380a58df59c0 |
File details
Details for the file mifiel-0.0.7-py2-none-any.whl
.
File metadata
- Download URL: mifiel-0.0.7-py2-none-any.whl
- Upload date:
- Size: 9.2 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdb30f1d5ef5100a63d9ccea7d274c34dd51b2bc4dac338956f1cf16f0484d1a |
|
MD5 | 7294e7b861a81fb443e2280f2b5d74f7 |
|
BLAKE2b-256 | ccd920025be724fdf247dfccebdb5fc6e1b804e5882174f2c693371a2e43eb9f |