Skip to main content

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")

Metadata

Release files for pysie-accounting 0.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 pysie-accounting 0.0.2
File Size Uploaded
pysie_accounting-0.0.2.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pysie-accounting 0.0.2
File Interpreter ABI Platform
pysie_accounting-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.1 kB

Release files / pysie_accounting-0.0.2.tar.gz

Download URL pysie_accounting-0.0.2.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9710687ba9576de891d3c93ef4896d4b4911a9a9dda5e7d55863247509d8fca8
BLAKE2b-256 checksum
How to use checksums
b3b22d3f827a18349ea13add41ba38bf1073cbfab8ed06bccdd382354152d5aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / pysie_accounting-0.0.2-py3-none-any.whl

Download URL pysie_accounting-0.0.2-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62f3a25f8a2879ad1bfee81a3b374de3d4be6dcaed6bfda7f2a6f8b2b7e9ddec
BLAKE2b-256 checksum
How to use checksums
656ec48279d2fe450637a48fe49efea756d8dfc0bee6c81858fd767c116c059f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

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