ds-protocol-http-py-lib 0.1.0a1__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 (27) hide show
  1. ds_protocol_http_py_lib-0.1.0a1/LICENSE-APACHE +201 -0
  2. ds_protocol_http_py_lib-0.1.0a1/PKG-INFO +128 -0
  3. ds_protocol_http_py_lib-0.1.0a1/PyPI.md +77 -0
  4. ds_protocol_http_py_lib-0.1.0a1/README.md +152 -0
  5. ds_protocol_http_py_lib-0.1.0a1/pyproject.toml +80 -0
  6. ds_protocol_http_py_lib-0.1.0a1/setup.cfg +4 -0
  7. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/__init__.py +30 -0
  8. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/dataset/__init__.py +33 -0
  9. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/dataset/http.py +177 -0
  10. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/enums.py +23 -0
  11. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/linked_service/__init__.py +27 -0
  12. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/linked_service/http.py +399 -0
  13. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/py.typed +0 -0
  14. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/resource.yaml +17 -0
  15. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/utils/__init__.py +7 -0
  16. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/utils/http/__init__.py +20 -0
  17. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/utils/http/config.py +64 -0
  18. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/utils/http/provider.py +234 -0
  19. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/utils/http/token_bucket.py +101 -0
  20. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib/utils/json_utils.py +47 -0
  21. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib.egg-info/PKG-INFO +128 -0
  22. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib.egg-info/SOURCES.txt +25 -0
  23. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib.egg-info/dependency_links.txt +1 -0
  24. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib.egg-info/requires.txt +28 -0
  25. ds_protocol_http_py_lib-0.1.0a1/src/ds_protocol_http_py_lib.egg-info/top_level.txt +1 -0
  26. ds_protocol_http_py_lib-0.1.0a1/tests/test_enums.py +31 -0
  27. ds_protocol_http_py_lib-0.1.0a1/tests/test_version.py +26 -0
@@ -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 describing the origin of the Work and
141
+ 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 [2025] [Aider AS]
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,128 @@
1
+ Metadata-Version: 2.4
2
+ Name: ds-protocol-http-py-lib
3
+ Version: 0.1.0a1
4
+ Summary: A Python package from the ds-protocol library collection
5
+ Author-email: Kristoffer Varslott <hello@grasplabs.com>
6
+ Maintainer-email: Kristoffer Varslott <hello@grasplabs.com>
7
+ License-Expression: Apache-2.0
8
+ Project-URL: Documentation, https://grasp-labs.github.io/ds-protocol-http-py-lib/
9
+ Project-URL: Repository, https://github.com/grasp-labs/ds-protocol-http-py-lib/
10
+ Project-URL: Issues, https://github.com/grasp-labs/ds-protocol-http-py-lib/issues/
11
+ Project-URL: Changelog, https://github.com/grasp-labs/ds-protocol-http-py-lib/releases
12
+ Keywords: ds,protocol,python
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Intended Audience :: Developers
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: System :: Logging
22
+ Requires-Python: >=3.11
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE-APACHE
25
+ Requires-Dist: ds-resource-plugin-py-lib<1.0.0,>=0.1.0a2
26
+ Provides-Extra: dev
27
+ Requires-Dist: ruff>=0.1.8; extra == "dev"
28
+ Requires-Dist: mypy>=1.7.0; extra == "dev"
29
+ Requires-Dist: pandas-stubs>=2.1.0; extra == "dev"
30
+ Requires-Dist: pytest>=7.4.0; extra == "dev"
31
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
32
+ Requires-Dist: pytest-xdist>=3.3.0; extra == "dev"
33
+ Requires-Dist: requests-mock>=1.12.1; extra == "dev"
34
+ Requires-Dist: types-requests>=2.31.0; extra == "dev"
35
+ Requires-Dist: pre-commit>=3.6.0; extra == "dev"
36
+ Requires-Dist: build>=1.0.0; extra == "dev"
37
+ Requires-Dist: twine>=4.0.0; extra == "dev"
38
+ Requires-Dist: sphinx>=7.1.0; extra == "dev"
39
+ Requires-Dist: sphinx-autoapi>=3.0.0; extra == "dev"
40
+ Requires-Dist: sphinx-material>=0.0.35; extra == "dev"
41
+ Provides-Extra: test
42
+ Requires-Dist: pytest>=7.4.0; extra == "test"
43
+ Requires-Dist: pytest-cov>=4.1.0; extra == "test"
44
+ Requires-Dist: pytest-xdist>=3.3.0; extra == "test"
45
+ Requires-Dist: requests-mock>=1.12.1; extra == "test"
46
+ Provides-Extra: docs
47
+ Requires-Dist: sphinx>=7.1.0; extra == "docs"
48
+ Requires-Dist: sphinx-autoapi>=3.0.0; extra == "docs"
49
+ Requires-Dist: sphinx-material>=0.0.35; extra == "docs"
50
+ Dynamic: license-file
51
+
52
+ # ds-protocol-http-py-lib
53
+
54
+ A Python package from the ds-common library collection.
55
+
56
+ ## Installation
57
+
58
+ Install the package using pip:
59
+
60
+ ```bash
61
+ pip install ds-protocol-http-py-lib
62
+ ```
63
+
64
+ Or using uv (recommended):
65
+
66
+ ```bash
67
+ uv pip install ds-protocol-http-py-lib
68
+ ```
69
+
70
+ ## Quick Start
71
+
72
+ ```python
73
+ from ds_protocol_http_py_lib import __version__
74
+
75
+ print(f"ds-protocol-http-py-lib version: {__version__}")
76
+ ```
77
+
78
+ ## Usage
79
+
80
+ <!-- Add usage examples here -->
81
+
82
+ ```python
83
+ # Example usage
84
+ import ds_protocol_http_py_lib
85
+
86
+ # Your code examples here
87
+ ```
88
+
89
+ ## Requirements
90
+
91
+ - Python 3.11 or higher
92
+
93
+ ## Documentation
94
+
95
+ Full documentation is available at:
96
+
97
+ - [GitHub Repository](https://github.com/grasp-labs/ds-protocol-http-py-lib)
98
+ - [Documentation Site](https://grasp-labs.github.io/ds-protocol-http-py-lib/)
99
+
100
+ ## Development
101
+
102
+ To contribute or set up a development environment:
103
+
104
+ ```bash
105
+ # Clone the repository
106
+ git clone https://github.com/grasp-labs/ds-protocol-http-py-lib.git
107
+ cd ds-protocol-http-py-lib
108
+
109
+ # Install development dependencies
110
+ uv sync --all-extras --dev
111
+
112
+ # Run tests
113
+ make test
114
+ ```
115
+
116
+ See the [README](https://github.com/grasp-labs/ds-protocol-http-py-lib#readme)
117
+ for more information.
118
+
119
+ ## License
120
+
121
+ This package is licensed under the Apache License 2.0.
122
+ See the [LICENSE-APACHE](https://github.com/grasp-labs/ds-protocol-http-py-lib/blob/main/LICENSE-APACHE)
123
+ file for details.
124
+
125
+ ## Support
126
+
127
+ - **Issues**: [GitHub Issues](https://github.com/grasp-labs/ds-protocol-http-py-lib/issues)
128
+ - **Releases**: [GitHub Releases](https://github.com/grasp-labs/ds-protocol-http-py-lib/releases)
@@ -0,0 +1,77 @@
1
+ # ds-protocol-http-py-lib
2
+
3
+ A Python package from the ds-common library collection.
4
+
5
+ ## Installation
6
+
7
+ Install the package using pip:
8
+
9
+ ```bash
10
+ pip install ds-protocol-http-py-lib
11
+ ```
12
+
13
+ Or using uv (recommended):
14
+
15
+ ```bash
16
+ uv pip install ds-protocol-http-py-lib
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ```python
22
+ from ds_protocol_http_py_lib import __version__
23
+
24
+ print(f"ds-protocol-http-py-lib version: {__version__}")
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ <!-- Add usage examples here -->
30
+
31
+ ```python
32
+ # Example usage
33
+ import ds_protocol_http_py_lib
34
+
35
+ # Your code examples here
36
+ ```
37
+
38
+ ## Requirements
39
+
40
+ - Python 3.11 or higher
41
+
42
+ ## Documentation
43
+
44
+ Full documentation is available at:
45
+
46
+ - [GitHub Repository](https://github.com/grasp-labs/ds-protocol-http-py-lib)
47
+ - [Documentation Site](https://grasp-labs.github.io/ds-protocol-http-py-lib/)
48
+
49
+ ## Development
50
+
51
+ To contribute or set up a development environment:
52
+
53
+ ```bash
54
+ # Clone the repository
55
+ git clone https://github.com/grasp-labs/ds-protocol-http-py-lib.git
56
+ cd ds-protocol-http-py-lib
57
+
58
+ # Install development dependencies
59
+ uv sync --all-extras --dev
60
+
61
+ # Run tests
62
+ make test
63
+ ```
64
+
65
+ See the [README](https://github.com/grasp-labs/ds-protocol-http-py-lib#readme)
66
+ for more information.
67
+
68
+ ## License
69
+
70
+ This package is licensed under the Apache License 2.0.
71
+ See the [LICENSE-APACHE](https://github.com/grasp-labs/ds-protocol-http-py-lib/blob/main/LICENSE-APACHE)
72
+ file for details.
73
+
74
+ ## Support
75
+
76
+ - **Issues**: [GitHub Issues](https://github.com/grasp-labs/ds-protocol-http-py-lib/issues)
77
+ - **Releases**: [GitHub Releases](https://github.com/grasp-labs/ds-protocol-http-py-lib/releases)
@@ -0,0 +1,152 @@
1
+ # ds-protocol-http-py-lib
2
+
3
+ ![Python Versions](https://img.shields.io/badge/python-3.11%20|%203.12%20|%203.13-blue)
4
+ [![PyPI version](https://badge.fury.io/py/ds-protocol-http-py-lib.svg?kill_cache=1)](https://badge.fury.io/py/ds-protocol-http-py-lib)
5
+ [![Build Status](https://github.com/grasp-labs/ds-protocol-http-py-lib/actions/workflows/build.yaml/badge.svg)](https://github.com/grasp-labs/ds-protocol-http-py-lib/actions/workflows/build.yaml)
6
+ [![codecov](https://codecov.io/gh/grasp-labs/ds-protocol-http-py-lib/graph/badge.svg?token=EO3YCNCZFS)](https://codecov.io/gh/grasp-labs/ds-protocol-http-py-lib)
7
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
8
+
9
+ DS package for ds-protocol-http-py-lib
10
+
11
+ ## Quick Start
12
+
13
+ ### Quick Setup
14
+
15
+ ```shell
16
+ # 3. Install dependencies
17
+ uv sync --all-extras --dev
18
+
19
+ # 4. Install pre-commit hooks
20
+ uv run pre-commit install
21
+
22
+ # 5. Verify setup
23
+ make test
24
+ ```
25
+
26
+ ## Development
27
+
28
+ ### Available Commands
29
+
30
+ Use the Makefile for all development tasks:
31
+
32
+ ```shell
33
+ # Show all available commands
34
+ make help
35
+
36
+ # Code Quality
37
+ make lint # Check code quality with ruff
38
+ make format # Format code with ruff
39
+ make type-check # Run mypy type checking
40
+ make security-check # Run security checks with bandit
41
+
42
+ # Testing
43
+ make test # Run tests
44
+ make test-cov # Run tests with coverage (requires 95%)
45
+
46
+ # Build and Publish
47
+ make build # Build package
48
+ make docs # Build documentation
49
+ make publish-test # Upload to TestPyPI
50
+ make publish # Upload to PyPI
51
+ ```
52
+
53
+ ### Version Management
54
+
55
+ ```shell
56
+ # Show current version
57
+ make version
58
+
59
+ # Tag and release
60
+ make tag # Create git tag and push (triggers release)
61
+ ```
62
+
63
+ > **⚠️ Warning**: The `make tag` command will create a git tag and
64
+ > push it to the remote repository, which may trigger automated
65
+ > releases. Ensure you have updated `pyproject.toml` with the new
66
+ > version and committed all changes before running this command.
67
+
68
+ ### Pre-commit Hooks
69
+
70
+ This project uses pre-commit hooks to ensure code quality:
71
+
72
+ ```shell
73
+ install pre-commit
74
+ ```
75
+
76
+ ### Building Documentation
77
+
78
+ ```shell
79
+ # Build documentation
80
+ make docs
81
+
82
+ # View documentation (macOS)
83
+ open docs/build/html/index.html
84
+
85
+ # View documentation (Linux)
86
+ xdg-open docs/build/html/index.html
87
+ ```
88
+
89
+ ### Testing
90
+
91
+ ```shell
92
+ # Run basic tests
93
+ make test
94
+
95
+ # Run tests with coverage (requires 95% coverage)
96
+ make test-cov
97
+
98
+ # Run specific test file
99
+ uv run pytest tests/test_example.py -v
100
+ ```
101
+
102
+ ## Project Structure
103
+
104
+ ```text
105
+ .
106
+ ├── .config/ # Configuration tooling files
107
+ ├── .github/
108
+ │ ├── workflows/ # CI/CD workflows
109
+ │ └── CODEOWNERS # Code ownership file
110
+ ├── src/
111
+ │ └── ds_common_{name}_py_lib/ # Rename to your module name
112
+ │ └── __init__.py
113
+ ├── .pre-commit-config.yaml # Pre-commit hooks configuration
114
+ ├── tests/ # Test files
115
+ ├── docs/ # Sphinx documentation
116
+ ├── LICENSE-APACHE # License file
117
+ ├── pyproject.toml # Project configuration
118
+ ├── Makefile # Development commands
119
+ ├── VERSION.txt # Version file
120
+ ├── codecov.yaml # Codecov configuration
121
+ ├── CONTRIBUTING.md # Contribution guidelines
122
+ ├── PyPI.md # PyPI publishing guide
123
+ ├── README.md # This file
124
+ ```
125
+
126
+ ## Features
127
+
128
+ - **Modern Python Tooling**: Uses `uv` for fast dependency management
129
+ - **Type Safety**: Strict mypy configuration with full type hints
130
+ - **Code Quality**: Ruff for linting and formatting
131
+ - **Testing**: Pytest with 95% coverage requirement
132
+ - **Documentation**: Sphinx with autoapi for automatic API docs
133
+ - **CI/CD**: GitHub Actions for testing, building, and publishing
134
+ - **Pre-commit Hooks**: Automated code quality checks
135
+ - **Docker Support**: Containerized build environment
136
+
137
+ ## Requirements
138
+
139
+ - Python 3.11+
140
+ - [uv](https://github.com/astral-sh/uv) package manager
141
+ - Make (for development commands)
142
+
143
+ ## Documentation
144
+
145
+ - [CONTRIBUTING.md](CONTRIBUTING.md) - Contribution guidelines
146
+ - [PyPI.md](PyPI.md) - PyPI publishing guide
147
+ - [README.md](README.md) - This file
148
+
149
+ ## License
150
+
151
+ This package is licensed under the Apache License 2.0.
152
+ See [LICENSE-APACHE](LICENSE-APACHE) for details.
@@ -0,0 +1,80 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ds-protocol-http-py-lib"
7
+ version = "0.1.0-alpha.1"
8
+ description = "A Python package from the ds-protocol library collection"
9
+ dependencies = [
10
+ "ds-resource-plugin-py-lib>=0.1.0a2, <1.0.0",
11
+ ]
12
+ requires-python = ">=3.11"
13
+ license = "Apache-2.0"
14
+ license-files = ["LICENSE-APACHE"]
15
+ keywords = ["ds", "protocol", "python"]
16
+ authors = [
17
+ {name = "Kristoffer Varslott", email = "hello@grasplabs.com"}
18
+ ]
19
+ maintainers = [
20
+ {name = "Kristoffer Varslott", email = "hello@grasplabs.com"}
21
+ ]
22
+ classifiers = [
23
+ "Development Status :: 4 - Beta",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3.12",
27
+ "Programming Language :: Python :: 3.13",
28
+ "Operating System :: OS Independent",
29
+ "Intended Audience :: Developers",
30
+ "Topic :: Software Development :: Libraries :: Python Modules",
31
+ "Topic :: System :: Logging",
32
+ ]
33
+ readme = "PyPI.md"
34
+
35
+ [project.urls]
36
+ Documentation = "https://grasp-labs.github.io/ds-protocol-http-py-lib/"
37
+ Repository = "https://github.com/grasp-labs/ds-protocol-http-py-lib/"
38
+ Issues = "https://github.com/grasp-labs/ds-protocol-http-py-lib/issues/"
39
+ Changelog = "https://github.com/grasp-labs/ds-protocol-http-py-lib/releases"
40
+
41
+ [project.optional-dependencies]
42
+ dev = [
43
+ "ruff>=0.1.8",
44
+ "mypy>=1.7.0",
45
+ "pandas-stubs>=2.1.0",
46
+ "pytest>=7.4.0",
47
+ "pytest-cov>=4.1.0",
48
+ "pytest-xdist>=3.3.0",
49
+ "requests-mock>=1.12.1",
50
+ "types-requests>=2.31.0",
51
+ "pre-commit>=3.6.0",
52
+ "build>=1.0.0",
53
+ "twine>=4.0.0",
54
+ "sphinx>=7.1.0",
55
+ "sphinx-autoapi>=3.0.0",
56
+ "sphinx-material>=0.0.35",
57
+ ]
58
+ test = [
59
+ "pytest>=7.4.0",
60
+ "pytest-cov>=4.1.0",
61
+ "pytest-xdist>=3.3.0",
62
+ "requests-mock>=1.12.1",
63
+ ]
64
+ docs = [
65
+ "sphinx>=7.1.0",
66
+ "sphinx-autoapi>=3.0.0",
67
+ "sphinx-material>=0.0.35",
68
+ ]
69
+
70
+ [tool.setuptools]
71
+ include-package-data = true
72
+
73
+ [tool.setuptools.package-data]
74
+ ds_protocol_http_py_lib = ["resource.yaml", "py.typed"]
75
+
76
+ [tool.setuptools.packages.find]
77
+ where = ["src"]
78
+
79
+ [tool.setuptools.package-dir]
80
+ "" = "src"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,30 @@
1
+ """
2
+ A Python package from the ds-protocol library collection.
3
+
4
+ **File:** ``__init__.py``
5
+ **Region:** ``ds-protocol-http-py-lib``
6
+
7
+ Example:
8
+
9
+ .. code-block:: python
10
+
11
+ from ds_protocol_http_py_lib import __version__
12
+
13
+ print(f"Package version: {__version__}")
14
+ """
15
+
16
+ from importlib.metadata import version
17
+
18
+ PACKAGE_NAME = "ds-protocol-http-py-lib"
19
+ __version__ = version(PACKAGE_NAME)
20
+
21
+ from .dataset import HttpDataset, HttpDatasetTypedProperties # noqa: E402
22
+ from .linked_service import HttpLinkedService, HttpLinkedServiceTypedProperties # noqa: E402
23
+
24
+ __all__ = [
25
+ "HttpDataset",
26
+ "HttpDatasetTypedProperties",
27
+ "HttpLinkedService",
28
+ "HttpLinkedServiceTypedProperties",
29
+ "__version__",
30
+ ]