sbanken-api
A Python package for communicating with the Sbanken API. Updated to work with latest version of Sbanken's API.
Forked from https://github.com/Lilleengen/sbanken-python
A lot of the code in this packages comes from or is based on code from Sbanken's official example code at https://github.com/Sbanken/api-examples/tree/master/PythonSampleApplication
Authentication
The library can only access your own data and accounts. In order to do this you need to be authenticated.
Sbanken uses the OAuth2 standard for authentication.
To get your client_id and secret password for the API, you need to log in to your account in Sbanken. Then go to https://sbanken.no/bruke/utviklerportalen/ and enable 'Beta features'. Once that's done you should be able to obtain your personal client_id and secret.
customer_id is your full social security number (Norwegian: fødsels- og personnummer).
Currently, this library is read only, meaning it can only read data from your account. Sbanken's API does however support transferring money between your own accounts, and the library will support that in a later version.
Currently implemented features
- Get information about all accounts, or one specific account
- Get information about recently committed transactions
- Get information about eFakturas (electronic bills)
Example usage
import asyncio
import aiohttp
from sbanken import Auth, SbankenAPI
async def main():
async with aiohttp.ClientSession() as session:
client = SbankenAPI(session, "customer_id", "client_id", "secret")
accounts = await api.async_get_accounts()
for account in accounts:
print(f"Account name: {account.name}")
print(f"Balance: {account.balance")
asyncio.run(main())
Metadata
Release files for sbanken-api 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sbanken-api-0.4.1.tar.gz | 4.2 kB | Without provenance | Details for sbanken-api-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sbanken_api-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for sbanken_api-0.4.1-py3-none-any.whl |
Total release size: 11.6 kB
Release files / sbanken-api-0.4.1.tar.gz
| Download URL | sbanken-api-0.4.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9bf6915fc682330c2df8074f16a5d07635656eb169129666e125d631116e121
|
|
BLAKE2b-256 checksum How to use checksums |
fa6bbcb1b54b33ba07120d7d8ae435a49c33931082d10c268c161353368b14d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.8.1
|
Release files / sbanken_api-0.4.1-py3-none-any.whl
| Download URL | sbanken_api-0.4.1-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8c028b5055ba8da2b0f713c312914cbae153daa0f8393955d55075e585f3fb7
|
|
BLAKE2b-256 checksum How to use checksums |
b40ba62d2e0793c55ae1529f63bd91b0c3dfe151a0cd6c237f81e65111cba79c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.8.1
|
Security for sbanken-api 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.