Skip to content
forked from camptocamp/AIS.py

Python interface for the Swisscom All-in Signing Service. Fork that replaces old itext dependency with pyHanko.

License

Notifications You must be signed in to change notification settings

seantis/AIS2.py

 
 

Repository files navigation

AIS2.py

PyPI version Python versions Tests Documentation Status Codecov.io pre-commit

AIS.py: a Python interface for the Swisscom All-in Signing Service (aka AIS).

AIS2.py is a fork created to get rid of the licensing woes affected itext dependency and replace it with pyHanko. Furthermore the API was slightly adjusted to be more flexible, so buffers can be passed around rather than files that need to exist on the filesystem.

AIS2.py works like this:

>>> from AIS import AIS, PDF
>>> client = AIS('alice', 'a_secret', 'a.crt', 'a.key')
>>> pdf = PDF('source.pdf')
>>> client.sign_one_pdf(pdf)
>>> with open('target.pdf', 'wb') as fp:
...     fp.write(pdf.out_stream.getvalue())
...

License

Copyright (C) 2016 Camptocamp SA

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

About

Python interface for the Swisscom All-in Signing Service. Fork that replaces old itext dependency with pyHanko.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%