bdo-toolkit 1.0.0__tar.gz

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.
Files changed (89) hide show
  1. bdo_toolkit-1.0.0/LICENSE +21 -0
  2. bdo_toolkit-1.0.0/PKG-INFO +143 -0
  3. bdo_toolkit-1.0.0/README.md +117 -0
  4. bdo_toolkit-1.0.0/pyproject.toml +54 -0
  5. bdo_toolkit-1.0.0/setup.cfg +4 -0
  6. bdo_toolkit-1.0.0/src/bdo_toolkit/__init__.py +87 -0
  7. bdo_toolkit-1.0.0/src/bdo_toolkit/_async_sessions.py +651 -0
  8. bdo_toolkit-1.0.0/src/bdo_toolkit/_capture_backend.py +194 -0
  9. bdo_toolkit-1.0.0/src/bdo_toolkit/_capture_options.py +68 -0
  10. bdo_toolkit-1.0.0/src/bdo_toolkit/_capture_runtime.py +626 -0
  11. bdo_toolkit-1.0.0/src/bdo_toolkit/_deposit_origin.py +1599 -0
  12. bdo_toolkit-1.0.0/src/bdo_toolkit/_engine.py +327 -0
  13. bdo_toolkit-1.0.0/src/bdo_toolkit/_framing.py +904 -0
  14. bdo_toolkit-1.0.0/src/bdo_toolkit/_profile_runtime.py +157 -0
  15. bdo_toolkit-1.0.0/src/bdo_toolkit/_protocol.py +386 -0
  16. bdo_toolkit-1.0.0/src/bdo_toolkit/_reassembly.py +654 -0
  17. bdo_toolkit-1.0.0/src/bdo_toolkit/_specs.py +285 -0
  18. bdo_toolkit-1.0.0/src/bdo_toolkit/_storage_destination_validation.py +167 -0
  19. bdo_toolkit-1.0.0/src/bdo_toolkit/_storage_hydration.py +241 -0
  20. bdo_toolkit-1.0.0/src/bdo_toolkit/_version.py +3 -0
  21. bdo_toolkit-1.0.0/src/bdo_toolkit/calibration.py +3223 -0
  22. bdo_toolkit-1.0.0/src/bdo_toolkit/capture.py +1713 -0
  23. bdo_toolkit-1.0.0/src/bdo_toolkit/character_state.py +3506 -0
  24. bdo_toolkit-1.0.0/src/bdo_toolkit/cli.py +948 -0
  25. bdo_toolkit-1.0.0/src/bdo_toolkit/diagnostics.py +51 -0
  26. bdo_toolkit-1.0.0/src/bdo_toolkit/events.py +214 -0
  27. bdo_toolkit-1.0.0/src/bdo_toolkit/filters.py +105 -0
  28. bdo_toolkit-1.0.0/src/bdo_toolkit/item_state.py +48 -0
  29. bdo_toolkit-1.0.0/src/bdo_toolkit/origin_learning.py +779 -0
  30. bdo_toolkit-1.0.0/src/bdo_toolkit/profiles.py +370 -0
  31. bdo_toolkit-1.0.0/src/bdo_toolkit/py.typed +1 -0
  32. bdo_toolkit-1.0.0/src/bdo_toolkit/remote_profiles.py +358 -0
  33. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/__init__.py +50 -0
  34. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/_constants.py +94 -0
  35. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/_detail_learning.py +1437 -0
  36. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/_details.py +796 -0
  37. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/_discovery.py +1212 -0
  38. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/_live_tracker.py +472 -0
  39. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/_replay_capture.py +182 -0
  40. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/_result.py +441 -0
  41. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/_scanner.py +203 -0
  42. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/_validation.py +11 -0
  43. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/async_session.py +444 -0
  44. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/models.py +806 -0
  45. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/replay.py +62 -0
  46. bdo_toolkit-1.0.0/src/bdo_toolkit/solare/session.py +1051 -0
  47. bdo_toolkit-1.0.0/src/bdo_toolkit/writers.py +30 -0
  48. bdo_toolkit-1.0.0/src/bdo_toolkit.egg-info/PKG-INFO +143 -0
  49. bdo_toolkit-1.0.0/src/bdo_toolkit.egg-info/SOURCES.txt +87 -0
  50. bdo_toolkit-1.0.0/src/bdo_toolkit.egg-info/dependency_links.txt +1 -0
  51. bdo_toolkit-1.0.0/src/bdo_toolkit.egg-info/entry_points.txt +2 -0
  52. bdo_toolkit-1.0.0/src/bdo_toolkit.egg-info/requires.txt +6 -0
  53. bdo_toolkit-1.0.0/src/bdo_toolkit.egg-info/top_level.txt +1 -0
  54. bdo_toolkit-1.0.0/tests/test_async_sessions.py +1034 -0
  55. bdo_toolkit-1.0.0/tests/test_calibration.py +1075 -0
  56. bdo_toolkit-1.0.0/tests/test_calibration_conveniences.py +275 -0
  57. bdo_toolkit-1.0.0/tests/test_calibration_lifecycle.py +571 -0
  58. bdo_toolkit-1.0.0/tests/test_calibration_retention.py +470 -0
  59. bdo_toolkit-1.0.0/tests/test_capture_runtime.py +574 -0
  60. bdo_toolkit-1.0.0/tests/test_character_state.py +2549 -0
  61. bdo_toolkit-1.0.0/tests/test_cli.py +533 -0
  62. bdo_toolkit-1.0.0/tests/test_decoder_diagnostics.py +517 -0
  63. bdo_toolkit-1.0.0/tests/test_deposit_origin.py +1724 -0
  64. bdo_toolkit-1.0.0/tests/test_direction.py +459 -0
  65. bdo_toolkit-1.0.0/tests/test_dynamic_storage_calibration_matrix.py +311 -0
  66. bdo_toolkit-1.0.0/tests/test_engine.py +436 -0
  67. bdo_toolkit-1.0.0/tests/test_examples_and_writers.py +125 -0
  68. bdo_toolkit-1.0.0/tests/test_explicit_profile.py +279 -0
  69. bdo_toolkit-1.0.0/tests/test_fixture_regressions.py +96 -0
  70. bdo_toolkit-1.0.0/tests/test_hardening.py +1567 -0
  71. bdo_toolkit-1.0.0/tests/test_initial_load_storage.py +192 -0
  72. bdo_toolkit-1.0.0/tests/test_inventory_snapshots.py +185 -0
  73. bdo_toolkit-1.0.0/tests/test_item_state.py +244 -0
  74. bdo_toolkit-1.0.0/tests/test_live_capture_session.py +1663 -0
  75. bdo_toolkit-1.0.0/tests/test_origin_learning.py +272 -0
  76. bdo_toolkit-1.0.0/tests/test_reassembly.py +692 -0
  77. bdo_toolkit-1.0.0/tests/test_remote_profiles.py +476 -0
  78. bdo_toolkit-1.0.0/tests/test_solare_api.py +489 -0
  79. bdo_toolkit-1.0.0/tests/test_solare_details.py +1032 -0
  80. bdo_toolkit-1.0.0/tests/test_solare_learning.py +392 -0
  81. bdo_toolkit-1.0.0/tests/test_solare_learning_adversarial.py +567 -0
  82. bdo_toolkit-1.0.0/tests/test_solare_real_captures.py +760 -0
  83. bdo_toolkit-1.0.0/tests/test_solare_replay.py +1853 -0
  84. bdo_toolkit-1.0.0/tests/test_solare_session.py +2127 -0
  85. bdo_toolkit-1.0.0/tests/test_storage_destination_validation.py +310 -0
  86. bdo_toolkit-1.0.0/tests/test_storage_events.py +207 -0
  87. bdo_toolkit-1.0.0/tests/test_storage_hydration_tracker.py +401 -0
  88. bdo_toolkit-1.0.0/tests/test_storage_unknown_destination_calibration.py +49 -0
  89. bdo_toolkit-1.0.0/tests/test_toolkit_api.py +188 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 bdo-toolkit contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,143 @@
1
+ Metadata-Version: 2.4
2
+ Name: bdo-toolkit
3
+ Version: 1.0.0
4
+ Summary: Passive, read-only BDO packet parsing toolkit for app developers.
5
+ Author: bdo-toolkit contributors
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ychwu/bdo-toolkit
8
+ Project-URL: Documentation, https://ychwu.github.io/bdo-toolkit/
9
+ Project-URL: Repository, https://github.com/ychwu/bdo-toolkit.git
10
+ Project-URL: Issues, https://github.com/ychwu/bdo-toolkit/issues
11
+ Keywords: bdo,packets,parse,pcap,passive
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Typing :: Typed
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: scapy>=2.5
21
+ Provides-Extra: dev
22
+ Requires-Dist: pytest; extra == "dev"
23
+ Requires-Dist: pytest-cov; extra == "dev"
24
+ Requires-Dist: mypy; extra == "dev"
25
+ Dynamic: license-file
26
+
27
+ # bdo-toolkit
28
+
29
+ [![CI](https://img.shields.io/github/actions/workflow/status/ychwu/bdo-toolkit/ci.yml?branch=main&style=flat-square&label=CI)](https://github.com/ychwu/bdo-toolkit/actions/workflows/ci.yml)
30
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-3776AB?style=flat-square&logo=python&logoColor=white)](https://github.com/ychwu/bdo-toolkit/blob/main/pyproject.toml)
31
+ ![Tested on NA/EU](https://img.shields.io/badge/tested-NA%2FEU-5b61a8?style=flat-square)
32
+ [![Package: Stable](https://img.shields.io/badge/package-stable-2f855a?style=flat-square)](https://ychwu.github.io/bdo-toolkit/#stability)
33
+ [![License: MIT](https://img.shields.io/badge/license-MIT-2f855a?style=flat-square)](https://github.com/ychwu/bdo-toolkit/blob/main/LICENSE)
34
+
35
+ Passive, read-only Python tooling that turns live or recorded Black Desert
36
+ traffic into structured, application-ready data.
37
+
38
+ [Documentation](https://ychwu.github.io/bdo-toolkit/) ·
39
+ [Quickstart](https://ychwu.github.io/bdo-toolkit/#quickstart) ·
40
+ [Examples](https://ychwu.github.io/bdo-toolkit/#item-examples) ·
41
+ [API index](https://ychwu.github.io/bdo-toolkit/#api-index) ·
42
+ [Report an issue](https://github.com/ychwu/bdo-toolkit/issues)
43
+
44
+ > **Passive, read-only boundary.** bdo-toolkit observes local traffic or saved
45
+ > captures. It does not send or modify packets, replay traffic to the game,
46
+ > automate gameplay, inspect process memory, or bypass anti-cheat software.
47
+
48
+ ## Capabilities
49
+
50
+ | In-game task | Python result | Status | Guide |
51
+ | --- | --- | --- | --- |
52
+ | Watch supported item changes such as loot, gathering, and storage activity | A continuing stream of typed `BDOEvent` objects | Stable | [Item events](https://ychwu.github.io/bdo-toolkit/#item-overview) |
53
+ | Log in or switch characters | One observational `ItemStateSnapshot` of inventory, known balances, and town storage | Beta | [Inventory & town storage](https://ychwu.github.io/bdo-toolkit/#item-state-overview) |
54
+ | Load the Arena of Solare Leaderboard | One `SolareCaptureResult`; a complete result contains a leaderboard snapshot | Beta | [Arena of Solare](https://ychwu.github.io/bdo-toolkit/#solare-overview) |
55
+
56
+ Testing and validation cover **NA/EU only**. Compatibility with other regional
57
+ services is unknown.
58
+
59
+ ## Installation
60
+
61
+ ```powershell
62
+ python -m pip install bdo-toolkit
63
+ ```
64
+
65
+ Python 3.10 or newer is required. Before live capture, complete
66
+ [Installation & setup](https://ychwu.github.io/bdo-toolkit/#capture-foundation),
67
+ including Npcap on Windows and permission to capture on the selected interface.
68
+ Offline PCAP and PCAPNG replay does not require Npcap.
69
+
70
+ ## Get started
71
+
72
+ 1. Complete [Installation & setup](https://ychwu.github.io/bdo-toolkit/#capture-foundation).
73
+ 2. For item events or item state, prepare a current local profile through
74
+ [Opcode profile setup](https://ychwu.github.io/bdo-toolkit/#profiles).
75
+ 3. Run the [Quickstart](https://ychwu.github.io/bdo-toolkit/#quickstart) or
76
+ choose a task from the [Examples](https://ychwu.github.io/bdo-toolkit/#item-examples)
77
+ index.
78
+
79
+ Local calibration is the dependable patch-day path because maintained profiles
80
+ require manual verification and may lag a weekly update. The
81
+ [Calibration guide](https://ychwu.github.io/bdo-toolkit/#calibration-workflow)
82
+ walks through rebuilding one. Arena of Solare uses structural classification
83
+ and does not require an item opcode profile.
84
+
85
+ ## Runnable examples
86
+
87
+ The source checkout includes maintained, run-ready lessons. They are not
88
+ installed with the Python wheel.
89
+
90
+ | Workflow | Representative script |
91
+ | --- | --- |
92
+ | Observe live item activity | [`examples/live_transfer_log.py`](https://github.com/ychwu/bdo-toolkit/blob/main/examples/live_transfer_log.py) |
93
+ | Capture inventory and town storage on character load | [`examples/live_character_load_snapshot.py`](https://github.com/ychwu/bdo-toolkit/blob/main/examples/live_character_load_snapshot.py) |
94
+ | Rebuild an item profile after a patch | [`examples/live_calibrate_profile.py`](https://github.com/ychwu/bdo-toolkit/blob/main/examples/live_calibrate_profile.py) |
95
+ | Capture an Arena of Solare leaderboard load | [`examples/solare_live_snapshot.py`](https://github.com/ychwu/bdo-toolkit/blob/main/examples/solare_live_snapshot.py) |
96
+
97
+ See the [Examples index](https://ychwu.github.io/bdo-toolkit/#item-examples)
98
+ for every script, its prerequisites, and the guide that explains it.
99
+
100
+ ## Documentation
101
+
102
+ The documentation separates task-focused guides from the symbol-first API
103
+ reference. Exact signatures, fields, lifecycle behavior, and failure contracts
104
+ live there rather than in this README.
105
+
106
+ | Goal | Start here |
107
+ | --- | --- |
108
+ | Understand the package | [Overview](https://ychwu.github.io/bdo-toolkit/#overview) |
109
+ | Build with live item events | [Item events](https://ychwu.github.io/bdo-toolkit/#item-overview) |
110
+ | Query character inventory and town storage | [Inventory & town storage](https://ychwu.github.io/bdo-toolkit/#item-state-overview) |
111
+ | Rebuild item decoding after a patch | [Calibration](https://ychwu.github.io/bdo-toolkit/#calibration-workflow) |
112
+ | Capture and query an Arena of Solare leaderboard | [Arena of Solare](https://ychwu.github.io/bdo-toolkit/#solare-overview) |
113
+ | Integrate with an asyncio application | [Asyncio integration](https://ychwu.github.io/bdo-toolkit/#asyncio) |
114
+ | Look up a class, function, or model | [API index](https://ychwu.github.io/bdo-toolkit/#api-index) |
115
+ | Use the terminal interface | [Command line](https://ychwu.github.io/bdo-toolkit/#cli) |
116
+ | Diagnose a problem | [Troubleshooting](https://ychwu.github.io/bdo-toolkit/#errors) |
117
+ | Review data handling and project boundaries | [Safety & privacy](https://ychwu.github.io/bdo-toolkit/#stability) |
118
+
119
+ ## Support
120
+
121
+ For questions, contact me on Discord: `._.__.__._._.__._____.__._.___.`
122
+
123
+ For bugs and feature requests, [open a GitHub issue](https://github.com/ychwu/bdo-toolkit/issues).
124
+
125
+ ## Development
126
+
127
+ ```powershell
128
+ git clone https://github.com/ychwu/bdo-toolkit.git
129
+ cd bdo-toolkit
130
+ python -m pip install -e ".[dev]"
131
+ python -m pytest -q -W error
132
+ python -m mypy src/bdo_toolkit
133
+ python -m pip wheel . --no-deps --wheel-dir dist
134
+ ```
135
+
136
+ CI runs tests, type checking, wheel construction, and a CLI smoke test on
137
+ Ubuntu and Windows with Python 3.10 and 3.14. Tests that require private
138
+ game-session captures skip when those local fixtures are absent.
139
+
140
+ ## License
141
+
142
+ bdo-toolkit is available under the
143
+ [MIT License](https://github.com/ychwu/bdo-toolkit/blob/main/LICENSE).
@@ -0,0 +1,117 @@
1
+ # bdo-toolkit
2
+
3
+ [![CI](https://img.shields.io/github/actions/workflow/status/ychwu/bdo-toolkit/ci.yml?branch=main&style=flat-square&label=CI)](https://github.com/ychwu/bdo-toolkit/actions/workflows/ci.yml)
4
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-3776AB?style=flat-square&logo=python&logoColor=white)](https://github.com/ychwu/bdo-toolkit/blob/main/pyproject.toml)
5
+ ![Tested on NA/EU](https://img.shields.io/badge/tested-NA%2FEU-5b61a8?style=flat-square)
6
+ [![Package: Stable](https://img.shields.io/badge/package-stable-2f855a?style=flat-square)](https://ychwu.github.io/bdo-toolkit/#stability)
7
+ [![License: MIT](https://img.shields.io/badge/license-MIT-2f855a?style=flat-square)](https://github.com/ychwu/bdo-toolkit/blob/main/LICENSE)
8
+
9
+ Passive, read-only Python tooling that turns live or recorded Black Desert
10
+ traffic into structured, application-ready data.
11
+
12
+ [Documentation](https://ychwu.github.io/bdo-toolkit/) ·
13
+ [Quickstart](https://ychwu.github.io/bdo-toolkit/#quickstart) ·
14
+ [Examples](https://ychwu.github.io/bdo-toolkit/#item-examples) ·
15
+ [API index](https://ychwu.github.io/bdo-toolkit/#api-index) ·
16
+ [Report an issue](https://github.com/ychwu/bdo-toolkit/issues)
17
+
18
+ > **Passive, read-only boundary.** bdo-toolkit observes local traffic or saved
19
+ > captures. It does not send or modify packets, replay traffic to the game,
20
+ > automate gameplay, inspect process memory, or bypass anti-cheat software.
21
+
22
+ ## Capabilities
23
+
24
+ | In-game task | Python result | Status | Guide |
25
+ | --- | --- | --- | --- |
26
+ | Watch supported item changes such as loot, gathering, and storage activity | A continuing stream of typed `BDOEvent` objects | Stable | [Item events](https://ychwu.github.io/bdo-toolkit/#item-overview) |
27
+ | Log in or switch characters | One observational `ItemStateSnapshot` of inventory, known balances, and town storage | Beta | [Inventory & town storage](https://ychwu.github.io/bdo-toolkit/#item-state-overview) |
28
+ | Load the Arena of Solare Leaderboard | One `SolareCaptureResult`; a complete result contains a leaderboard snapshot | Beta | [Arena of Solare](https://ychwu.github.io/bdo-toolkit/#solare-overview) |
29
+
30
+ Testing and validation cover **NA/EU only**. Compatibility with other regional
31
+ services is unknown.
32
+
33
+ ## Installation
34
+
35
+ ```powershell
36
+ python -m pip install bdo-toolkit
37
+ ```
38
+
39
+ Python 3.10 or newer is required. Before live capture, complete
40
+ [Installation & setup](https://ychwu.github.io/bdo-toolkit/#capture-foundation),
41
+ including Npcap on Windows and permission to capture on the selected interface.
42
+ Offline PCAP and PCAPNG replay does not require Npcap.
43
+
44
+ ## Get started
45
+
46
+ 1. Complete [Installation & setup](https://ychwu.github.io/bdo-toolkit/#capture-foundation).
47
+ 2. For item events or item state, prepare a current local profile through
48
+ [Opcode profile setup](https://ychwu.github.io/bdo-toolkit/#profiles).
49
+ 3. Run the [Quickstart](https://ychwu.github.io/bdo-toolkit/#quickstart) or
50
+ choose a task from the [Examples](https://ychwu.github.io/bdo-toolkit/#item-examples)
51
+ index.
52
+
53
+ Local calibration is the dependable patch-day path because maintained profiles
54
+ require manual verification and may lag a weekly update. The
55
+ [Calibration guide](https://ychwu.github.io/bdo-toolkit/#calibration-workflow)
56
+ walks through rebuilding one. Arena of Solare uses structural classification
57
+ and does not require an item opcode profile.
58
+
59
+ ## Runnable examples
60
+
61
+ The source checkout includes maintained, run-ready lessons. They are not
62
+ installed with the Python wheel.
63
+
64
+ | Workflow | Representative script |
65
+ | --- | --- |
66
+ | Observe live item activity | [`examples/live_transfer_log.py`](https://github.com/ychwu/bdo-toolkit/blob/main/examples/live_transfer_log.py) |
67
+ | Capture inventory and town storage on character load | [`examples/live_character_load_snapshot.py`](https://github.com/ychwu/bdo-toolkit/blob/main/examples/live_character_load_snapshot.py) |
68
+ | Rebuild an item profile after a patch | [`examples/live_calibrate_profile.py`](https://github.com/ychwu/bdo-toolkit/blob/main/examples/live_calibrate_profile.py) |
69
+ | Capture an Arena of Solare leaderboard load | [`examples/solare_live_snapshot.py`](https://github.com/ychwu/bdo-toolkit/blob/main/examples/solare_live_snapshot.py) |
70
+
71
+ See the [Examples index](https://ychwu.github.io/bdo-toolkit/#item-examples)
72
+ for every script, its prerequisites, and the guide that explains it.
73
+
74
+ ## Documentation
75
+
76
+ The documentation separates task-focused guides from the symbol-first API
77
+ reference. Exact signatures, fields, lifecycle behavior, and failure contracts
78
+ live there rather than in this README.
79
+
80
+ | Goal | Start here |
81
+ | --- | --- |
82
+ | Understand the package | [Overview](https://ychwu.github.io/bdo-toolkit/#overview) |
83
+ | Build with live item events | [Item events](https://ychwu.github.io/bdo-toolkit/#item-overview) |
84
+ | Query character inventory and town storage | [Inventory & town storage](https://ychwu.github.io/bdo-toolkit/#item-state-overview) |
85
+ | Rebuild item decoding after a patch | [Calibration](https://ychwu.github.io/bdo-toolkit/#calibration-workflow) |
86
+ | Capture and query an Arena of Solare leaderboard | [Arena of Solare](https://ychwu.github.io/bdo-toolkit/#solare-overview) |
87
+ | Integrate with an asyncio application | [Asyncio integration](https://ychwu.github.io/bdo-toolkit/#asyncio) |
88
+ | Look up a class, function, or model | [API index](https://ychwu.github.io/bdo-toolkit/#api-index) |
89
+ | Use the terminal interface | [Command line](https://ychwu.github.io/bdo-toolkit/#cli) |
90
+ | Diagnose a problem | [Troubleshooting](https://ychwu.github.io/bdo-toolkit/#errors) |
91
+ | Review data handling and project boundaries | [Safety & privacy](https://ychwu.github.io/bdo-toolkit/#stability) |
92
+
93
+ ## Support
94
+
95
+ For questions, contact me on Discord: `._.__.__._._.__._____.__._.___.`
96
+
97
+ For bugs and feature requests, [open a GitHub issue](https://github.com/ychwu/bdo-toolkit/issues).
98
+
99
+ ## Development
100
+
101
+ ```powershell
102
+ git clone https://github.com/ychwu/bdo-toolkit.git
103
+ cd bdo-toolkit
104
+ python -m pip install -e ".[dev]"
105
+ python -m pytest -q -W error
106
+ python -m mypy src/bdo_toolkit
107
+ python -m pip wheel . --no-deps --wheel-dir dist
108
+ ```
109
+
110
+ CI runs tests, type checking, wheel construction, and a CLI smoke test on
111
+ Ubuntu and Windows with Python 3.10 and 3.14. Tests that require private
112
+ game-session captures skip when those local fixtures are absent.
113
+
114
+ ## License
115
+
116
+ bdo-toolkit is available under the
117
+ [MIT License](https://github.com/ychwu/bdo-toolkit/blob/main/LICENSE).
@@ -0,0 +1,54 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "bdo-toolkit"
7
+ dynamic = ["version"]
8
+ description = "Passive, read-only BDO packet parsing toolkit for app developers."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ dependencies = [
12
+ "scapy>=2.5",
13
+ ]
14
+ license = "MIT"
15
+ license-files = ["LICENSE"]
16
+ authors = [
17
+ { name = "bdo-toolkit contributors" },
18
+ ]
19
+ keywords = ["bdo", "packets", "parse", "pcap", "passive"]
20
+ classifiers = [
21
+ "Development Status :: 5 - Production/Stable",
22
+ "Operating System :: OS Independent",
23
+ "Programming Language :: Python :: 3",
24
+ "Programming Language :: Python :: 3 :: Only",
25
+ "Typing :: Typed",
26
+ ]
27
+
28
+ [project.optional-dependencies]
29
+ dev = [
30
+ "pytest",
31
+ "pytest-cov",
32
+ "mypy",
33
+ ]
34
+
35
+ [project.urls]
36
+ Homepage = "https://github.com/ychwu/bdo-toolkit"
37
+ Documentation = "https://ychwu.github.io/bdo-toolkit/"
38
+ Repository = "https://github.com/ychwu/bdo-toolkit.git"
39
+ Issues = "https://github.com/ychwu/bdo-toolkit/issues"
40
+
41
+ [project.scripts]
42
+ bdo-toolkit = "bdo_toolkit.cli:main"
43
+
44
+ [tool.setuptools.packages.find]
45
+ where = ["src"]
46
+
47
+ [tool.pytest.ini_options]
48
+ testpaths = ["tests"]
49
+
50
+ [tool.setuptools.package-data]
51
+ bdo_toolkit = ["py.typed"]
52
+
53
+ [tool.setuptools.dynamic]
54
+ version = { attr = "bdo_toolkit._version.__version__" }
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,87 @@
1
+ """Public API for the passive bdo-toolkit."""
2
+
3
+ from ._async_sessions import AsyncCalibrationSession, AsyncLiveCaptureSession
4
+ from ._capture_options import LiveCaptureOptions, PacketCaptureOptions
5
+ from ._capture_runtime import CaptureEndpoint
6
+ from .capture import (
7
+ CaptureIntegrityError,
8
+ LiveCaptureHealth,
9
+ LiveCaptureSession,
10
+ capture_live,
11
+ replay_pcap,
12
+ )
13
+ from .events import BDOEvent, Flow
14
+ from .diagnostics import DecoderDiagnostic, DecoderHealth
15
+ from .filters import EventFilter
16
+ from .profiles import (
17
+ OPCODE_PROFILE_SCHEMA_VERSION,
18
+ OpcodeProfile,
19
+ OriginCompanionFamily,
20
+ ProfileError,
21
+ load_opcode_profile,
22
+ )
23
+ from .remote_profiles import (
24
+ DEFAULT_REMOTE_PROFILE_MAX_BYTES,
25
+ DEFAULT_REMOTE_PROFILE_TIMEOUT_SECONDS,
26
+ ProfileFetchResult,
27
+ REMOTE_PROFILE_ENVELOPE_VERSION,
28
+ RemoteProfileError,
29
+ fetch_opcode_profile,
30
+ )
31
+ from ._protocol import StorageLocation, storage_location
32
+ from .origin_learning import (
33
+ CompanionObservation,
34
+ DEFAULT_ORIGIN_LEARNING_MAX_CANDIDATES,
35
+ DEFAULT_ORIGIN_LEARNING_MAX_OBSERVATIONS,
36
+ OriginCompanionCandidate,
37
+ OriginLearner,
38
+ OriginLearningLimitError,
39
+ OriginPromotion,
40
+ promote_origin_candidates,
41
+ )
42
+ from .writers import ConsoleEventWriter, JsonlEventWriter
43
+ from . import solare
44
+ from ._version import __version__
45
+
46
+ __all__ = [
47
+ "AsyncCalibrationSession",
48
+ "AsyncLiveCaptureSession",
49
+ "BDOEvent",
50
+ "CaptureEndpoint",
51
+ "CaptureIntegrityError",
52
+ "ConsoleEventWriter",
53
+ "DecoderDiagnostic",
54
+ "DecoderHealth",
55
+ "EventFilter",
56
+ "Flow",
57
+ "JsonlEventWriter",
58
+ "LiveCaptureOptions",
59
+ "LiveCaptureHealth",
60
+ "LiveCaptureSession",
61
+ "OPCODE_PROFILE_SCHEMA_VERSION",
62
+ "PacketCaptureOptions",
63
+ "OpcodeProfile",
64
+ "OriginCompanionFamily",
65
+ "CompanionObservation",
66
+ "DEFAULT_ORIGIN_LEARNING_MAX_CANDIDATES",
67
+ "DEFAULT_ORIGIN_LEARNING_MAX_OBSERVATIONS",
68
+ "DEFAULT_REMOTE_PROFILE_MAX_BYTES",
69
+ "DEFAULT_REMOTE_PROFILE_TIMEOUT_SECONDS",
70
+ "OriginCompanionCandidate",
71
+ "OriginLearner",
72
+ "OriginLearningLimitError",
73
+ "OriginPromotion",
74
+ "ProfileError",
75
+ "ProfileFetchResult",
76
+ "REMOTE_PROFILE_ENVELOPE_VERSION",
77
+ "RemoteProfileError",
78
+ "StorageLocation",
79
+ "__version__",
80
+ "capture_live",
81
+ "fetch_opcode_profile",
82
+ "load_opcode_profile",
83
+ "promote_origin_candidates",
84
+ "replay_pcap",
85
+ "storage_location",
86
+ "solare",
87
+ ]