trusera-sdk 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 (33) hide show
  1. trusera_sdk-0.1.0/.github/workflows/publish.yml +35 -0
  2. trusera_sdk-0.1.0/.github/workflows/test.yml +37 -0
  3. trusera_sdk-0.1.0/.gitignore +62 -0
  4. trusera_sdk-0.1.0/.ruff.toml +31 -0
  5. trusera_sdk-0.1.0/CHANGELOG.md +37 -0
  6. trusera_sdk-0.1.0/CONTRIBUTING.md +188 -0
  7. trusera_sdk-0.1.0/LICENSE +201 -0
  8. trusera_sdk-0.1.0/MANIFEST.in +5 -0
  9. trusera_sdk-0.1.0/Makefile +41 -0
  10. trusera_sdk-0.1.0/PKG-INFO +302 -0
  11. trusera_sdk-0.1.0/PROJECT_STRUCTURE.md +323 -0
  12. trusera_sdk-0.1.0/QUICKSTART.md +104 -0
  13. trusera_sdk-0.1.0/README.md +266 -0
  14. trusera_sdk-0.1.0/examples/basic_usage.py +75 -0
  15. trusera_sdk-0.1.0/examples/decorator_usage.py +82 -0
  16. trusera_sdk-0.1.0/examples/langchain_example.py +73 -0
  17. trusera_sdk-0.1.0/py.typed +0 -0
  18. trusera_sdk-0.1.0/pyproject.toml +54 -0
  19. trusera_sdk-0.1.0/setup_dev.sh +82 -0
  20. trusera_sdk-0.1.0/tests/__init__.py +1 -0
  21. trusera_sdk-0.1.0/tests/conftest.py +50 -0
  22. trusera_sdk-0.1.0/tests/test_client.py +207 -0
  23. trusera_sdk-0.1.0/tests/test_decorators.py +198 -0
  24. trusera_sdk-0.1.0/tests/test_events.py +101 -0
  25. trusera_sdk-0.1.0/tests/test_langchain.py +158 -0
  26. trusera_sdk-0.1.0/trusera_sdk/__init__.py +16 -0
  27. trusera_sdk-0.1.0/trusera_sdk/client.py +215 -0
  28. trusera_sdk-0.1.0/trusera_sdk/decorators.py +220 -0
  29. trusera_sdk-0.1.0/trusera_sdk/events.py +63 -0
  30. trusera_sdk-0.1.0/trusera_sdk/integrations/__init__.py +3 -0
  31. trusera_sdk-0.1.0/trusera_sdk/integrations/autogen.py +187 -0
  32. trusera_sdk-0.1.0/trusera_sdk/integrations/crewai.py +168 -0
  33. trusera_sdk-0.1.0/trusera_sdk/integrations/langchain.py +258 -0
@@ -0,0 +1,35 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*'
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write
13
+ contents: read
14
+
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: '3.11'
23
+
24
+ - name: Install build dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install build hatchling
28
+
29
+ - name: Build package
30
+ run: python -m build
31
+
32
+ - name: Publish to PyPI
33
+ uses: pypa/gh-action-pypi-publish@release/v1
34
+ with:
35
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,37 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ pull_request:
7
+ branches: [ main, develop ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ['3.9', '3.10', '3.11', '3.12']
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Set up Python ${{ matrix.python-version }}
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+
25
+ - name: Install dependencies
26
+ run: |
27
+ python -m pip install --upgrade pip
28
+ pip install -e ".[dev,langchain,crewai,autogen]"
29
+
30
+ - name: Run tests
31
+ run: pytest -v --tb=short
32
+
33
+ - name: Run linter
34
+ run: ruff check .
35
+
36
+ - name: Run type checker
37
+ run: mypy trusera_sdk
@@ -0,0 +1,62 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ share/python-wheels/
20
+ *.egg-info/
21
+ .installed.cfg
22
+ *.egg
23
+ MANIFEST
24
+
25
+ # Virtual environments
26
+ venv/
27
+ env/
28
+ ENV/
29
+ env.bak/
30
+ venv.bak/
31
+
32
+ # IDE
33
+ .vscode/
34
+ .idea/
35
+ *.swp
36
+ *.swo
37
+ *~
38
+
39
+ # Testing
40
+ .pytest_cache/
41
+ .coverage
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+
46
+ # Type checking
47
+ .mypy_cache/
48
+ .dmypy.json
49
+ dmypy.json
50
+ .pytype/
51
+
52
+ # Ruff
53
+ .ruff_cache/
54
+
55
+ # OS
56
+ .DS_Store
57
+ Thumbs.db
58
+
59
+ # Project specific
60
+ *.log
61
+ .env
62
+ .env.local
@@ -0,0 +1,31 @@
1
+ # Ruff configuration
2
+ line-length = 100
3
+ target-version = "py39"
4
+
5
+ [lint]
6
+ select = [
7
+ "E", # pycodestyle errors
8
+ "F", # pyflakes
9
+ "I", # isort
10
+ "N", # pep8-naming
11
+ "UP", # pyupgrade
12
+ "B", # flake8-bugbear
13
+ "A", # flake8-builtins
14
+ "C4", # flake8-comprehensions
15
+ "PT", # flake8-pytest-style
16
+ ]
17
+
18
+ ignore = [
19
+ "E501", # line too long (handled by formatter)
20
+ ]
21
+
22
+ [lint.per-file-ignores]
23
+ "__init__.py" = ["F401"] # Allow unused imports in __init__.py
24
+ "tests/*" = ["S101"] # Allow assert in tests
25
+
26
+ [lint.isort]
27
+ known-first-party = ["trusera_sdk"]
28
+
29
+ [format]
30
+ quote-style = "double"
31
+ indent-style = "space"
@@ -0,0 +1,37 @@
1
+ # Changelog
2
+
3
+ All notable changes to the Trusera Python SDK will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] - 2026-02-13
9
+
10
+ ### Added
11
+ - Initial release of the Trusera Python SDK
12
+ - Core `TruseraClient` for event tracking and API communication
13
+ - Event types: `TOOL_CALL`, `LLM_INVOKE`, `DATA_ACCESS`, `API_CALL`, `FILE_WRITE`, `DECISION`
14
+ - `@monitor` decorator for automatic function tracking
15
+ - Support for both sync and async functions
16
+ - Automatic batching and background flushing
17
+ - Context manager support for clean resource management
18
+ - LangChain integration with `TruseraCallbackHandler`
19
+ - CrewAI integration with `TruseraCrewCallback`
20
+ - AutoGen integration with `TruseraAutoGenHook`
21
+ - Comprehensive test suite with >90% coverage
22
+ - Type hints throughout the codebase
23
+ - Apache 2.0 license
24
+
25
+ ### Framework Support
26
+ - LangChain Core >=0.1.0
27
+ - CrewAI >=0.1.0
28
+ - AutoGen >=0.2.0
29
+
30
+ ### Development Tools
31
+ - pytest for testing
32
+ - pytest-asyncio for async test support
33
+ - ruff for linting
34
+ - mypy for type checking
35
+ - GitHub Actions for CI/CD
36
+
37
+ [0.1.0]: https://github.com/Trusera/trusera-agent-sdk/releases/tag/v0.1.0
@@ -0,0 +1,188 @@
1
+ # Contributing to Trusera SDK
2
+
3
+ Thank you for your interest in contributing to the Trusera Python SDK! This document provides guidelines and instructions for contributing.
4
+
5
+ ## Getting Started
6
+
7
+ 1. Fork the repository
8
+ 2. Clone your fork: `git clone https://github.com/YOUR_USERNAME/trusera-agent-sdk.git`
9
+ 3. Create a branch: `git checkout -b feature/your-feature-name`
10
+ 4. Make your changes
11
+ 5. Run tests: `pytest`
12
+ 6. Commit your changes: `git commit -m "Add your feature"`
13
+ 7. Push to your fork: `git push origin feature/your-feature-name`
14
+ 8. Open a Pull Request
15
+
16
+ ## Development Setup
17
+
18
+ ```bash
19
+ # Create a virtual environment
20
+ python -m venv venv
21
+ source venv/bin/activate # On Windows: venv\Scripts\activate
22
+
23
+ # Install in development mode with all dependencies
24
+ pip install -e ".[dev,langchain,crewai,autogen]"
25
+ ```
26
+
27
+ ## Code Standards
28
+
29
+ ### Style Guide
30
+
31
+ We follow PEP 8 and use several tools to enforce code quality:
32
+
33
+ ```bash
34
+ # Run linter
35
+ ruff check .
36
+
37
+ # Auto-fix issues
38
+ ruff check --fix .
39
+
40
+ # Type checking
41
+ mypy trusera_sdk
42
+
43
+ # Format code (if using black)
44
+ black trusera_sdk tests
45
+ ```
46
+
47
+ ### Type Hints
48
+
49
+ All functions should have type hints:
50
+
51
+ ```python
52
+ def my_function(arg1: str, arg2: int) -> dict[str, Any]:
53
+ """Function with type hints."""
54
+ return {"result": arg1 * arg2}
55
+ ```
56
+
57
+ ### Docstrings
58
+
59
+ Use Google-style docstrings:
60
+
61
+ ```python
62
+ def my_function(arg1: str, arg2: int) -> str:
63
+ """
64
+ Brief description of the function.
65
+
66
+ Longer description if needed.
67
+
68
+ Args:
69
+ arg1: Description of arg1
70
+ arg2: Description of arg2
71
+
72
+ Returns:
73
+ Description of return value
74
+
75
+ Raises:
76
+ ValueError: When something goes wrong
77
+ """
78
+ pass
79
+ ```
80
+
81
+ ## Testing
82
+
83
+ ### Running Tests
84
+
85
+ ```bash
86
+ # Run all tests
87
+ pytest
88
+
89
+ # Run specific test file
90
+ pytest tests/test_client.py
91
+
92
+ # Run with coverage
93
+ pytest --cov=trusera_sdk --cov-report=html
94
+ ```
95
+
96
+ ### Writing Tests
97
+
98
+ - Place tests in the `tests/` directory
99
+ - Name test files `test_*.py`
100
+ - Name test functions `test_*`
101
+ - Use descriptive test names
102
+ - Aim for high test coverage (>90%)
103
+
104
+ Example test:
105
+
106
+ ```python
107
+ def test_my_feature(trusera_client):
108
+ """Test my new feature."""
109
+ result = trusera_client.my_feature()
110
+ assert result is not None
111
+ assert result["status"] == "success"
112
+ ```
113
+
114
+ ## Pull Request Process
115
+
116
+ 1. **Update Tests**: Add or update tests for your changes
117
+ 2. **Update Documentation**: Update README.md or docstrings as needed
118
+ 3. **Run All Tests**: Ensure all tests pass
119
+ 4. **Check Code Quality**: Run linter and type checker
120
+ 5. **Write Clear Commit Messages**: Use descriptive commit messages
121
+ 6. **Update Changelog**: Add a note about your changes
122
+ 7. **Submit PR**: Open a pull request with a clear description
123
+
124
+ ### PR Description Template
125
+
126
+ ```markdown
127
+ ## Description
128
+ Brief description of changes
129
+
130
+ ## Type of Change
131
+ - [ ] Bug fix
132
+ - [ ] New feature
133
+ - [ ] Breaking change
134
+ - [ ] Documentation update
135
+
136
+ ## Testing
137
+ How has this been tested?
138
+
139
+ ## Checklist
140
+ - [ ] Tests pass
141
+ - [ ] Code follows style guidelines
142
+ - [ ] Documentation updated
143
+ - [ ] Changelog updated
144
+ ```
145
+
146
+ ## Adding Framework Integrations
147
+
148
+ To add support for a new AI framework:
149
+
150
+ 1. Create `trusera_sdk/integrations/your_framework.py`
151
+ 2. Implement the integration following existing patterns
152
+ 3. Add tests in `tests/test_your_framework.py`
153
+ 4. Add to `pyproject.toml` optional dependencies
154
+ 5. Update README.md with usage example
155
+
156
+ ## Reporting Bugs
157
+
158
+ Open an issue with:
159
+ - Clear title
160
+ - Steps to reproduce
161
+ - Expected behavior
162
+ - Actual behavior
163
+ - Environment details (Python version, OS, SDK version)
164
+ - Code sample if possible
165
+
166
+ ## Feature Requests
167
+
168
+ Open an issue with:
169
+ - Clear description of the feature
170
+ - Use case / motivation
171
+ - Example API if proposing new functionality
172
+
173
+ ## Questions
174
+
175
+ For questions about using the SDK:
176
+ - Check the [documentation](https://docs.trusera.dev)
177
+ - Search existing issues
178
+ - Open a new issue with the "question" label
179
+
180
+ ## License
181
+
182
+ By contributing, you agree that your contributions will be licensed under the Apache License 2.0.
183
+
184
+ ## Code of Conduct
185
+
186
+ Be respectful and constructive in all interactions.
187
+
188
+ Thank you for contributing to Trusera!
@@ -0,0 +1,201 @@
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,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Trusera
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,5 @@
1
+ include README.md
2
+ include LICENSE
3
+ include py.typed
4
+ recursive-include trusera_sdk *.py
5
+ recursive-include trusera_sdk py.typed
@@ -0,0 +1,41 @@
1
+ .PHONY: install test lint type-check format clean build publish
2
+
3
+ install:
4
+ pip install -e ".[dev,langchain,crewai,autogen]"
5
+
6
+ test:
7
+ pytest -v --tb=short --cov=trusera_sdk --cov-report=html --cov-report=term
8
+
9
+ lint:
10
+ ruff check .
11
+
12
+ lint-fix:
13
+ ruff check --fix .
14
+
15
+ type-check:
16
+ mypy trusera_sdk
17
+
18
+ format:
19
+ ruff format .
20
+
21
+ clean:
22
+ rm -rf build/
23
+ rm -rf dist/
24
+ rm -rf *.egg-info
25
+ rm -rf .pytest_cache
26
+ rm -rf .mypy_cache
27
+ rm -rf .ruff_cache
28
+ rm -rf htmlcov
29
+ find . -type d -name __pycache__ -exec rm -rf {} +
30
+ find . -type f -name "*.pyc" -delete
31
+
32
+ build: clean
33
+ python -m build
34
+
35
+ publish: build
36
+ python -m twine upload dist/*
37
+
38
+ dev:
39
+ pip install -e ".[dev]"
40
+
41
+ all: lint type-check test