Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ministryofjustice/money-to-prisoners-transaction-uploader
Reads Money to Prisoners (MTP) bank account to facilitate reconciliation
https://github.com/ministryofjustice/money-to-prisoners-transaction-uploader
hmpps mtp
Last synced: about 1 month ago
JSON representation
Reads Money to Prisoners (MTP) bank account to facilitate reconciliation
- Host: GitHub
- URL: https://github.com/ministryofjustice/money-to-prisoners-transaction-uploader
- Owner: ministryofjustice
- License: mit
- Created: 2015-09-30T10:10:54.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2024-06-21T15:06:36.000Z (3 months ago)
- Last Synced: 2024-06-23T04:36:40.079Z (3 months ago)
- Topics: hmpps, mtp
- Language: Python
- Homepage:
- Size: 222 KB
- Stars: 2
- Watchers: 29
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Transaction Uploader – Prisoner Money
Reads bank account to facilitate reconciliation.
Part of the [Prisoner Money suite of apps](https://github.com/ministryofjustice/money-to-prisoners).This app does not have a web interface. It’s run as a cron-like job.
## Requirements
- Unix-like platform with Python 3.10
## Usage
It’s recommended that you use a python virtual environment to isolate each application.
The simplest way to do this is using:
```shell
python3 -m venv venv # creates a virtual environment for dependencies; only needed the first time
. venv/bin/activate # activates the virtual environment; needed every time you use this app
```Some build tasks expect the active virtual environment to be at `/venv/`, but should generally work regardless of
its location.You can copy `mtp_transaction_uploader/local.py.sample` to `local.py` to overlay local settings that won’t be committed,
but it’s not required for a standard setup.The following environment variables determine how the uploader works:
SFTP_HOST - host to download data services files from
SFTP_USER - sftp username
SFTP_PRIVATE_KEY - private key for sftp user
SFTP_DIR - directory on sftp host where files can be foundAPI_USERNAME - username for API access
API_PASSWORD - password for API accessAPI_CLIENT_ID - API client ID
API_CLIENT_SECRET - API client secret
API_URL - base URL of APIDS_LAST_DATE_FILE - path of file in which to store last date processed
DS_NEW_FILES_DIR - path of directory in which to store downloaded files## Developing
[![CircleCI](https://circleci.com/gh/ministryofjustice/money-to-prisoners-transaction-uploader.svg?style=svg)](https://circleci.com/gh/ministryofjustice/money-to-prisoners-transaction-uploader)
Run tests with `./run.py test`.
All build/development actions can be listed with `./run.py --verbosity 2 help`.
Deployment is handled by [money-to-prisoners-deploy](https://github.com/ministryofjustice/money-to-prisoners-deploy/).