Skip to main content

SIE file decoder

Project description

pysie-accounting

This package contains tools to parse and read SIE files.

Currently there is only support for SIE type 4.

SIE files

These files are used in accounting within Sweden. The file format is published by SIE gruppen. Type 1-4 are text based, type 5 is xml based. The SIE4 file is coded with codepage 437.

Example

import pysie_accounting.pysie as pysie
import sys


# open SIE file
p = pysie.PySIE ()
p.open_trans (sys.argv[2])
p.open (sys.argv[1])

# create a new accounting year
p.new_year()

# add some verifikat

last_year = p.get_balance(2099)
p.add_verifikat("Omföring av årets resultat", [(2098, "", last_year), (2099, "", -last_year)], "20230101")

account_fee = 1234
p.add_verifikat("Bankavgifter", [(1930, "", -account_fee), (6570, "", account_fee)], "20230101")

sum_result = p.sum_result()
p.add_verifikat("Omföring av årets resultat", [(2099, "", sum_result), (8999, "", -sum_result)], "20231231")


# print a pivot based on SRU
pivot = p.dfres.pivot_table(index='SRU',columns='Year',values='Balance')
print(pivot)

# write the updated file
p.write_sie4("test.se")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysie_accounting-0.0.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

pysie_accounting-0.0.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file pysie_accounting-0.0.2.tar.gz.

File metadata

  • Download URL: pysie_accounting-0.0.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for pysie_accounting-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9710687ba9576de891d3c93ef4896d4b4911a9a9dda5e7d55863247509d8fca8
MD5 cf0e77dbe92aaf7efaefaaeb2f559f8f
BLAKE2b-256 b3b22d3f827a18349ea13add41ba38bf1073cbfab8ed06bccdd382354152d5aa

See more details on using hashes here.

File details

Details for the file pysie_accounting-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pysie_accounting-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 62f3a25f8a2879ad1bfee81a3b374de3d4be6dcaed6bfda7f2a6f8b2b7e9ddec
MD5 d897db75c6e3a73907fae02bfe0a4217
BLAKE2b-256 656ec48279d2fe450637a48fe49efea756d8dfc0bee6c81858fd767c116c059f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page