pyflue 0.1.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 (57) hide show
  1. pyflue-0.1.0/.editorconfig +15 -0
  2. pyflue-0.1.0/.github/dependabot.yml +11 -0
  3. pyflue-0.1.0/.github/workflows/ci.yml +48 -0
  4. pyflue-0.1.0/.github/workflows/docs.yml +58 -0
  5. pyflue-0.1.0/.gitignore +67 -0
  6. pyflue-0.1.0/CHANGELOG.md +12 -0
  7. pyflue-0.1.0/CODE_OF_CONDUCT.md +22 -0
  8. pyflue-0.1.0/CONTRIBUTING.md +39 -0
  9. pyflue-0.1.0/LICENSE +155 -0
  10. pyflue-0.1.0/PKG-INFO +310 -0
  11. pyflue-0.1.0/PRD.md +231 -0
  12. pyflue-0.1.0/README.md +100 -0
  13. pyflue-0.1.0/SECURITY.md +27 -0
  14. pyflue-0.1.0/docs/api/cli.md +99 -0
  15. pyflue-0.1.0/docs/api/configuration.md +56 -0
  16. pyflue-0.1.0/docs/api/harness-backends.md +60 -0
  17. pyflue-0.1.0/docs/api/python-api.md +92 -0
  18. pyflue-0.1.0/docs/assets/favicon.svg +4 -0
  19. pyflue-0.1.0/docs/assets/logo.svg +5 -0
  20. pyflue-0.1.0/docs/assets/stylesheets/extra.css +124 -0
  21. pyflue-0.1.0/docs/concepts/harness.md +58 -0
  22. pyflue-0.1.0/docs/concepts/sandbox.md +85 -0
  23. pyflue-0.1.0/docs/concepts/sessions.md +47 -0
  24. pyflue-0.1.0/docs/concepts/skills.md +83 -0
  25. pyflue-0.1.0/docs/concepts/typed-outputs.md +41 -0
  26. pyflue-0.1.0/docs/deployment.md +143 -0
  27. pyflue-0.1.0/docs/getting-started.md +98 -0
  28. pyflue-0.1.0/docs/guides/coding-agent.md +83 -0
  29. pyflue-0.1.0/docs/guides/create-a-skill.md +68 -0
  30. pyflue-0.1.0/docs/guides/use-the-sandbox.md +59 -0
  31. pyflue-0.1.0/docs/index.md +117 -0
  32. pyflue-0.1.0/docs/reference/feature-matrix.md +42 -0
  33. pyflue-0.1.0/examples/coding_agent.py +37 -0
  34. pyflue-0.1.0/mkdocs.yml +68 -0
  35. pyflue-0.1.0/pyflue/__init__.py +14 -0
  36. pyflue-0.1.0/pyflue/cli.py +259 -0
  37. pyflue-0.1.0/pyflue/config.py +38 -0
  38. pyflue-0.1.0/pyflue/core.py +216 -0
  39. pyflue-0.1.0/pyflue/harnesses/__init__.py +6 -0
  40. pyflue-0.1.0/pyflue/harnesses/base.py +31 -0
  41. pyflue-0.1.0/pyflue/harnesses/deepagents.py +270 -0
  42. pyflue-0.1.0/pyflue/harnesses/google_adk.py +28 -0
  43. pyflue-0.1.0/pyflue/harnesses/openai_agents.py +28 -0
  44. pyflue-0.1.0/pyflue/harnesses/pydanticai.py +28 -0
  45. pyflue-0.1.0/pyflue/harnesses/registry.py +45 -0
  46. pyflue-0.1.0/pyflue/py.typed +1 -0
  47. pyflue-0.1.0/pyflue/sandbox.py +121 -0
  48. pyflue-0.1.0/pyflue/skills.py +74 -0
  49. pyflue-0.1.0/pyflue/types.py +44 -0
  50. pyflue-0.1.0/pyproject.toml +97 -0
  51. pyflue-0.1.0/tests/test_cli.py +50 -0
  52. pyflue-0.1.0/tests/test_deepagents_backend.py +73 -0
  53. pyflue-0.1.0/tests/test_registry.py +20 -0
  54. pyflue-0.1.0/tests/test_sandbox.py +39 -0
  55. pyflue-0.1.0/tests/test_session.py +61 -0
  56. pyflue-0.1.0/tests/test_skills.py +64 -0
  57. pyflue-0.1.0/uv.lock +5433 -0
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ indent_style = space
8
+ indent_size = 2
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.py]
12
+ indent_size = 4
13
+
14
+ [*.md]
15
+ trim_trailing_whitespace = false
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+
8
+ - package-ecosystem: "pip"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "weekly"
@@ -0,0 +1,48 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ test:
14
+ name: Test Python ${{ matrix.python-version }}
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: ["3.11", "3.12", "3.13"]
20
+
21
+ steps:
22
+ - name: Check out repository
23
+ uses: actions/checkout@v4
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v5
27
+ with:
28
+ enable-cache: true
29
+
30
+ - name: Set up Python
31
+ uses: actions/setup-python@v5
32
+ with:
33
+ python-version: ${{ matrix.python-version }}
34
+
35
+ - name: Install dependencies
36
+ run: uv sync --extra dev --extra docs
37
+
38
+ - name: Check formatting and lint
39
+ run: uv run --extra dev ruff check .
40
+
41
+ - name: Run tests
42
+ run: uv run --extra dev pytest
43
+
44
+ - name: Build package
45
+ run: uv build
46
+
47
+ - name: Build documentation
48
+ run: uv run --extra docs mkdocs build --strict
@@ -0,0 +1,58 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ concurrency:
14
+ group: github-pages
15
+ cancel-in-progress: false
16
+
17
+ jobs:
18
+ build:
19
+ name: Build and publish docs
20
+ runs-on: ubuntu-latest
21
+ environment:
22
+ name: github-pages
23
+ url: ${{ steps.deployment.outputs.page_url }}
24
+
25
+ steps:
26
+ - name: Check out repository
27
+ uses: actions/checkout@v4
28
+
29
+ - name: Install uv
30
+ uses: astral-sh/setup-uv@v5
31
+ with:
32
+ enable-cache: true
33
+
34
+ - name: Set up Python
35
+ uses: actions/setup-python@v5
36
+ with:
37
+ python-version: "3.12"
38
+
39
+ - name: Install documentation dependencies
40
+ run: uv sync --extra docs
41
+
42
+ - name: Build documentation
43
+ run: uv run --extra docs mkdocs build --strict
44
+
45
+ - name: Disable Jekyll
46
+ run: touch site/.nojekyll
47
+
48
+ - name: Configure Pages
49
+ uses: actions/configure-pages@v5
50
+
51
+ - name: Upload Pages artifact
52
+ uses: actions/upload-pages-artifact@v3
53
+ with:
54
+ path: site
55
+
56
+ - name: Deploy to GitHub Pages
57
+ id: deployment
58
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,67 @@
1
+ # Bytecode and caches
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ .pytest_cache/
6
+ .ruff_cache/
7
+ .mypy_cache/
8
+ .pyre/
9
+ .pytype/
10
+ .hypothesis/
11
+ .nox/
12
+ .tox/
13
+
14
+ # Virtual environments
15
+ .venv/
16
+ venv/
17
+ env/
18
+ ENV/
19
+
20
+ # Python packaging output
21
+ dist/
22
+ build/
23
+ *.egg-info/
24
+ *.egg
25
+ pip-wheel-metadata/
26
+
27
+ # Test and coverage output
28
+ .coverage
29
+ .coverage.*
30
+ coverage.xml
31
+ htmlcov/
32
+ junit.xml
33
+
34
+ # Documentation builds
35
+ site/
36
+
37
+ # PyFlue local runtime state
38
+ .pyflue/
39
+ .agents/tmp/
40
+ .agents/cache/
41
+
42
+ # Local secrets and environment files
43
+ .env
44
+ .env.*
45
+ !.env.example
46
+ *.local
47
+
48
+ # Generated deployment artifacts
49
+ Dockerfile
50
+ app.py
51
+ railway.json
52
+ render.yaml
53
+ fly.toml
54
+ .gitlab-ci.yml
55
+ .github/workflows/pyflue-agent.yml
56
+
57
+ # Tool and editor metadata
58
+ .DS_Store
59
+ Thumbs.db
60
+ .idea/
61
+ .vscode/
62
+ *.swp
63
+ *.swo
64
+
65
+ # Logs
66
+ *.log
67
+ logs/
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - Initial PyFlue package scaffold.
6
+ - DeepAgents backend.
7
+ - Markdown skill loader.
8
+ - SQLite sessions.
9
+ - Virtual sandbox.
10
+ - Pydantic typed outputs.
11
+ - Typer CLI.
12
+ - MkDocs documentation site.
@@ -0,0 +1,22 @@
1
+ # Code of Conduct
2
+
3
+ PyFlue follows a simple standard: be respectful, constructive, and professional.
4
+
5
+ ## Expected Behavior
6
+
7
+ - Use welcoming and inclusive language.
8
+ - Respect different viewpoints and experience levels.
9
+ - Focus feedback on the work.
10
+ - Accept responsibility and correct mistakes.
11
+
12
+ ## Unacceptable Behavior
13
+
14
+ - Harassment or discriminatory language.
15
+ - Personal attacks.
16
+ - Publishing private information without permission.
17
+ - Disruptive conduct in issues, discussions, or pull requests.
18
+
19
+ ## Enforcement
20
+
21
+ Project maintainers may remove comments, close issues, or restrict
22
+ participation when behavior does not meet this standard.
@@ -0,0 +1,39 @@
1
+ # Contributing
2
+
3
+ Thanks for contributing to PyFlue. This project is early, so changes should be
4
+ small, tested, and clearly documented.
5
+
6
+ ## Development Setup
7
+
8
+ ```bash
9
+ uv sync --extra dev --extra docs
10
+ ```
11
+
12
+ ## Checks
13
+
14
+ Run these before opening a pull request:
15
+
16
+ ```bash
17
+ uv run --extra dev ruff check .
18
+ uv run --extra dev pytest
19
+ uv run --extra docs mkdocs build --strict
20
+ uv build
21
+ ```
22
+
23
+ ## Pull Request Guidelines
24
+
25
+ - Keep changes focused.
26
+ - Add or update tests for behavior changes.
27
+ - Update docs when public behavior changes.
28
+ - Do not expose low-level runtime internals in user-facing docs.
29
+ - Keep public docs professional and concise.
30
+
31
+ ## Dependency Changes
32
+
33
+ When changing dependencies:
34
+
35
+ ```bash
36
+ uv lock
37
+ ```
38
+
39
+ Commit the updated `uv.lock`.
pyflue-0.1.0/LICENSE ADDED
@@ -0,0 +1,155 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form,
34
+ made available under the License, as indicated by a copyright notice that is
35
+ included in or attached to the work.
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
38
+ is based on or derived from the Work and for which the editorial revisions,
39
+ annotations, elaborations, or other modifications represent, as a whole, an
40
+ original work of authorship. For the purposes of this License, Derivative Works
41
+ shall not include works that remain separable from, or merely link or bind by
42
+ name to the interfaces of, the Work and Derivative Works thereof.
43
+
44
+ "Contribution" shall mean any work of authorship, including the original version
45
+ of the Work and any modifications or additions to that Work or Derivative Works
46
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work
47
+ by the copyright owner or by an individual or Legal Entity authorized to submit
48
+ on behalf of the copyright owner. For the purposes of this definition,
49
+ "submitted" means any form of electronic, verbal, or written communication sent
50
+ to the Licensor or its representatives, including but not limited to
51
+ communication on electronic mailing lists, source code control systems, and
52
+ issue tracking systems that are managed by, or on behalf of, the Licensor for
53
+ the purpose of discussing and improving the Work, but excluding communication
54
+ that is conspicuously marked or otherwise designated in writing by the copyright
55
+ owner as "Not a Contribution."
56
+
57
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
58
+ of whom a Contribution has been received by Licensor and subsequently
59
+ incorporated within the Work.
60
+
61
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
62
+ License, each Contributor hereby grants to You a perpetual, worldwide,
63
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
64
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
65
+ sublicense, and distribute the Work and such Derivative Works in Source or
66
+ Object form.
67
+
68
+ 3. Grant of Patent License. Subject to the terms and conditions of this License,
69
+ each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
70
+ no-charge, royalty-free, irrevocable patent license to make, have made, use,
71
+ offer to sell, sell, import, and otherwise transfer the Work, where such license
72
+ applies only to those patent claims licensable by such Contributor that are
73
+ necessarily infringed by their Contribution alone or by combination of their
74
+ Contribution with the Work to which such Contribution was submitted. If You
75
+ institute patent litigation against any entity alleging that the Work or a
76
+ Contribution incorporated within the Work constitutes direct or contributory
77
+ patent infringement, then any patent licenses granted to You under this License
78
+ for that Work shall terminate as of the date such litigation is filed.
79
+
80
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
81
+ Derivative Works thereof in any medium, with or without modifications, and in
82
+ Source or Object form, provided that You meet the following conditions:
83
+
84
+ (a) You must give any other recipients of the Work or Derivative Works a copy of
85
+ this License; and
86
+
87
+ (b) You must cause any modified files to carry prominent notices stating that
88
+ You changed the files; and
89
+
90
+ (c) You must retain, in the Source form of any Derivative Works that You
91
+ distribute, all copyright, patent, trademark, and attribution notices from the
92
+ Source form of the Work, excluding those notices that do not pertain to any part
93
+ of the Derivative Works; and
94
+
95
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
96
+ any Derivative Works that You distribute must include a readable copy of the
97
+ attribution notices contained within such NOTICE file, excluding those notices
98
+ that do not pertain to any part of the Derivative Works, in at least one of the
99
+ following places: within a NOTICE text file distributed as part of the
100
+ Derivative Works; within the Source form or documentation, if provided along
101
+ with the Derivative Works; or, within a display generated by the Derivative
102
+ Works, if and wherever such third-party notices normally appear. The contents of
103
+ the NOTICE file are for informational purposes only and do not modify the
104
+ License. You may add Your own attribution notices within Derivative Works that
105
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
106
+ provided that such additional attribution notices cannot be construed as
107
+ modifying the License.
108
+
109
+ You may add Your own copyright statement to Your modifications and may provide
110
+ additional or different license terms and conditions for use, reproduction, or
111
+ distribution of Your modifications, or for any such Derivative Works as a whole,
112
+ provided Your use, reproduction, and distribution of the Work otherwise complies
113
+ with the conditions stated in this License.
114
+
115
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
116
+ Contribution intentionally submitted for inclusion in the Work by You to the
117
+ Licensor shall be under the terms and conditions of this License, without any
118
+ additional terms or conditions. Notwithstanding the above, nothing herein shall
119
+ supersede or modify the terms of any separate license agreement you may have
120
+ executed with Licensor regarding such Contributions.
121
+
122
+ 6. Trademarks. This License does not grant permission to use the trade names,
123
+ trademarks, service marks, or product names of the Licensor, except as required
124
+ for reasonable and customary use in describing the origin of the Work and
125
+ reproducing the content of the NOTICE file.
126
+
127
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
128
+ writing, Licensor provides the Work on an "AS IS" BASIS, WITHOUT WARRANTIES OR
129
+ CONDITIONS OF ANY KIND, either express or implied, including, without
130
+ limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
131
+ MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
132
+ responsible for determining the appropriateness of using or redistributing the
133
+ Work and assume any risks associated with Your exercise of permissions under
134
+ this License.
135
+
136
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
137
+ tort (including negligence), contract, or otherwise, unless required by
138
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
139
+ writing, shall any Contributor be liable to You for damages, including any
140
+ direct, indirect, special, incidental, or consequential damages of any character
141
+ arising as a result of this License or out of the use or inability to use the
142
+ Work, even if such Contributor has been advised of the possibility of such
143
+ damages.
144
+
145
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
146
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
147
+ acceptance of support, warranty, indemnity, or other liability obligations or
148
+ rights consistent with this License. However, in accepting such obligations, You
149
+ may act only on Your own behalf and on Your sole responsibility, not on behalf
150
+ of any other Contributor, and only if You agree to indemnify, defend, and hold
151
+ each Contributor harmless for any liability incurred by, or claims asserted
152
+ against, such Contributor by reason of your accepting any such warranty or
153
+ additional liability.
154
+
155
+ END OF TERMS AND CONDITIONS