ksefik 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ksefik/__init__.py +36 -0
- ksefik/client.py +1361 -0
- ksefik/codes.py +291 -0
- ksefik/config.py +68 -0
- ksefik/crypto.py +55 -0
- ksefik/drafts.py +58 -0
- ksefik/fa_parser.py +492 -0
- ksefik/invoice.py +755 -0
- ksefik/money.py +92 -0
- ksefik/profile.py +692 -0
- ksefik/py.typed +0 -0
- ksefik/registry.py +108 -0
- ksefik/schemas/ElementarneTypyDanych_v10-0E.xsd +1 -0
- ksefik/schemas/KodyKrajow_v10-0E.xsd +1283 -0
- ksefik/schemas/StrukturyDanych_v10-0E.xsd +1 -0
- ksefik/schemas/schemat_FA3_v1-0E.xsd +3950 -0
- ksefik/store.py +576 -0
- ksefik/submissions.py +254 -0
- ksefik/sync.py +139 -0
- ksefik/tokenstore.py +82 -0
- ksefik/ui/__init__.py +0 -0
- ksefik/ui/account.py +1119 -0
- ksefik/ui/app.py +969 -0
- ksefik/ui/app.tcss +716 -0
- ksefik/ui/certificates.py +344 -0
- ksefik/ui/common.py +1030 -0
- ksefik/ui/editor.py +1165 -0
- ksefik/ui/import_screen.py +724 -0
- ksefik/ui/invoice_screens.py +997 -0
- ksefik/ui/main_screen.py +900 -0
- ksefik/ui/permissions.py +762 -0
- ksefik/ui/sent_screen.py +249 -0
- ksefik/ui/setup_screen.py +319 -0
- ksefik/ui/widgets.py +213 -0
- ksefik/xades.py +246 -0
- ksefik-0.2.0.dist-info/METADATA +306 -0
- ksefik-0.2.0.dist-info/RECORD +40 -0
- ksefik-0.2.0.dist-info/WHEEL +4 -0
- ksefik-0.2.0.dist-info/entry_points.txt +3 -0
- ksefik-0.2.0.dist-info/licenses/LICENSE +21 -0
ksefik/__init__.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""ksefik - przeglądanie i wystawianie faktur w KSeF z terminala."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import sys
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
from .config import ENVIRONMENTS, __version__, default_profile_path
|
|
10
|
+
from .profile import Profile, ProfileError, load_profile
|
|
11
|
+
|
|
12
|
+
__all__ = ["__version__", "main"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def main() -> None:
|
|
16
|
+
parser = argparse.ArgumentParser(
|
|
17
|
+
prog="ksefik",
|
|
18
|
+
description="Przeglądanie i wystawianie faktur w Krajowym Systemie e-Faktur.",
|
|
19
|
+
epilog=f"Profil: {default_profile_path()} (inny wskażesz przez --profile albo KSEFIK_PROFILE).",
|
|
20
|
+
)
|
|
21
|
+
parser.add_argument("--version", action="version", version=f"%(prog)s {__version__}")
|
|
22
|
+
parser.add_argument("--env", choices=list(ENVIRONMENTS), help="środowisko KSeF (nadpisuje profil)")
|
|
23
|
+
parser.add_argument("--profile", type=Path, metavar="PLIK", help="plik profilu firmy (profile.toml)")
|
|
24
|
+
args = parser.parse_args()
|
|
25
|
+
|
|
26
|
+
path = (args.profile or default_profile_path()).expanduser()
|
|
27
|
+
profile: Profile | None = None
|
|
28
|
+
try:
|
|
29
|
+
if path.exists():
|
|
30
|
+
profile = load_profile(path, args.env)
|
|
31
|
+
except ProfileError as exc:
|
|
32
|
+
sys.exit(str(exc))
|
|
33
|
+
|
|
34
|
+
from .ui.app import KsefApp
|
|
35
|
+
|
|
36
|
+
KsefApp(profile, profile_path=path, env_override=args.env).run()
|