pactown 0.1.4__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,308 @@
1
+ Metadata-Version: 2.4
2
+ Name: pactown
3
+ Version: 0.1.4
4
+ Summary: Decentralized Service Ecosystem Orchestrator - Build interconnected microservices from Markdown using markpact
5
+ Project-URL: Homepage, https://github.com/wronai/pactown
6
+ Project-URL: Repository, https://github.com/wronai/pactown
7
+ Project-URL: Issues, https://github.com/wronai/pactown/issues
8
+ Author: wronai
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ Keywords: decentralized,ecosystem,markdown,markpact,microservices,orchestrator,sandbox
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Software Development :: Build Tools
22
+ Classifier: Topic :: System :: Distributed Computing
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: click>=8.0
25
+ Requires-Dist: fastapi>=0.100.0
26
+ Requires-Dist: httpx>=0.24.0
27
+ Requires-Dist: markpact>=0.1.10
28
+ Requires-Dist: pydantic>=2.0
29
+ Requires-Dist: pyyaml>=6.0
30
+ Requires-Dist: rich>=13.0
31
+ Requires-Dist: uvicorn>=0.20.0
32
+ Requires-Dist: watchfiles>=0.20.0
33
+ Provides-Extra: dev
34
+ Requires-Dist: build; extra == 'dev'
35
+ Requires-Dist: bump2version>=1.0; extra == 'dev'
36
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
37
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
38
+ Requires-Dist: pytest>=7.0; extra == 'dev'
39
+ Requires-Dist: ruff>=0.1; extra == 'dev'
40
+ Requires-Dist: twine; extra == 'dev'
41
+ Description-Content-Type: text/markdown
42
+
43
+ ![img.png](img.png)
44
+
45
+ # Pactown 🏘️
46
+
47
+ **Decentralized Service Ecosystem Orchestrator** – Build interconnected microservices from Markdown using [markpact](https://github.com/wronai/markpact).
48
+
49
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
50
+ [![License](https://img.shields.io/badge/license-Apache%202.0-green.svg)](LICENSE)
51
+
52
+ ## Overview
53
+
54
+ Pactown enables you to compose multiple independent markpact projects into a unified, decentralized service ecosystem. Each service is defined in its own `README.md`, runs in its own sandbox, and communicates with other services through well-defined interfaces.
55
+
56
+ ```
57
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
58
+ β”‚ Pactown Ecosystem β”‚
59
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
60
+ β”‚ β”‚
61
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
62
+ β”‚ β”‚ Web │───▢│ API │───▢│ Database β”‚ β”‚ CLI β”‚ β”‚
63
+ β”‚ β”‚ :8002 β”‚ β”‚ :8001 β”‚ β”‚ :8003 β”‚ β”‚ shell β”‚ β”‚
64
+ β”‚ β”‚ React β”‚ β”‚ FastAPI β”‚ β”‚ Postgres β”‚ β”‚ Python β”‚ β”‚
65
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
66
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
67
+ β”‚ β–Ό β–Ό β–Ό β–Ό β”‚
68
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
69
+ β”‚ β”‚ markpact sandboxes (isolated) β”‚ β”‚
70
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
71
+ β”‚ β”‚
72
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
73
+ ```
74
+
75
+ ## Key Features
76
+
77
+ - **πŸ”— Service Composition** – Combine multiple markpact READMEs into one ecosystem
78
+ - **πŸ“¦ Local Registry** – Store and share markpact artifacts across projects
79
+ - **πŸ”„ Dependency Resolution** – Automatic startup order based on service dependencies
80
+ - **πŸ₯ Health Checks** – Monitor service health with configurable endpoints
81
+ - **🌐 Multi-Language** – Mix Python, Node.js, Go, Rust in one ecosystem
82
+ - **πŸ”’ Isolated Sandboxes** – Each service runs in its own environment
83
+ - **πŸ”Œ Dynamic Ports** – Automatic port allocation when preferred ports are busy
84
+ - **πŸ” Service Discovery** – Name-based service lookup, no hardcoded URLs
85
+ - **⚑ Config Generator** – Auto-generate config from folder of READMEs
86
+
87
+ ## Documentation
88
+
89
+ | Document | Description |
90
+ |----------|-------------|
91
+ | [Specification](docs/SPECIFICATION.md) | Architecture and design |
92
+ | [Configuration](docs/CONFIGURATION.md) | YAML config reference |
93
+ | [Network](docs/NETWORK.md) | Dynamic ports & service discovery |
94
+ | [Generator](docs/GENERATOR.md) | Auto-generate configs |
95
+
96
+ ### Source Code Reference
97
+
98
+ | Module | Description |
99
+ |--------|-------------|
100
+ | [`config.py`](src/pactown/config.py) | Configuration models |
101
+ | [`orchestrator.py`](src/pactown/orchestrator.py) | Service lifecycle management |
102
+ | [`resolver.py`](src/pactown/resolver.py) | Dependency resolution |
103
+ | [`network.py`](src/pactown/network.py) | Port allocation & discovery |
104
+ | [`generator.py`](src/pactown/generator.py) | Config file generator |
105
+ | [`registry/`](src/pactown/registry/) | Local artifact registry |
106
+
107
+ ## Installation
108
+
109
+ ```bash
110
+ pip install pactown
111
+ ```
112
+
113
+ Or install from source:
114
+
115
+ ```bash
116
+ git clone https://github.com/wronai/pactown
117
+ cd pactown
118
+ make install
119
+ ```
120
+
121
+ ## Quick Start
122
+
123
+ ### 1. Create ecosystem configuration
124
+
125
+ ```yaml
126
+ # saas.pactown.yaml
127
+ name: my-saas
128
+ version: 0.1.0
129
+
130
+ services:
131
+ api:
132
+ readme: services/api/README.md
133
+ port: 8001
134
+ health_check: /health
135
+
136
+ web:
137
+ readme: services/web/README.md
138
+ port: 8002
139
+ depends_on:
140
+ - name: api
141
+ endpoint: http://localhost:8001
142
+ ```
143
+
144
+ ### 2. Create service READMEs
145
+
146
+ Each service is a standard markpact README:
147
+
148
+ ```markdown
149
+ # API Service
150
+
151
+ REST API for the application.
152
+
153
+ ---
154
+
155
+ \`\`\`markpact:deps python
156
+ fastapi
157
+ uvicorn
158
+ \`\`\`
159
+
160
+ \`\`\`markpact:file python path=main.py
161
+ from fastapi import FastAPI
162
+ app = FastAPI()
163
+
164
+ @app.get("/health")
165
+ def health():
166
+ return {"status": "ok"}
167
+ \`\`\`
168
+
169
+ \`\`\`markpact:run python
170
+ uvicorn main:app --port ${MARKPACT_PORT:-8001}
171
+ \`\`\`
172
+ ```
173
+
174
+ ### 3. Start the ecosystem
175
+
176
+ ```bash
177
+ pactown up saas.pactown.yaml
178
+ ```
179
+
180
+
181
+
182
+ ```bash
183
+ INFO: 127.0.0.1:57432 - "GET /health HTTP/1.1" 200 OK
184
+ INFO: 127.0.0.1:59272 - "GET /health HTTP/1.1" 200 OK
185
+ 127.0.0.1 - - [15/Jan/2026 14:15:17] "GET /health HTTP/1.1" 200 -
186
+ INFO: 127.0.0.1:59300 - "GET /health HTTP/1.1" 200 OK
187
+ Ecosystem: saas-platform
188
+ ┏━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┓
189
+ ┃ Service ┃ Port ┃ Status ┃ PID ┃ Health ┃
190
+ ┑━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━┩
191
+ β”‚ database β”‚ 10000 β”‚ 🟒 Running β”‚ 534102 β”‚ βœ“ 22ms β”‚
192
+ β”‚ api β”‚ 10001 β”‚ 🟒 Running β”‚ 534419 β”‚ βœ“ 23ms β”‚
193
+ β”‚ web β”‚ 10002 β”‚ 🟒 Running β”‚ 534424 β”‚ βœ“ 29ms β”‚
194
+ β”‚ cli β”‚ 10003 β”‚ πŸ”΄ Stopped β”‚ 534734 β”‚ Process died β”‚
195
+ β”‚ gateway β”‚ 10004 β”‚ 🟒 Running β”‚ 535242 β”‚ βœ“ 23ms β”‚
196
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
197
+
198
+ Press Ctrl+C to stop all services
199
+
200
+ 127.0.0.1 - - [15/Jan/2026 14:15:29] "GET / HTTP/1.1" 200 -
201
+ INFO: 127.0.0.1:42964 - "GET / HTTP/1.1" 200 OK
202
+ INFO: 127.0.0.1:53998 - "GET /health HTTP/1.1" 200 OK
203
+ INFO: 127.0.0.1:54008 - "GET /api/stats HTTP/1.1" 200 OK
204
+ INFO: 127.0.0.1:36100 - "GET /records/users HTTP/1.1" 200 OK
205
+ INFO: 127.0.0.1:54012 - "GET /api/users HTTP/1.1" 200 OK
206
+ ```
207
+ ## Commands
208
+
209
+ | Command | Description |
210
+ |---------|-------------|
211
+ | `pactown up <config>` | Start all services |
212
+ | `pactown down <config>` | Stop all services |
213
+ | `pactown status <config>` | Show service status |
214
+ | `pactown validate <config>` | Validate configuration |
215
+ | `pactown graph <config>` | Show dependency graph |
216
+ | `pactown init` | Initialize new ecosystem |
217
+ | `pactown publish <config>` | Publish to registry |
218
+ | `pactown pull <config>` | Pull dependencies |
219
+
220
+ ## Registry
221
+
222
+ Pactown includes a local registry for sharing markpact artifacts:
223
+
224
+ ```bash
225
+ # Start registry
226
+ pactown-registry --port 8800
227
+
228
+ # Publish artifact
229
+ pactown publish saas.pactown.yaml --registry http://localhost:8800
230
+
231
+ # Pull dependencies
232
+ pactown pull saas.pactown.yaml --registry http://localhost:8800
233
+ ```
234
+
235
+ ### Registry API
236
+
237
+ | Endpoint | Method | Description |
238
+ |----------|--------|-------------|
239
+ | `/v1/artifacts` | GET | List artifacts |
240
+ | `/v1/artifacts/{ns}/{name}` | GET | Get artifact info |
241
+ | `/v1/artifacts/{ns}/{name}/{version}/readme` | GET | Get README content |
242
+ | `/v1/publish` | POST | Publish artifact |
243
+
244
+ ## Configuration Reference
245
+
246
+ ```yaml
247
+ name: ecosystem-name # Required: ecosystem name
248
+ version: 0.1.0 # Semantic version
249
+ description: "" # Optional description
250
+ base_port: 8000 # Starting port for auto-assignment
251
+ sandbox_root: ./.pactown-sandboxes # Sandbox directory
252
+
253
+ registry:
254
+ url: http://localhost:8800
255
+ namespace: default
256
+
257
+ services:
258
+ service-name:
259
+ readme: path/to/README.md # Path to markpact README
260
+ port: 8001 # Service port
261
+ health_check: /health # Health check endpoint
262
+ timeout: 60 # Startup timeout (seconds)
263
+ replicas: 1 # Number of instances
264
+ auto_restart: true # Restart on failure
265
+ env: # Environment variables
266
+ KEY: value
267
+ depends_on: # Dependencies
268
+ - name: other-service
269
+ endpoint: http://localhost:8000
270
+ env_var: OTHER_SERVICE_URL
271
+ ```
272
+
273
+ ## Examples
274
+
275
+ See the `examples/` directory for complete ecosystem examples:
276
+
277
+ - **SaaS Platform** – Web + API + Database + CLI
278
+ - **Microservices** – Multiple language services
279
+ - **Event-Driven** – Services with message queues
280
+
281
+ ## Architecture
282
+
283
+ ```bash
284
+ pactown/
285
+ β”œβ”€β”€ src/pactown/
286
+ β”‚ β”œβ”€β”€ __init__.py # Package exports
287
+ β”‚ β”œβ”€β”€ cli.py # CLI commands
288
+ β”‚ β”œβ”€β”€ config.py # Configuration models
289
+ β”‚ β”œβ”€β”€ orchestrator.py # Service orchestration
290
+ β”‚ β”œβ”€β”€ resolver.py # Dependency resolution
291
+ β”‚ β”œβ”€β”€ sandbox_manager.py # Sandbox management
292
+ β”‚ └── registry/
293
+ β”‚ β”œβ”€β”€ __init__.py
294
+ β”‚ β”œβ”€β”€ server.py # Registry API server
295
+ β”‚ β”œβ”€β”€ client.py # Registry client
296
+ β”‚ └── models.py # Data models
297
+ β”œβ”€β”€ examples/
298
+ β”‚ β”œβ”€β”€ saas-platform/ # Complete SaaS example
299
+ β”‚ └── microservices/ # Microservices example
300
+ β”œβ”€β”€ tests/
301
+ β”œβ”€β”€ Makefile
302
+ β”œβ”€β”€ pyproject.toml
303
+ └── README.md
304
+ ```
305
+
306
+ ## License
307
+
308
+ Apache License 2.0 – see [LICENSE](LICENSE) for details.
@@ -0,0 +1,24 @@
1
+ pactown/__init__.py,sha256=w9Wv0Ssx_yWabMDy1JJh9oa4Vk7Uj_gDQvdo3cOXbeo,640
2
+ pactown/cli.py,sha256=P7h2-iigtV5JHN6xX9vdKd0nmbr8GFNdXavKYwiUbHs,12431
3
+ pactown/config.py,sha256=4i0A_9AtRCy3khV4jSgIos5YnVdkALWpL27NlbKpkNA,5393
4
+ pactown/generator.py,sha256=TBC3ElDNXo-vDj6n4nDGRynVNo1rdfeMp1hYzHjfOkI,5936
5
+ pactown/network.py,sha256=JRr6zcn2jsr2c-rIDh5mTutPau28Y-JkROS5VeHB1D4,8013
6
+ pactown/orchestrator.py,sha256=um2EcdNBT7UYG16T2MO-JVaDPGn3uJ67UkofLIHDy8Q,16610
7
+ pactown/parallel.py,sha256=GpnAijFFXcqvz08QgUEpJdDoeRMQ-Fq_VxrbRmyNeqo,8362
8
+ pactown/resolver.py,sha256=CXss7EgjkMk2J_6wUP_Dx6m4BYTbFD7dMhMfXwpf1Do,5839
9
+ pactown/sandbox_manager.py,sha256=SrAsF6E6bM2-javMhSoLwKHiOtq6VnD3tIa7Nwlktkc,11086
10
+ pactown/deploy/__init__.py,sha256=GP-Bon4XtUsvNpvVShlJ7cxV8leOv2Pk2bhcHxMpPBs,473
11
+ pactown/deploy/base.py,sha256=8rIyq4wl1QSXeQqWA9DTvr9d70dae2WhA4BXHtgm8fg,7535
12
+ pactown/deploy/compose.py,sha256=eBDn_8QPUpnBQOw6S7fA-xS-bzYAEd9XKuKWDwz2kQ4,11427
13
+ pactown/deploy/docker.py,sha256=5MQOdH78KnyrNRq4sCPNIA8cjifU8uHT7gbkQA-zosA,9633
14
+ pactown/deploy/kubernetes.py,sha256=1z5HVhGc1K-JoNpIp2mu5OU3ufz8Fx4BH2clQjutGWI,14826
15
+ pactown/deploy/podman.py,sha256=U8cTSTKfiHSCBbQvqhicYXO3XJpdu4f2kURo62Xp2sA,12574
16
+ pactown/registry/__init__.py,sha256=_OPop2RWt8cjdsV6EYCIXEkuxS4PjWm72gMiwUkCE-U,278
17
+ pactown/registry/client.py,sha256=EoD8PTUPmJeqSe1OLuFO8M_XbEyFox2L9E3oKO2SAy4,7933
18
+ pactown/registry/models.py,sha256=wlL9Jsl60Gf27pUe8ej-oWSxRBlFOReLsr9W7joKiPI,5293
19
+ pactown/registry/server.py,sha256=chLI1EUhlayeoaJzMnmHyjvsSU0y2JKwOLJnle0DyuQ,6303
20
+ pactown-0.1.4.dist-info/METADATA,sha256=tXziMYrGKzF8_DXr31aZqfUOpH4g_7zqoJPe39tgDXA,11891
21
+ pactown-0.1.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
22
+ pactown-0.1.4.dist-info/entry_points.txt,sha256=v8Wxhuh8J_-OT6Y5FjE48dzbRGXUiznz0kUxSk5gtM0,93
23
+ pactown-0.1.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
24
+ pactown-0.1.4.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ pactown = pactown.cli:main
3
+ pactown-registry = pactown.registry.server:main
@@ -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.