SEDEX Messagebox Manager
Project description
SEDEX Messagebox Manager
Purpose
This module simplifies the management of your message boxes with asynchronous data exchange via SEDEX. https://www.bfs.admin.ch/bfs/de/home/register/personenregister/sedex/asynchron.html
You can search your inbox for specific message types or receiving times, clean up your inbox or send messages. All this with a few simple lines of Python.
This module never interferes with the SEDEX core functionality of secure data transmission but simplifies the management of in- and outbox.
Get started
pip install sedex
That's it.
Examples
import datetime
from sedex import semebo
# create our instance once by specifying in- and outbox.
messagebox = semebo.MessageBox(inbox=r"C:\sedex\inbox", outbox=r"C:\sedex\outbox")
# list data files, sender ID and message type of all messages in inbox received within the last 24h
for message in messagebox.scan_inbox(from_date=datetime.datetime.now() - datetime.timedelta(hours=24)):
print(message.data_file,
message.envelope.sender_id,
message.envelope.message_type)
# send message
data = r"C:\delivery\ready_to_ship"
transfer_id, envelope = messagebox.send_data(data_dir=data, recipient_id="CH1848", sender_id="Z!1819", message_type=1819)
print(transfer_id,
envelope.message_id,
envelope.message_date)
# list candidates older than a week to preview cleanup
messagebox.purge_inbox(older_than_days=7, dry_run=True)
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
Built Distribution
File details
Details for the file sedex-0.1.2.tar.gz
.
File metadata
- Download URL: sedex-0.1.2.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
e08180a21e0ba8e1bdcdac4b35dc9a7f0f7450fb07234a82650876cb75271a96
|
|
MD5 |
850f302b5058709c2975eeba0bf6eb4f
|
|
BLAKE2b-256 |
c50ca655a70b53966cc33f2f243474811a0f44d3f00ab6a7e365aab37ba59e66
|
File details
Details for the file sedex-0.1.2-py2-none-any.whl
.
File metadata
- Download URL: sedex-0.1.2-py2-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
fee042c4eed1f7d8dee59fd64560a62dffb9abb77b194d624e9d1f2a2baa0a0c
|
|
MD5 |
ea418c5d3253e5286c09b518a805ee5d
|
|
BLAKE2b-256 |
b29f24e70cffa5316d9de8207c82af906331d769dcd29b142aa1e9ac0e1604b4
|