tr-yangin 0.1.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.
tr_yangin/__init__.py ADDED
@@ -0,0 +1,74 @@
1
+ """tr_yangin: early-design fire-safety checks under the Turkish *Binaların
2
+ Yangından Korunması Hakkında Yönetmelik* (BKK 2007/12937, consolidated text).
3
+
4
+ Bu paket bir ön tasarım yardımcısıdır; itfaiye onayının yerine geçmez.
5
+
6
+ Quick use::
7
+
8
+ from tr_yangin import Building, Storey, Space, assess
9
+
10
+ b = Building(
11
+ use_class="buro", building_height_m=18.6, structure_height_m=22.4,
12
+ storeys=[Storey(level=0, spaces=[Space(use="ofis", area_m2=600)], exits=2)],
13
+ )
14
+ print(assess(b).to_text())
15
+ """
16
+
17
+ from __future__ import annotations
18
+
19
+ import json
20
+ from importlib import resources
21
+ from typing import Any, Dict
22
+
23
+ from ._version import __version__
24
+ from .assess import assess
25
+ from .calc import (
26
+ ExitWidths,
27
+ exit_widths,
28
+ is_high_rise,
29
+ max_dead_end,
30
+ max_travel_distance,
31
+ min_exit_count,
32
+ min_exit_separation,
33
+ occupant_count,
34
+ )
35
+ from .errors import InputError, TableError, TrYanginError
36
+ from .models import Building, Space, Storey
37
+ from .report import DISCLAIMER, Finding, Report, Status
38
+ from .tables import Tables, default_tables, load_tables
39
+
40
+ __all__ = [
41
+ "__version__",
42
+ "assess",
43
+ "Building",
44
+ "Storey",
45
+ "Space",
46
+ "Report",
47
+ "Finding",
48
+ "Status",
49
+ "DISCLAIMER",
50
+ "Tables",
51
+ "load_tables",
52
+ "default_tables",
53
+ "ExitWidths",
54
+ "exit_widths",
55
+ "is_high_rise",
56
+ "occupant_count",
57
+ "min_exit_count",
58
+ "max_travel_distance",
59
+ "max_dead_end",
60
+ "min_exit_separation",
61
+ "example_building",
62
+ "TrYanginError",
63
+ "TableError",
64
+ "InputError",
65
+ ]
66
+
67
+
68
+ def example_building() -> Dict[str, Any]:
69
+ """Return the packaged example building description (Turkish keys)."""
70
+ text = (
71
+ resources.files("tr_yangin").joinpath("data", "ornek_bina.json").read_text(encoding="utf-8")
72
+ )
73
+ data: Dict[str, Any] = json.loads(text)
74
+ return data
tr_yangin/__main__.py ADDED
@@ -0,0 +1,7 @@
1
+ """``python -m tr_yangin``."""
2
+
3
+ import sys
4
+
5
+ from .cli import main
6
+
7
+ sys.exit(main())
tr_yangin/_version.py ADDED
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"