packflow 0.3.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.
@@ -0,0 +1,175 @@
1
+ Metadata-Version: 2.4
2
+ Name: packflow
3
+ Version: 0.3.0
4
+ Summary: AI/ML inference SDK for streaming data
5
+ License: MIT License
6
+
7
+ Copyright (c) 2026 U.S. Federal Government (in countries where recognized)
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
+ License-File: LICENSE
15
+ Keywords: AI,artificial intelligence,ML,machine learning,streaming,inference
16
+ Author: CDAO Models as a Service
17
+ Author-email: osd.pentagon.cdao.mbx.perceptor-program-members@mail.mil
18
+ Maintainer: CDAO Models as a Service
19
+ Maintainer-email: osd.pentagon.cdao.mbx.perceptor-program-members@mail.mil
20
+ Requires-Python: >=3.10
21
+ Classifier: License :: Other/Proprietary License
22
+ Classifier: Programming Language :: Python :: 3
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
27
+ Classifier: Programming Language :: Python :: 3.14
28
+ Requires-Dist: PyYaml
29
+ Requires-Dist: click (>=8.0.0)
30
+ Requires-Dist: deepmerge (>=2.0,<3.0)
31
+ Requires-Dist: flatten-dict (>=0.4.2,<1.0.0)
32
+ Requires-Dist: loguru (>=0.7.3,<0.8.0)
33
+ Requires-Dist: numpy (<2.3)
34
+ Requires-Dist: pydantic (>=2.11.0,<3.0.0)
35
+ Project-URL: Documentation, https://github.com/dow-cdao/packflow
36
+ Project-URL: Homepage, https://github.com/dow-cdao/packflow
37
+ Project-URL: Repository, https://github.com/dow-cdao/packflow
38
+ Description-Content-Type: text/markdown
39
+
40
+ <h1 style="text-align: center; border-bottom: none !important;">
41
+ <img src="assets/packflow-logo-white-text.png" width="500" alt="Packflow logo">
42
+ </h1>
43
+
44
+ <p align="center">
45
+ <a href="https://pypi.org/project/packflow/"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/packflow.svg"></a>
46
+ <a href="https://pypi.org/project/packflow/"><img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/packflow.svg"></a>
47
+ <a href="https://github.com/dow-cdao/packflow/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/badge/License-MIT-blue.svg"></a>
48
+ </p>
49
+
50
+ # Introduction
51
+
52
+ `packflow` is a software development kit (SDK) that simplifies the development process and standardizes packaging of AI/ML
53
+ running on streaming data sources.
54
+
55
+ Many existing packaging frameworks are catered towards inference APIs and often require custom preprocessing steps. This can be particularly challenging when dealing with data sources that typically generate data one row at a time in key-value pairs (e.g., firewall logs or message streams).
56
+
57
+ Packflow, however, is optimized to run models on either individual events or batches of events, streamlining development and reducing the need for additional preprocessing. By leveraging Packflow, teams can focus on building and deploying models with custom out-of-the-box workflows and utilities, significantly reducing the time and effort required to onboard new capabilities.
58
+
59
+ ## Getting Started
60
+
61
+ The following instructions quickly walk through how to install Packflow and serve user documentation.
62
+
63
+ ### Installing Packflow
64
+
65
+ #### Prerequisite Requirements
66
+
67
+ - **Python** (version 3.10+)
68
+
69
+ #### Installation from PyPI
70
+
71
+ 1. Packflow can be installed directly from PyPI:
72
+
73
+ ```bash
74
+ pip install packflow
75
+ ```
76
+
77
+ from the root of the Packflow repo.
78
+
79
+ > [!NOTE]
80
+ > If contributing to Packflow, it is recommended to install `packflow` from source in editable mode: `pip install -e .`
81
+
82
+ ## Packflow Documentation
83
+
84
+ Packflow documentation is available pre-built in the repository and can be viewed immediately, or built from source for development work. Follow the instructions below to get started with serving the documentation.
85
+
86
+ ### Viewing Pre-built Documentation
87
+
88
+ The simplest way to view the Packflow documentation is to serve the pre-built HTML files included in the repository:
89
+
90
+ 1. Navigate to the pre-built docs folder: `cd docs/built/html`
91
+ 2. Start a local web server: `python -m http.server 8000`
92
+ 3. Access the documentation in a web browser by navigating to [http://127.0.0.1:8000/](http://127.0.0.1:8000/)
93
+
94
+ > [!WARNING]
95
+ > If a "Not Found" error page is received when first accessing the documentation, wait a moment for the server to fully start and refresh the page.
96
+
97
+ ### Building Documentation from Source
98
+
99
+ #### Prerequisite Requirements
100
+
101
+ The following are required to build documentation from source:
102
+
103
+ - **Python** (version 3.10+)
104
+ - **Pip**
105
+ - **Packflow** (the version corresponding to the docs being served)
106
+ - **Pandoc**[^1] (see Pandoc.org's [official installation instructions](https://pandoc.org/installing.html))
107
+ - **`make` Command**[^2]
108
+
109
+ #### Steps
110
+
111
+ 1. Navigate to the docs folder: `cd docs`
112
+ 2. Install Python dependencies for building and hosting the documentation: `pip install -r requirements.txt`
113
+ 3. Run `make dev` to serve the documentation from a working tree with live updates, or `make prod-serve` to serve static multi-version documentation (requires `.git` directory with branch/tag history)
114
+ 4. Access the built documentation in a web browser by navigating to [http://127.0.0.1:8000/](http://127.0.0.1:8000/)
115
+
116
+ > [!WARNING]
117
+ > If a "Not Found" error page is received when first accessing the documentation, wait a moment for the server to fully start and refresh the page.
118
+
119
+ ## Usage
120
+
121
+ Packflow provides a flexible base class called an `InferenceBackend` that allows users to build highly scalable platform- and tool-agnostic inference code, enabling simplified sharing across environments.
122
+
123
+ Additionally, Packflow's CLI can assist with creating projects, gathering environmental information, and creating distributable code packages for sharing reproducible inference code between disconnected environments.
124
+
125
+ For detailed information and usage patterns on Packflow, please see the `About Packflow` and `User Guide` sections of the official documentation site.
126
+
127
+ ### Dummy Inference Backend
128
+
129
+ To create a dummy Inference Backend, update the `inference.py` file to the following:
130
+
131
+ ```python
132
+ from packflow import InferenceBackend
133
+
134
+
135
+ class Backend(InferenceBackend):
136
+ def execute(self, inputs):
137
+ """
138
+ Simply print 'Hello, world!' then return the input data
139
+ """
140
+ print('Hello, world!')
141
+ return inputs
142
+ ```
143
+
144
+ ### Load and Run the Inference Backend
145
+
146
+ In a different Python file or from the command line in the same directory, execute the following:
147
+
148
+ ```python
149
+ from packflow.loaders import LocalLoader
150
+
151
+ backend = LocalLoader('inference:Backend').load()
152
+
153
+ backend({"sample": "data"})
154
+ # >> {"sample": "data"}
155
+ ```
156
+
157
+ ## Contributing
158
+
159
+ Contributions to Packflow are welcomed and highly encouraged! Please refer to the [CONTRIBUTE.md](CONTRIBUTE.md) guide for more information and guidelines for contributing to Packflow.
160
+
161
+ ## Authors
162
+
163
+ Packflow is developed and maintained by [Booz Allen Hamilton](https://www.boozallen.com/) on behalf of the Federal Government of the United States of America and the Department of War's Chief Digital and Artificial Intelligence Office (CDAO).
164
+
165
+ ## License
166
+
167
+ `packflow` is distributed under the terms of the [MIT license](https://spdx.org/licenses/MIT.html). Please refer to the [LICENSE.txt](./LICENSE) for more information of acceptable usage and distribution of Packflow.
168
+
169
+
170
+ [^1]: *Pandoc* must be installed separately from the `pandoc` python package in `docs/requirements.txt`.
171
+ [^2]: Installation of `make` varies by operating system. On MacOS, install `xcode-select`. On Windows, it is recommend to use Windows Subsystem for Linux (WSL). On Debian/Ubuntu, `make` can be installed via `apt` package manager: <pre>
172
+ sudo apt update
173
+ sudo apt install make build-essential
174
+ </pre>
175
+
@@ -0,0 +1,36 @@
1
+ packflow/__init__.py,sha256=qftk6VtBj0l0a8COTYdOoza2u9neotxehcRTYCsWUNA,178
2
+ packflow/backend/__init__.py,sha256=P_S8lSCNtY7bQYAI9O1QsyV3MeJtlbDOR04XiAG4B94,76
3
+ packflow/backend/base.py,sha256=YB4OGQXY_ngvIfRmNHLZx4tlJ-xjGvG9a3xj8jDinF4,8732
4
+ packflow/backend/configuration.py,sha256=4nuAXMXjqmC7T3jQcl3KC6_hsge2tcCECQT3t7N7TLE,3987
5
+ packflow/backend/metrics.py,sha256=3WCikOp3x8J6ofGwCJm7cC9n8DlpCDnQbJRb3qABYbE,746
6
+ packflow/backend/preprocessors.py,sha256=qfokeSaDlQQhp8JfS-Kl0OOTfzSBwfQB5tl4TQSCz4A,6858
7
+ packflow/backend/validation.py,sha256=tT6RzcxXx_73q6LJYqwGqs90ZQ1h5VGiGqgCIO1l3Ig,3274
8
+ packflow/cli.py,sha256=Iv78qYA_CBxQilWKyaVKN7hP7WLy8SXoWxHxwT5IcNw,1226
9
+ packflow/constants.py,sha256=c0ZMqvLl2eeqCLtFL4LCUDbUg6yc-7DSzCwT2lV9KPE,146
10
+ packflow/data/templates/minimal/LICENSE.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ packflow/data/templates/minimal/MODEL_CARD.md,sha256=q_JYVHickKsSDane3EoIVxpRNUa_ZT0VBK5kvgqRyr4,1709
12
+ packflow/data/templates/minimal/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ packflow/data/templates/minimal/inference.py,sha256=OgKuXRJ75tlvjjt4pP8ev3PyAkNiAQJocqU4n37w4I4,2295
14
+ packflow/data/templates/minimal/packflow.yaml,sha256=k7WHJhbQ3TbT6HcatyDZm4a-LpSWDHwWmF-Y1TPo1L8,236
15
+ packflow/data/templates/minimal/requirements.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ packflow/data/templates/minimal/validate.py,sha256=AqdWlXZK3PHAOreXw0XnKF9aInGD7Bi07u_T1M2eB2k,905
17
+ packflow/exceptions.py,sha256=YW2u13vj47z0NTG-CNCwVk6-23LW9EMmeUoa77AXq5k,396
18
+ packflow/loaders/__init__.py,sha256=FmjtDC--WrUbLEhuJ4rXtufno1kuVpzvu0B53tPfFMg,140
19
+ packflow/loaders/base.py,sha256=X4i80XlfJ7t-tBQ4uCwoZ4nSEB0lXqtZZInJk37Njy0,2781
20
+ packflow/loaders/config.py,sha256=xqYVDWaYd2SjUE8vcsUw-wkFGTMMmvU8fDQZFbnpFlg,4096
21
+ packflow/loaders/local.py,sha256=5JQ3UvN23BvJe2Sb5RrvI9uXrrFD6YeMpT5DZjFtuEA,1547
22
+ packflow/loaders/module.py,sha256=IGzqtGUHZLEbtJvfDqRbE5m_EWs_8ZrcCG9_7HRZFoY,805
23
+ packflow/loaders/utils.py,sha256=DQYzTJmAlagjvnKqg_o1ZFOwuwNOn1B1okqAQh1cgEY,778
24
+ packflow/logger.py,sha256=UaGMyrNLANnJE0PU8GeoYaIXzaRCDSIwB432TrB70O8,64
25
+ packflow/project.py,sha256=9sFPysr_yxMKCXkQDXdsWdHlMPea2FOF1ozXRUM8hlc,2368
26
+ packflow/utils/__init__.py,sha256=uJTED5FRZADBkb3e6MklX8T4aaOkOOTWNtod78ajhFQ,132
27
+ packflow/utils/data.py,sha256=64LLzt4qYunbDi8IF_idZPkObts2H5wc8GHrH6U6x0M,3722
28
+ packflow/utils/normalize/__init__.py,sha256=T3OL-M9dOKdHVnXhxEyqzpElcu1CyBczwlB_-8zeVw0,64
29
+ packflow/utils/normalize/base.py,sha256=wxczK-u_rOrIlvFRWJKZzhVnNgTdj2-wBAuq5tjcbkM,1827
30
+ packflow/utils/normalize/handlers.py,sha256=OsA0wt1UndDAheafQOEAL7PibkV7BsTNM1SuE1N4jdQ,2145
31
+ packflow/utils/normalize/normalize.py,sha256=A2lHQhIeR_9u8T2l-jmR5ycixxDcGjNjuHJmF2ddTYU,2482
32
+ packflow-0.3.0.dist-info/METADATA,sha256=KxkLkqoo0mQpZlCdl5IKARRCdJFYS8c4UO9k7tq7lhA,8564
33
+ packflow-0.3.0.dist-info/WHEEL,sha256=kJCRJT_g0adfAJzTx2GUMmS80rTJIVHRCfG0DQgLq3o,88
34
+ packflow-0.3.0.dist-info/entry_points.txt,sha256=Br_0TuK7yigJF7PQamgixG2opifu3xmxmAkAMzQqA48,45
35
+ packflow-0.3.0.dist-info/licenses/LICENSE,sha256=qoxAl0Umx0-hI_ZwUZRb2RG0vSr5oHwY8jrhnSGLCy4,1112
36
+ packflow-0.3.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.3.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ packflow=packflow.cli:cli
3
+
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 U.S. Federal Government (in countries where recognized)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.