Skip to main content

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.

Release History

2.4.0 (15.10.2026)

  • Add Python 3.14, 3.15 support

  • Remove Python 3.8, 3.9, 3.10 support

2.3.0 (2024-08-21)

  • Add Python 3.11, 3.12, 3.13 support

  • Remove Python 3.7 support

2.2.1 (2022-09-02)

  • Gracefully handles empty batches

2.2.0 (2022-07-14)

  • Switches to AIS API Profile 1.1

2.1.2 (2022-07-14)

  • Actually fixes batch signing

2.1.1 (2022-07-14)

  • Fix batch signing

2.1.0 (2022-04-19)

  • Clean up project structure

  • Clean up PDF API

  • Clean up docs

2.0.0 (2022-04-12)

  • Creation of AIS2.py fork

  • Replaced Travis CI with GitHub Actions.

0.3.0-beta (2021-11-04)

  • Remove Python 2.7, 3.4, 3.5, 3.6 support

  • Replace PyPDF2 and itext with pyHanko

  • Remove support for signing prepared PDFs

0.2.2 (2018-10-22)

  • Store the last created request_id on the AIS instance

  • Use a proper test matrix on Travis to test various Python releases

  • Add Python 3.6 to test matrix

0.2.1 (2016-06-16)

  • Return in batch mode timestamp and revocation information with the signature.

  • Fix python3 bugs.

  • Refactoring.

0.2.0 (2016-05-19)

Documentation

  • Added sections for introduction, installation, testing, project status, API reference.

0.1 (2016-05-17)

Initial release. It is possible to start with a batch of pdf files that do not yet have a prepared signature, and sign them.

Metadata

Release files for AIS2.py 2.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AIS2.py 2.4.0
File Size Uploaded
ais2_py-2.4.0.tar.gz 24.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for AIS2.py 2.4.0
File Interpreter ABI Platform
ais2_py-2.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.2 kB

Release files / ais2_py-2.4.0.tar.gz

Download URL ais2_py-2.4.0.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c3837ccf77869d0620f771e0131536f97d74a8b68a9e80775e25eb70f2fd42e0
BLAKE2b-256 checksum
How to use checksums
7c2a043ea536007479cd6150cb13361b52eb3c2a1e9bf6c79311fe14b26a7868
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / ais2_py-2.4.0-py3-none-any.whl

Download URL ais2_py-2.4.0-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c0dbe88fb93d87e28b1d0ab8b12be2fe8e1e3f6272ccf9e5d279a55b612a511
BLAKE2b-256 checksum
How to use checksums
324be12072cc4eee053f78ea0a3997bfbe17adb0c6a5e2dbfdef24c514ab964d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.4.0 This release

2 release files

2.3.0

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release 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