Python API Client library for mifiel.com
Project description
Mifiel Python Library
Python library for Mifiel API. Please read our documentation for instructions on how to start using the API.
Installation
pip install mifiel
Usage
For your convenience Mifiel offers a Sandbox environment where you can confidently test your code.
To start using the API in the Sandbox environment you need to first create an account at sandbox.mifiel.com.
Once you have an account you will need an APP_ID and an APP_SECRET which you can generate in sandbox.mifiel.com/access_tokens.
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 Distribution
File details
Details for the file mifiel-0.0.12.tar.gz
.
File metadata
- Download URL: mifiel-0.0.12.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.10 CPython/3.9.6 Darwin/20.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 630398a78ecf366a9dddc125a7b5eb47be46108a469d9d8d26b8a2fa77d4d2e8 |
|
MD5 | 2a2900fc24b093a167d121af27c14b03 |
|
BLAKE2b-256 | 1caa1f54070cab1cd8532151fb2ddaeed059b92331f7c4ccc3e805d05b9b0ad2 |
File details
Details for the file mifiel-0.0.12-py3-none-any.whl
.
File metadata
- Download URL: mifiel-0.0.12-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.10 CPython/3.9.6 Darwin/20.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b287ae153264d3bf9aae6bbe533edc47f14284418671b71afc6cd8600717b729 |
|
MD5 | 51c8321188d36a66b35be4e47c7ba622 |
|
BLAKE2b-256 | fb42268bf8afd0cea7aabbd84be64574e02771aa3f620509390539a7133a3623 |