https://github.com/codedust/fitconnect-sdk-python
FIT-Connect Python SDK (unofficial)
https://github.com/codedust/fitconnect-sdk-python
Last synced: 10 months ago
JSON representation
FIT-Connect Python SDK (unofficial)
- Host: GitHub
- URL: https://github.com/codedust/fitconnect-sdk-python
- Owner: codedust
- License: eupl-1.2
- Created: 2021-12-23T15:54:50.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-08T12:04:14.000Z (over 2 years ago)
- Last Synced: 2025-03-21T04:41:31.020Z (11 months ago)
- Language: Python
- Size: 146 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# FIT-Connect Python SDK
| :zap: 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](https://docs.fitko.de/fit-connect/) APIs.
## Usage
```python
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](./sender.py) and [subscriber.py](./subscriber.py) for details.
## How to run examples
1. Create an account for the [test environment](https://docs.fitko.de/fit-connect/docs/getting-started/account).
2. Copy `conf/sender.yaml.example` to `conf/sender.yaml` and set credentials.
3. Run sender example:
```bash
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):
```bash
poetry run python find_destination.py [DESTINATION_ID]
```
## Features
- [x] encrypt and send submissions
- [x] receive and decrypt submissions
- [x] logging via python's [default logging module](https://docs.python.org/3/library/logging.html)
- [x] check metadata schema
- [x] 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](./LICENSE.txt).