Skip to content

fjd-anh/fitconnect-sdk-python

 
 

Repository files navigation

FIT-Connect Python SDK

⚡ Warning! For now, this SDK is meant to be used for testing purposes only. Please do not use in production yet!

Python wrapper for FIT-Connect APIs.

Usage

from fitconnect import FITConnectClient, Environment

# initialize SDK
fitc = FITConnectClient(Environment.TESTING, client_id, client_secret)

# send submission
status = fitc.submission(destination_id, leika_key, data, attachments=[])
print(status)

# receive submissions
submissions = fitc.available_submissions()
for submission in submissions:
    submission = fitc.retrieve_submission(submission['submissionId'], private_key_decryption)

See sender.py and subscriber.py for details.

How to run examples

  1. Create an account for the test environment.
  2. Copy conf/sender.yaml.example to conf/sender.yaml and set credentials.
  3. Run sender example:
poetry install
poetry run python sender.py

Running the subscriber example is done analogously.

Using the find_destination script, the existence of a destination can be checked accross all environments (TESTING, STAGING, PROD):

poetry run python find_destination.py [DESTINATION_ID]

Features

  • encrypt and send submissions
  • receive and decrypt submissions
  • logging via python's default logging module
  • check metadata schema
  • check submission integrity via metadata hash values
  • solid testing
  • comprehensive documentation
  • validate certificate chains
  • check certificates via OSCP
  • read event log
  • write event log (read receipt)
  • get destination id via Routing API
  • additional examples and integrations

Contributing

Help with new features, documentation and tests is much appreciated! Also, bug reports and feature requests are always welcome. Before submitting any (larger) code changes or adding new features, please first get in touch via the issue tracker.

License

Licensed under the EUPL.

About

FIT-Connect Python SDK (unofficial)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%