Skip to main content

Python API Client library for mifiel.com

Project description

Mifiel Python Library

[![Coverage Status][coveralls-image]][coveralls-url] Build Status PyPI version

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 app-sandbox.mifiel.com.

Once you have an account you will need an APP_ID and an APP_SECRET which you can generate in app-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'
  }
]
doc = Document.create(client, signatories, file='test/fixtures/example.pdf')

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

This project uses poetry which you can install here, the just run install command:

poetry install

Test

Just clone the repo, install dependencies as you would in development and run:

poetry run pytest

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-1.0.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mifiel-1.0.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mifiel-1.0.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.12.13 Darwin/24.6.0

File hashes

Hashes for mifiel-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4b81ef4a081b7e64b5554d6806d1b7e7ecf693f94211f5d3a6a3041d9c8740b6
MD5 e6c3f7000c49f42a6f21c32ef21d79a1
BLAKE2b-256 1c52a506589ac9d9f554e6a807565d9bd6b3cd15c9843b0c2a7a533ea54b86cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mifiel-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.12.13 Darwin/24.6.0

File hashes

Hashes for mifiel-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 83a437c05f7c9d7650426ce79d7e2df12d2cdbe18d05c636312c887fd8a82f26
MD5 d6837bcc9817b1f2d7a0ba9c7839a6d9
BLAKE2b-256 16c48abffce8344be35bb6728cb0c64f86546f1491a61b35583b64b093ff13e2

See more details on using hashes here.

Supported by

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