bloomy-python 0.12.1__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,154 @@
1
+ """User operations for the Bloomy SDK."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from ..models import DirectReport, Position, UserDetails, UserListItem, UserSearchResult
6
+ from ..utils.base_operations import BaseOperations
7
+
8
+
9
+ class UserOperations(BaseOperations):
10
+ """Class to handle all operations related to users."""
11
+
12
+ def details(
13
+ self,
14
+ user_id: int | None = None,
15
+ direct_reports: bool = False,
16
+ positions: bool = False,
17
+ all: bool = False,
18
+ ) -> UserDetails:
19
+ """Retrieve details of a specific user.
20
+
21
+ Args:
22
+ user_id: The ID of the user (default: the current user ID)
23
+ direct_reports: Whether to include direct reports (default: False)
24
+ positions: Whether to include positions (default: False)
25
+ all: Whether to include both direct reports and positions (default: False)
26
+
27
+ Returns:
28
+ A UserDetails model containing user details
29
+ """
30
+ if user_id is None:
31
+ user_id = self.user_id
32
+
33
+ response = self._client.get(f"users/{user_id}")
34
+ response.raise_for_status()
35
+ data = response.json()
36
+
37
+ user_details_dict = {
38
+ "id": data["Id"],
39
+ "name": data["Name"],
40
+ "image_url": data["ImageUrl"],
41
+ }
42
+
43
+ if direct_reports or all:
44
+ user_details_dict["direct_reports"] = self.direct_reports(user_id)
45
+
46
+ if positions or all:
47
+ user_details_dict["positions"] = self.positions(user_id)
48
+
49
+ return UserDetails(**user_details_dict)
50
+
51
+ def direct_reports(self, user_id: int | None = None) -> list[DirectReport]:
52
+ """Retrieve direct reports of a specific user.
53
+
54
+ Args:
55
+ user_id: The ID of the user (default: the current user ID)
56
+
57
+ Returns:
58
+ A list of DirectReport models containing direct report details
59
+ """
60
+ if user_id is None:
61
+ user_id = self.user_id
62
+
63
+ response = self._client.get(f"users/{user_id}/directreports")
64
+ response.raise_for_status()
65
+ data = response.json()
66
+
67
+ return [
68
+ DirectReport(
69
+ name=report["Name"],
70
+ id=report["Id"],
71
+ image_url=report["ImageUrl"],
72
+ )
73
+ for report in data
74
+ ]
75
+
76
+ def positions(self, user_id: int | None = None) -> list[Position]:
77
+ """Retrieve positions of a specific user.
78
+
79
+ Args:
80
+ user_id: The ID of the user (default: the current user ID)
81
+
82
+ Returns:
83
+ A list of Position models containing position details
84
+ """
85
+ if user_id is None:
86
+ user_id = self.user_id
87
+
88
+ response = self._client.get(f"users/{user_id}/seats")
89
+ response.raise_for_status()
90
+ data = response.json()
91
+
92
+ return [
93
+ Position(
94
+ name=position["Group"]["Position"]["Name"],
95
+ id=position["Group"]["Position"]["Id"],
96
+ )
97
+ for position in data
98
+ ]
99
+
100
+ def search(self, term: str) -> list[UserSearchResult]:
101
+ """Search for users based on a search term.
102
+
103
+ Args:
104
+ term: The search term
105
+
106
+ Returns:
107
+ A list of UserSearchResult models containing search results
108
+ """
109
+ response = self._client.get("search/user", params={"term": term})
110
+ response.raise_for_status()
111
+ data = response.json()
112
+
113
+ return [
114
+ UserSearchResult(
115
+ id=user["Id"],
116
+ name=user["Name"],
117
+ description=user["Description"],
118
+ email=user["Email"],
119
+ organization_id=user["OrganizationId"],
120
+ image_url=user["ImageUrl"],
121
+ )
122
+ for user in data
123
+ ]
124
+
125
+ def all(self, include_placeholders: bool = False) -> list[UserListItem]:
126
+ """Retrieve all users in the system.
127
+
128
+ Args:
129
+ include_placeholders: Whether to include placeholder users (default: False)
130
+
131
+ Returns:
132
+ A list of UserListItem models containing user details
133
+ """
134
+ response = self._client.get("search/all", params={"term": "%"})
135
+ response.raise_for_status()
136
+ users = response.json()
137
+
138
+ filtered_users = [
139
+ user
140
+ for user in users
141
+ if user["ResultType"] == "User"
142
+ and (include_placeholders or user["ImageUrl"] != "/i/userplaceholder")
143
+ ]
144
+
145
+ return [
146
+ UserListItem(
147
+ id=user["Id"],
148
+ name=user["Name"],
149
+ email=user["Email"],
150
+ position=user["Description"],
151
+ image_url=user["ImageUrl"],
152
+ )
153
+ for user in filtered_users
154
+ ]
bloomy/py.typed ADDED
File without changes
@@ -0,0 +1 @@
1
+ """Utility modules for the Bloomy SDK."""
@@ -0,0 +1,43 @@
1
+ """Base class for API operations."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING
6
+
7
+ if TYPE_CHECKING:
8
+ import httpx
9
+
10
+
11
+ class BaseOperations:
12
+ """Base class for all API operation classes."""
13
+
14
+ def __init__(self, client: httpx.Client) -> None:
15
+ """Initialize the operations class.
16
+
17
+ Args:
18
+ client: The HTTP client to use for API requests.
19
+ """
20
+ self._client = client
21
+ self._user_id: int | None = None
22
+
23
+ @property
24
+ def user_id(self) -> int:
25
+ """Get the current user's ID, fetching it if needed.
26
+
27
+ Returns:
28
+ The user ID of the authenticated user.
29
+ """
30
+ if self._user_id is None:
31
+ self._user_id = self._get_default_user_id()
32
+ return self._user_id
33
+
34
+ def _get_default_user_id(self) -> int:
35
+ """Fetch the default user ID from the API.
36
+
37
+ Returns:
38
+ The user ID of the authenticated user.
39
+ """
40
+ response = self._client.get("users/mine")
41
+ response.raise_for_status()
42
+ data = response.json()
43
+ return data["Id"]
@@ -0,0 +1,253 @@
1
+ Metadata-Version: 2.4
2
+ Name: bloomy-python
3
+ Version: 0.12.1
4
+ Summary: Python SDK for Bloom Growth API
5
+ Author-email: Franccesco Orozco <franccesco@codingdose.info>
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.12
8
+ Requires-Dist: httpx>=0.27.0
9
+ Requires-Dist: pydantic>=2.0.0
10
+ Requires-Dist: pyyaml>=6.0
11
+ Requires-Dist: typing-extensions>=4.0.0
12
+ Provides-Extra: dev
13
+ Requires-Dist: pyright>=1.1.0; extra == 'dev'
14
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
15
+ Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
16
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
17
+ Requires-Dist: ruff>=0.5.0; extra == 'dev'
18
+ Description-Content-Type: text/markdown
19
+
20
+ # Bloomy - Python SDK for Bloom Growth API
21
+
22
+ ![Python Version](https://img.shields.io/badge/python-3.12+-blue.svg)
23
+ [![Deploy Documentation](https://github.com/franccesco/bloomy-python/actions/workflows/docs.yml/badge.svg)](https://github.com/franccesco/bloomy-python/actions/workflows/docs.yml)
24
+
25
+ A Python SDK for interacting with the Bloom Growth API, providing easy access to users, meetings, todos, goals, scorecards, issues, and headlines.
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ pip install bloomy-python
31
+ ```
32
+
33
+ ## Quick Start
34
+
35
+ ```python
36
+ from bloomy import Client
37
+
38
+ # Initialize the client with your API key
39
+ client = Client(api_key="your-api-key-here")
40
+
41
+ # Or use environment variable BG_API_KEY
42
+ client = Client()
43
+
44
+ # Or configure API key with username and password
45
+ from bloomy import Configuration
46
+
47
+ config = Configuration()
48
+ config.configure_api_key("username", "password", store_key=True)
49
+ client = Client()
50
+ ```
51
+
52
+ ## Features
53
+
54
+ ### Users
55
+
56
+ ```python
57
+ # Get current user details
58
+ user = client.user.details()
59
+
60
+ # Get user with direct reports and positions
61
+ user = client.user.details(user_id=123, all=True)
62
+
63
+ # Search users
64
+ results = client.user.search("john")
65
+
66
+ # Get all users
67
+ users = client.user.all()
68
+ ```
69
+
70
+ ### Meetings
71
+
72
+ ```python
73
+ # List meetings
74
+ meetings = client.meeting.list()
75
+
76
+ # Get meeting details
77
+ meeting = client.meeting.details(meeting_id=123)
78
+
79
+ # Create a meeting
80
+ new_meeting = client.meeting.create(
81
+ title="Weekly Team Meeting",
82
+ attendees=[456, 789]
83
+ )
84
+
85
+ # Delete a meeting
86
+ client.meeting.delete(meeting_id=123)
87
+ ```
88
+
89
+ ### Todos
90
+
91
+ ```python
92
+ # List todos for current user
93
+ todos = client.todo.list()
94
+
95
+ # Create a todo
96
+ new_todo = client.todo.create(
97
+ title="Complete project proposal",
98
+ meeting_id=123,
99
+ due_date="2024-12-31"
100
+ )
101
+
102
+ # Complete a todo
103
+ client.todo.complete(todo_id=456)
104
+
105
+ # Update a todo
106
+ client.todo.update(
107
+ todo_id=456,
108
+ title="Updated title",
109
+ due_date="2024-12-25"
110
+ )
111
+ ```
112
+
113
+ ### Goals (Rocks)
114
+
115
+ ```python
116
+ # List goals
117
+ goals = client.goal.list()
118
+
119
+ # Create a goal
120
+ new_goal = client.goal.create(
121
+ title="Increase sales by 20%",
122
+ meeting_id=123,
123
+ user_id=456
124
+ )
125
+
126
+ # Update goal status
127
+ client.goal.update(goal_id=789, status="on") # on, off, or complete
128
+
129
+ # Archive a goal
130
+ client.goal.archive(goal_id=789)
131
+ ```
132
+
133
+ ### Scorecard
134
+
135
+ ```python
136
+ # Get current week
137
+ week = client.scorecard.current_week()
138
+
139
+ # List scorecard items
140
+ scorecards = client.scorecard.list(meeting_id=123)
141
+
142
+ # Update a score
143
+ client.scorecard.score(measurable_id=456, score=95.5)
144
+ ```
145
+
146
+ ### Issues
147
+
148
+ ```python
149
+ # List issues
150
+ issues = client.issue.list()
151
+
152
+ # Create an issue
153
+ new_issue = client.issue.create(
154
+ meeting_id=123,
155
+ title="Server performance degradation"
156
+ )
157
+
158
+ # Solve an issue
159
+ client.issue.solve(issue_id=456)
160
+ ```
161
+
162
+ ### Headlines
163
+
164
+ ```python
165
+ # List headlines
166
+ headlines = client.headline.list(meeting_id=123)
167
+
168
+ # Create a headline
169
+ new_headline = client.headline.create(
170
+ meeting_id=123,
171
+ title="Product launch successful",
172
+ notes="Exceeded targets by 15%"
173
+ )
174
+
175
+ # Update a headline
176
+ client.headline.update(headline_id=456, title="Updated headline")
177
+
178
+ # Delete a headline
179
+ client.headline.delete(headline_id=456)
180
+ ```
181
+
182
+ ## Configuration
183
+
184
+ The SDK supports multiple ways to provide your API key:
185
+
186
+ 1. **Direct initialization**: Pass the API key when creating the client
187
+ 2. **Environment variable**: Set `BG_API_KEY` in your environment
188
+ 3. **Configuration file**: Store the API key in `~/.bloomy/config.yaml`
189
+ 4. **Dynamic configuration**: Use username/password to fetch and store the API key
190
+
191
+ ```python
192
+ # Using configuration file
193
+ config = Configuration()
194
+ config.configure_api_key("username", "password", store_key=True)
195
+ ```
196
+
197
+ ## Error Handling
198
+
199
+ The SDK raises specific exceptions for different error scenarios:
200
+
201
+ ```python
202
+ from bloomy.exceptions import BloomyError, ConfigurationError, AuthenticationError, APIError
203
+
204
+ try:
205
+ client.user.details()
206
+ except AuthenticationError:
207
+ print("Invalid API key")
208
+ except APIError as e:
209
+ print(f"API error: {e.message}, Status: {e.status_code}")
210
+ except BloomyError as e:
211
+ print(f"General error: {e}")
212
+ ```
213
+
214
+ ## Development
215
+
216
+ This SDK uses:
217
+ - **uv** for package management
218
+ - **ruff** for formatting and linting
219
+ - **pyright** for type checking
220
+ - **pytest** for testing
221
+
222
+ To set up the development environment:
223
+
224
+ ```bash
225
+ # Install uv
226
+ curl -LsSf https://astral.sh/uv/install.sh | sh
227
+
228
+ # Install dependencies
229
+ uv sync --all-extras
230
+
231
+ # Run tests
232
+ uv run pytest
233
+
234
+ # Format code
235
+ uv run ruff format .
236
+
237
+ # Run linting
238
+ uv run ruff check . --fix
239
+
240
+ # Type checking
241
+ uv run pyright
242
+ ```
243
+
244
+ ## Requirements
245
+
246
+ - Python 3.12+
247
+ - httpx
248
+ - pyyaml
249
+ - pydantic
250
+
251
+ ## License
252
+
253
+ This project is licensed under the MIT License.
@@ -0,0 +1,20 @@
1
+ bloomy/__init__.py,sha256=a-cxyRFonxVlFqgWF8_TzjKmeI-G0M8wHj9Q502pb_Q,1523
2
+ bloomy/client.py,sha256=Mm13Fd21iJjckbb3dsIgyDV6eNgnnGTRJDCi0hI3X2Y,3106
3
+ bloomy/configuration.py,sha256=cX4rsTvNGk9Gc25ppMFMDVMTn7eMin3XzIksoNZ-6aE,4219
4
+ bloomy/exceptions.py,sha256=UfsY8ew2xlW-yvckzIHVYe1xYmas2LHdushQyDe3uQs,577
5
+ bloomy/models.py,sha256=QYmW6oiINf5nYgaQkNcSdxJzBAigcV4tLQ7uHpkXTh8,9540
6
+ bloomy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ bloomy/operations/__init__.py,sha256=yCZ6PD_EIYpEKEC8_SKFvTyaE7D3pUc3nyidkNoKNSU,487
8
+ bloomy/operations/goals.py,sha256=TjiRpBFFIJdwUou7rfeSWshnlYRHxDoO3qnug-zCeAM,8535
9
+ bloomy/operations/headlines.py,sha256=J9R5E7HVH-Tc6DRWg-qqv-D2LHIwH_5sh3L0vgv4_Pw,6032
10
+ bloomy/operations/issues.py,sha256=MmPLD_GkY9dAUvxymtVGlZrn3PYsT-Y8L61v_KeMK80,5745
11
+ bloomy/operations/meetings.py,sha256=yyX9IWtQf9pNrSll--4yxLRs4HACrEk-cd7drFCWJcE,9816
12
+ bloomy/operations/scorecard.py,sha256=7v2kffJoTE2iVJGPU9jXh4vK4rNT42SU89JitVg4dn8,5067
13
+ bloomy/operations/todos.py,sha256=kZyDYHRK4wZwEKqZZ1tZknv4S6adQx6shUalhi3Xogk,6724
14
+ bloomy/operations/users.py,sha256=lU2eDVLOiTiBqGilsV-Hrv4-M3gArhUp6qUyr1Mq6q4,4742
15
+ bloomy/utils/__init__.py,sha256=7nefIecEH5MHXusORshtHbhl7YZUiPFoLiDAAMvtu2U,42
16
+ bloomy/utils/base_operations.py,sha256=l14mYgyf4oj_WrMi0xhi8QdwaFTI6_9Oew6NvyIwCOQ,1102
17
+ bloomy_python-0.12.1.dist-info/METADATA,sha256=k5syUF5iyskl8WjRW4ZvwKwaEfuTxEu2GDyb8VkCJAU,5232
18
+ bloomy_python-0.12.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
19
+ bloomy_python-0.12.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
20
+ bloomy_python-0.12.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -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 [yyyy] [name of copyright owner]
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.