Skip to main content
# signer

```python
from signer import Signer
from datetime import datetime, timedelta

signer = Signer(b'secret key')

tomorrow = datetime.utcnow() + timedelta(days=1)
signed_message = signer.sign(b'message', expires=tomorrow)

signer.verify(signed_message)
```

* signed message is not encrypted
* if the signature failed the verification, verify() returns `None`
* if expired, verfiy() returns `None`

signing as json and tuple

```python
signer.sign_json(dict(key="value"))

signer.sign_record(['some', b'msg'], expires=tomorrow)

signer.sign(obj, encoder=encode_fn)
signer.verify(signed_bytes, decoder=decode_fn)
```

specify hash method

```python
Signer(method='sha1', digest_size=20)
```

Metadata

Release files for signer 0.0.1

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

Source distribution (sdist)

Source distribution for signer 0.0.1
File Size Uploaded
signer-0.0.1.tar.gz 2.3 kB Details

Release files / signer-0.0.1.tar.gz

Download URL signer-0.0.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
05c3805bf20b35c9e7e1c2a6822a554a5a02d284257f7ff15a29462c5d8977df
BLAKE2b-256 checksum
How to use checksums
efe85c4028ec6ddd2de9cfc07a1806362546024aa48028c8c0d6fa6c81e832ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

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