Skip to main content

python-sparnord er et værktøj, der giver dig programmatisk adgang til Spar Nords netbank. I al sin gribende enkelhed lader det dig hive dine kontoudtog ud.

Det er ganske enkelt at bruge:

>>> import sparnord
>>> sn = sparnord.SparNord(username='nemidbrugernavn', password='nemidpassword')
>>> sn.get_accounts()
[{'accountnr': u'246123456',
  'currency': u'DKK',
  'name': u'Spar Nord Stjernekonto',
  'regnr': u'9314'},
 {'accountnr': u'4566474882',
  'currency': u'DKK',
  'name': u'Opsparing',
  'regnr': u'9314'}]
>>> print sn.get_account_info_csv('246123456')
"23-12-2013";"23-12-2013";"Salling Stormagasi";"-175,00";"1.953,03"
"23-12-2013";"23-12-2013";"SuperBest Skalborg";"-773,73";"2.128,03"
"23-12-2013";"23-12-2013";"Netto Skelagervej";"-689,90";"2.901,76"

Hvis du har flere aftaler (hvis du eksempelvis også har en erhvervskonto), så skal du også sørge for at angive aftalenummeret:

>>> sn = sparnord.SparNord(username='nemidbrugernavn', password='nemidpassword')
>>> sn.get_accounts()
Exception: AgreementIdRequired: You must set the agreement ID to go to the accounts overview page
    >>> sn.get_agreements()
Exception: MultipleUserAccountsException: Multiple user accounts were shown, but no ID was given: [[u'92412354524', u'931491235455524', u'Min kones Navn'], [u'90412345607', u'931461234561913', u'Linux2go'], [u'90412345607', u'901234512345628', u'S\xf8ren Lerfors Hansen']]
    >>> sn.user_id = '90412345607'
    >>> sn.get_agreements()
['931461234561913', '901234512345628']
    >>> sn.agreement_id = '901234512345628'
    >>> sn.get_accounts()
[{'accountnr': u'246123456',
  'currency': u'DKK',
  'name': u'Spar Nord Stjernekonto',
  'regnr': u'9314'},
 {'accountnr': u'4566474882',
  'currency': u'DKK',
  'name': u'Opsparing',
  'regnr': u'9314'}]

etc.

Release files for sparnord 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sparnord 0.2
File Size Uploaded
sparnord-0.2.tar.gz 8.7 kB Details

Release files / sparnord-0.2.tar.gz

Download URL sparnord-0.2.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1c5e01b0050574a1b8a23656fc471d38879e2347c7c2ecec6ae13c038834d10c
BLAKE2b-256 checksum
How to use checksums
4287d6f5c1311597b68ff4f5b4fb3ed0e0a23b3583e97a684e1b7dbc9ef09f4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page