A simple Python client library to interact with the Investec Bank API, one of a number of existing client implementations which are also mentioned in the acknowledgement section below. This client has a few noteworthy features:
- No runtime dependencies outside of the Python built-in functionality.
- A single client interface
InvestecOpenApiClient
which inherits function definitions for all supported API scopes. - Full support for switching to API sandbox endpoints with a single client parameter
use_sandbox
. - Additional HTTP headers can be specified to optimize client performance, such as
{'Accept-Encoding': 'gzip, deflate, br'}
. - Full separation of implementation between API scope implementations for ease of extensions.
- At the time of writing, API support is limited to the account scope and limited card scope. Pull requests are welcome.
- Although Investec Bank publish their API schema as an Open API specification, I had specific difficulty in generating a client from only the JSON schema files using a few options. More experimentation is needed to obviate the need to write a client from first principles.
Get the package on PyPi.
I recommend the use of Poetry for dependency and runtime management. Follow the instructions on the Poetry site here.
For an example of how this library works, check out this simple sample application.
Distributed under the MIT License. See LICENSE for more information.
Additional well-established Python clients built by the Investec Programmable Banking community:
Investec Open API:
This project benefits from these supporting projects: