Skip to main content

Mifiel Python Library

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/settings/access-tokens.

By default the client talks to production (https://app.mifiel.com). For sandbox, call client.use_sandbox() (uses https://app-sandbox.mifiel.com), or override with client.set_base_url(...).

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

Download files

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

Source Distribution

mifiel-2.0.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

mifiel-2.0.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mifiel-2.0.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.6 Darwin/24.6.0

File hashes

Hashes for mifiel-2.0.0.tar.gz
Algorithm Hash digest
SHA256 6e02d0a916fb34d457252ca72becb7ee8cad59aa842bff690ac45ab08cad920c
MD5 ca603be8ea337b27ead7135610adc71a
BLAKE2b-256 3fd2316588bc6551ba7d95d8f79cc3bf0e4a518399c97d71e148ad1826cd0593

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mifiel-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.6 Darwin/24.6.0

File hashes

Hashes for mifiel-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd9891ec49cd7a981fe1a2959d17c45d85e669e9f7f7bc2a63c047bef9d644b2
MD5 aa672211eaca51d0835955977979b702
BLAKE2b-256 242de6cfe4d6ddc2dd3a2ae87f43a19b137302e3e6eeff64edae777da72fbce0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

1.0.0

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

3 files

0.0.9

3 files

0.0.8

1 file

0.0.7

3 files

0.0.6

1 file

0.0.5

2 files

0.0.4

0.0.3

1 file

0.0.2

1 file

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page