statezero 0.1.0b1__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.

Potentially problematic release.


This version of statezero might be problematic. Click here for more details.

Files changed (51) hide show
  1. statezero-0.1.0b1/PKG-INFO +252 -0
  2. statezero-0.1.0b1/README.md +222 -0
  3. statezero-0.1.0b1/license.md +117 -0
  4. statezero-0.1.0b1/pyproject.toml +26 -0
  5. statezero-0.1.0b1/requirements.txt +18 -0
  6. statezero-0.1.0b1/setup.cfg +4 -0
  7. statezero-0.1.0b1/statezero/__init__.py +0 -0
  8. statezero-0.1.0b1/statezero/adaptors/__init__.py +0 -0
  9. statezero-0.1.0b1/statezero/adaptors/django/__init__.py +0 -0
  10. statezero-0.1.0b1/statezero/adaptors/django/apps.py +97 -0
  11. statezero-0.1.0b1/statezero/adaptors/django/config.py +99 -0
  12. statezero-0.1.0b1/statezero/adaptors/django/context_manager.py +12 -0
  13. statezero-0.1.0b1/statezero/adaptors/django/event_emitters.py +78 -0
  14. statezero-0.1.0b1/statezero/adaptors/django/exception_handler.py +98 -0
  15. statezero-0.1.0b1/statezero/adaptors/django/extensions/__init__.py +0 -0
  16. statezero-0.1.0b1/statezero/adaptors/django/extensions/custom_field_serializers/__init__.py +0 -0
  17. statezero-0.1.0b1/statezero/adaptors/django/extensions/custom_field_serializers/file_fields.py +141 -0
  18. statezero-0.1.0b1/statezero/adaptors/django/extensions/custom_field_serializers/money_field.py +75 -0
  19. statezero-0.1.0b1/statezero/adaptors/django/f_handler.py +312 -0
  20. statezero-0.1.0b1/statezero/adaptors/django/helpers.py +153 -0
  21. statezero-0.1.0b1/statezero/adaptors/django/middleware.py +10 -0
  22. statezero-0.1.0b1/statezero/adaptors/django/migrations/0001_initial.py +33 -0
  23. statezero-0.1.0b1/statezero/adaptors/django/migrations/0002_delete_modelviewsubscription.py +16 -0
  24. statezero-0.1.0b1/statezero/adaptors/django/migrations/__init__.py +0 -0
  25. statezero-0.1.0b1/statezero/adaptors/django/orm.py +915 -0
  26. statezero-0.1.0b1/statezero/adaptors/django/permissions.py +252 -0
  27. statezero-0.1.0b1/statezero/adaptors/django/query_optimizer.py +772 -0
  28. statezero-0.1.0b1/statezero/adaptors/django/schemas.py +324 -0
  29. statezero-0.1.0b1/statezero/adaptors/django/search_providers/__init__.py +0 -0
  30. statezero-0.1.0b1/statezero/adaptors/django/search_providers/basic_search.py +24 -0
  31. statezero-0.1.0b1/statezero/adaptors/django/search_providers/postgres_search.py +51 -0
  32. statezero-0.1.0b1/statezero/adaptors/django/serializers.py +554 -0
  33. statezero-0.1.0b1/statezero/adaptors/django/urls.py +14 -0
  34. statezero-0.1.0b1/statezero/adaptors/django/views.py +336 -0
  35. statezero-0.1.0b1/statezero/core/__init__.py +34 -0
  36. statezero-0.1.0b1/statezero/core/ast_parser.py +821 -0
  37. statezero-0.1.0b1/statezero/core/ast_validator.py +266 -0
  38. statezero-0.1.0b1/statezero/core/classes.py +167 -0
  39. statezero-0.1.0b1/statezero/core/config.py +263 -0
  40. statezero-0.1.0b1/statezero/core/context_storage.py +4 -0
  41. statezero-0.1.0b1/statezero/core/event_bus.py +175 -0
  42. statezero-0.1.0b1/statezero/core/event_emitters.py +60 -0
  43. statezero-0.1.0b1/statezero/core/exceptions.py +106 -0
  44. statezero-0.1.0b1/statezero/core/interfaces.py +492 -0
  45. statezero-0.1.0b1/statezero/core/process_request.py +184 -0
  46. statezero-0.1.0b1/statezero/core/types.py +63 -0
  47. statezero-0.1.0b1/statezero.egg-info/PKG-INFO +252 -0
  48. statezero-0.1.0b1/statezero.egg-info/SOURCES.txt +49 -0
  49. statezero-0.1.0b1/statezero.egg-info/dependency_links.txt +1 -0
  50. statezero-0.1.0b1/statezero.egg-info/requires.txt +18 -0
  51. statezero-0.1.0b1/statezero.egg-info/top_level.txt +1 -0
@@ -0,0 +1,252 @@
1
+ Metadata-Version: 2.4
2
+ Name: statezero
3
+ Version: 0.1.0b1
4
+ Summary: A short description of your package
5
+ Author-email: Robert Herring <robert.herring@statezero.dev>
6
+ Project-URL: homepage, https://www.statezero.dev
7
+ Project-URL: repository, https://github.com/state-zero/statezero
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ License-File: license.md
11
+ Requires-Dist: Django<5.2.0,>=5.1.0
12
+ Requires-Dist: django-money<3.5.0,>=3.4.0
13
+ Requires-Dist: djangorestframework<3.16.0,>=3.15.0
14
+ Requires-Dist: fakeredis<3.0.0,>=2.27.0
15
+ Requires-Dist: fastapi<0.116.0,>=0.115.0
16
+ Requires-Dist: hypothesis<7.0.0,>=6.108.0
17
+ Requires-Dist: jsonschema<5.0.0,>=4.23.0
18
+ Requires-Dist: networkx<4.0.0,>=3.4.0
19
+ Requires-Dist: openapi-spec-validator<0.8.0,>=0.7.0
20
+ Requires-Dist: orjson<4.0.0,>=3.10.0
21
+ Requires-Dist: pusher<4.0.0,>=3.3.0
22
+ Requires-Dist: pydantic<3.0.0,>=2.10.0
23
+ Requires-Dist: rich<14.0.0,>=13.9.0
24
+ Requires-Dist: psycopg2<3.0.0,>=2.9.0
25
+ Requires-Dist: django-redis<6.0.0,>=5.4.0
26
+ Requires-Dist: django-cors-headers<5.0.0,>=4.7.0
27
+ Requires-Dist: django-zen-queries<3.0.0,>=2.1.0
28
+ Requires-Dist: cytoolz<2.0.0,>=1.0.0
29
+ Dynamic: license-file
30
+
31
+ # StateZero
32
+
33
+ **The Real-Time Django to JavaScript Data Bridge**
34
+
35
+ Connect your Django backend to React/Vue frontends with 90% less code. No repetitive serializers, views, or tight coupling.
36
+
37
+ ## Why StateZero?
38
+
39
+ **The Problem:** Building modern web apps means writing the same CRUD logic three times - Django models, REST API serializers/views, and frontend data fetching. This creates:
40
+
41
+ - 80% of app complexity in data shuttling
42
+ - 50% of your codebase devoted to API glue
43
+ - Hundreds of hours maintaining sync between frontend and backend
44
+
45
+ **The Solution:** StateZero eliminates the API layer entirely. Write Django models once, query them directly from JavaScript with the same ORM syntax you already know.
46
+
47
+ ## Features
48
+
49
+ ✨ **Django ORM Syntax in JavaScript** - Use `.filter()`, `.exclude()`, `.orderBy()` exactly like Django
50
+ ⚡ **Real-Time Updates** - UI automatically updates when backend data changes
51
+ 🔒 **Django Permissions** - Your existing permission classes work on the frontend
52
+ 📝 **Auto-Generated TypeScript** - Perfect type safety from your Django models
53
+ 🚀 **Optimistic Updates** - UI feels instant, syncs in background
54
+ 🔗 **Deep Relationships** - Traverse foreign keys naturally: `todo.category.name`
55
+
56
+ ## Quick Example
57
+
58
+ ### 1. Register Your Django Model
59
+
60
+ ```python
61
+ # todos/crud.py
62
+ from statezero.adaptors.django.config import registry
63
+ from .models import Todo
64
+
65
+ registry.register(Todo)
66
+ ```
67
+
68
+ ### 2. Query From JavaScript Like Django
69
+
70
+ ```javascript
71
+ // Get all incomplete todos, ordered by priority
72
+ const todos = Todo.objects
73
+ .filter({ is_completed: false })
74
+ .orderBy("-priority", "created_at");
75
+
76
+ // Complex queries with relationships
77
+ const urgentWorkTodos = Todo.objects.filter({
78
+ priority: "high",
79
+ category__name: "Work",
80
+ due_date__lt: "2024-12-31",
81
+ });
82
+
83
+ // Django-style field lookups
84
+ const searchResults = Todo.objects.filter({
85
+ title__icontains: "meeting",
86
+ created_by__email__endswith: "@company.com",
87
+ });
88
+ ```
89
+
90
+ ### 3. Real-Time Updates in One Line
91
+
92
+ ```vue
93
+ <script setup>
94
+ import { useQueryset } from "@statezero/core/vue";
95
+
96
+ // This list automatically updates when todos change
97
+ const todos = useQueryset(() => Todo.objects.filter({ is_completed: false }));
98
+ </script>
99
+
100
+ <template>
101
+ <div v-for="todo in todos.fetch({ limit: 10 })" :key="todo.id">
102
+ {{ todo.title }}
103
+ </div>
104
+ </template>
105
+ ```
106
+
107
+ ## The Magic: Optimistic vs Confirmed
108
+
109
+ ### Optimistic (Instant UI)
110
+
111
+ ```javascript
112
+ // UI updates immediately, syncs later
113
+ const newTodo = Todo.objects.create({
114
+ title: "Buy groceries",
115
+ priority: "medium",
116
+ });
117
+
118
+ // Edit optimistically
119
+ todo.title = "Buy organic groceries";
120
+ todo.save(); // UI updates instantly
121
+
122
+ // Delete optimistically
123
+ todo.delete(); // Gone from UI immediately
124
+ ```
125
+
126
+ ### Confirmed (Wait for Server)
127
+
128
+ ```javascript
129
+ // Wait for server confirmation
130
+ const confirmedTodo = await Todo.objects.create({
131
+ title: "Important meeting",
132
+ });
133
+
134
+ // Wait for update confirmation
135
+ await todo.save();
136
+
137
+ // Wait for deletion confirmation
138
+ await todo.delete();
139
+ ```
140
+
141
+ ## Advanced Django ORM Features
142
+
143
+ ### Complex Filtering with Q Objects
144
+
145
+ ```javascript
146
+ import { Q } from "@statezero/core";
147
+
148
+ // Multiple OR conditions
149
+ const urgentTodos = Todo.objects.filter({
150
+ Q: [Q("OR", { priority: "high" }, { due_date__lt: "tomorrow" })],
151
+ });
152
+
153
+ // Nested conditions
154
+ const myImportantTodos = Todo.objects.filter({
155
+ Q: [
156
+ Q(
157
+ "AND",
158
+ { assigned_to: currentUser.id },
159
+ Q("OR", { priority: "high" }, { is_flagged: true })
160
+ ),
161
+ ],
162
+ });
163
+ ```
164
+
165
+ ### Aggregation & F Expressions
166
+
167
+ ```javascript
168
+ import { F } from "@statezero/core";
169
+
170
+ // Count, sum, average like Django
171
+ const todoCount = await Todo.objects.count();
172
+ const avgPriority = await Todo.objects.avg("priority_score");
173
+
174
+ // Database-level calculations
175
+ await Product.objects.update({
176
+ view_count: F("view_count + 1"),
177
+ popularity: F("likes * 2 + shares"),
178
+ });
179
+ ```
180
+
181
+ ### Get or Create
182
+
183
+ ```javascript
184
+ // Just like Django's get_or_create
185
+ const [todo, created] = await Todo.objects.getOrCreate(
186
+ { title: "Daily standup" },
187
+ { defaults: { priority: "medium", category: workCategory } }
188
+ );
189
+ ```
190
+
191
+ ### Relationship Traversal
192
+
193
+ ```javascript
194
+ // Access related objects naturally
195
+ const todo = await Todo.objects.get({ id: 1 });
196
+ console.log(todo.category.name); // Foreign key
197
+ console.log(todo.created_by.username); // Another FK
198
+ console.log(todo.comments.length); // Reverse FK
199
+
200
+ // Filter by relationships
201
+ const workTodos = Todo.objects.filter({
202
+ category__name: "Work",
203
+ assigned_to__department__name: "Engineering",
204
+ });
205
+ ```
206
+
207
+ ## Installation
208
+
209
+ ### Backend
210
+
211
+ ```bash
212
+ pip install git+https://github.com/state-zero/statezero
213
+ pip install django-cors-headers pusher
214
+ ```
215
+
216
+ ### Frontend
217
+
218
+ ```bash
219
+ npm install https://github.com/state-zero/statezero-client
220
+ ```
221
+
222
+ ### Generate TypeScript Models
223
+
224
+ ```bash
225
+ npx statezero sync-models
226
+ ```
227
+
228
+ ## Why Choose StateZero Over...
229
+
230
+ **🆚 HTMX:** Use modern React/Vue with full JavaScript ecosystem while keeping backend simplicity
231
+
232
+ **🆚 Firebase/Supabase:** Keep your Django backend, models, and business logic. No vendor lock-in.
233
+
234
+ **🆚 OpenAPI/GraphQL:** Get real-time updates and Django ORM power, not just basic CRUD
235
+
236
+ **🆚 Traditional REST APIs:** Write 90% less boilerplate. Focus on features, not data plumbing.
237
+
238
+ ## Pricing
239
+
240
+ StateZero uses a no-rugpull license model:
241
+
242
+ - **$0/month** for companies with revenue up to $3M
243
+ - **$75/month** for companies with revenue up to $7.5M
244
+ - **$200/month** for companies with revenue up to $20M
245
+ - **$500/month** for companies with revenue up to $100M
246
+ - **$1,000/month** for companies with revenue above $100M
247
+
248
+ Lock in your rate forever by signing up early. We can't change your fee or cancel your license.
249
+
250
+ ## Get Started
251
+
252
+ Run `pip install git+https://github.com/state-zero/statezero` and `npm install https://github.com/state-zero/statezero-client` to begin.
@@ -0,0 +1,222 @@
1
+ # StateZero
2
+
3
+ **The Real-Time Django to JavaScript Data Bridge**
4
+
5
+ Connect your Django backend to React/Vue frontends with 90% less code. No repetitive serializers, views, or tight coupling.
6
+
7
+ ## Why StateZero?
8
+
9
+ **The Problem:** Building modern web apps means writing the same CRUD logic three times - Django models, REST API serializers/views, and frontend data fetching. This creates:
10
+
11
+ - 80% of app complexity in data shuttling
12
+ - 50% of your codebase devoted to API glue
13
+ - Hundreds of hours maintaining sync between frontend and backend
14
+
15
+ **The Solution:** StateZero eliminates the API layer entirely. Write Django models once, query them directly from JavaScript with the same ORM syntax you already know.
16
+
17
+ ## Features
18
+
19
+ ✨ **Django ORM Syntax in JavaScript** - Use `.filter()`, `.exclude()`, `.orderBy()` exactly like Django
20
+ ⚡ **Real-Time Updates** - UI automatically updates when backend data changes
21
+ 🔒 **Django Permissions** - Your existing permission classes work on the frontend
22
+ 📝 **Auto-Generated TypeScript** - Perfect type safety from your Django models
23
+ 🚀 **Optimistic Updates** - UI feels instant, syncs in background
24
+ 🔗 **Deep Relationships** - Traverse foreign keys naturally: `todo.category.name`
25
+
26
+ ## Quick Example
27
+
28
+ ### 1. Register Your Django Model
29
+
30
+ ```python
31
+ # todos/crud.py
32
+ from statezero.adaptors.django.config import registry
33
+ from .models import Todo
34
+
35
+ registry.register(Todo)
36
+ ```
37
+
38
+ ### 2. Query From JavaScript Like Django
39
+
40
+ ```javascript
41
+ // Get all incomplete todos, ordered by priority
42
+ const todos = Todo.objects
43
+ .filter({ is_completed: false })
44
+ .orderBy("-priority", "created_at");
45
+
46
+ // Complex queries with relationships
47
+ const urgentWorkTodos = Todo.objects.filter({
48
+ priority: "high",
49
+ category__name: "Work",
50
+ due_date__lt: "2024-12-31",
51
+ });
52
+
53
+ // Django-style field lookups
54
+ const searchResults = Todo.objects.filter({
55
+ title__icontains: "meeting",
56
+ created_by__email__endswith: "@company.com",
57
+ });
58
+ ```
59
+
60
+ ### 3. Real-Time Updates in One Line
61
+
62
+ ```vue
63
+ <script setup>
64
+ import { useQueryset } from "@statezero/core/vue";
65
+
66
+ // This list automatically updates when todos change
67
+ const todos = useQueryset(() => Todo.objects.filter({ is_completed: false }));
68
+ </script>
69
+
70
+ <template>
71
+ <div v-for="todo in todos.fetch({ limit: 10 })" :key="todo.id">
72
+ {{ todo.title }}
73
+ </div>
74
+ </template>
75
+ ```
76
+
77
+ ## The Magic: Optimistic vs Confirmed
78
+
79
+ ### Optimistic (Instant UI)
80
+
81
+ ```javascript
82
+ // UI updates immediately, syncs later
83
+ const newTodo = Todo.objects.create({
84
+ title: "Buy groceries",
85
+ priority: "medium",
86
+ });
87
+
88
+ // Edit optimistically
89
+ todo.title = "Buy organic groceries";
90
+ todo.save(); // UI updates instantly
91
+
92
+ // Delete optimistically
93
+ todo.delete(); // Gone from UI immediately
94
+ ```
95
+
96
+ ### Confirmed (Wait for Server)
97
+
98
+ ```javascript
99
+ // Wait for server confirmation
100
+ const confirmedTodo = await Todo.objects.create({
101
+ title: "Important meeting",
102
+ });
103
+
104
+ // Wait for update confirmation
105
+ await todo.save();
106
+
107
+ // Wait for deletion confirmation
108
+ await todo.delete();
109
+ ```
110
+
111
+ ## Advanced Django ORM Features
112
+
113
+ ### Complex Filtering with Q Objects
114
+
115
+ ```javascript
116
+ import { Q } from "@statezero/core";
117
+
118
+ // Multiple OR conditions
119
+ const urgentTodos = Todo.objects.filter({
120
+ Q: [Q("OR", { priority: "high" }, { due_date__lt: "tomorrow" })],
121
+ });
122
+
123
+ // Nested conditions
124
+ const myImportantTodos = Todo.objects.filter({
125
+ Q: [
126
+ Q(
127
+ "AND",
128
+ { assigned_to: currentUser.id },
129
+ Q("OR", { priority: "high" }, { is_flagged: true })
130
+ ),
131
+ ],
132
+ });
133
+ ```
134
+
135
+ ### Aggregation & F Expressions
136
+
137
+ ```javascript
138
+ import { F } from "@statezero/core";
139
+
140
+ // Count, sum, average like Django
141
+ const todoCount = await Todo.objects.count();
142
+ const avgPriority = await Todo.objects.avg("priority_score");
143
+
144
+ // Database-level calculations
145
+ await Product.objects.update({
146
+ view_count: F("view_count + 1"),
147
+ popularity: F("likes * 2 + shares"),
148
+ });
149
+ ```
150
+
151
+ ### Get or Create
152
+
153
+ ```javascript
154
+ // Just like Django's get_or_create
155
+ const [todo, created] = await Todo.objects.getOrCreate(
156
+ { title: "Daily standup" },
157
+ { defaults: { priority: "medium", category: workCategory } }
158
+ );
159
+ ```
160
+
161
+ ### Relationship Traversal
162
+
163
+ ```javascript
164
+ // Access related objects naturally
165
+ const todo = await Todo.objects.get({ id: 1 });
166
+ console.log(todo.category.name); // Foreign key
167
+ console.log(todo.created_by.username); // Another FK
168
+ console.log(todo.comments.length); // Reverse FK
169
+
170
+ // Filter by relationships
171
+ const workTodos = Todo.objects.filter({
172
+ category__name: "Work",
173
+ assigned_to__department__name: "Engineering",
174
+ });
175
+ ```
176
+
177
+ ## Installation
178
+
179
+ ### Backend
180
+
181
+ ```bash
182
+ pip install git+https://github.com/state-zero/statezero
183
+ pip install django-cors-headers pusher
184
+ ```
185
+
186
+ ### Frontend
187
+
188
+ ```bash
189
+ npm install https://github.com/state-zero/statezero-client
190
+ ```
191
+
192
+ ### Generate TypeScript Models
193
+
194
+ ```bash
195
+ npx statezero sync-models
196
+ ```
197
+
198
+ ## Why Choose StateZero Over...
199
+
200
+ **🆚 HTMX:** Use modern React/Vue with full JavaScript ecosystem while keeping backend simplicity
201
+
202
+ **🆚 Firebase/Supabase:** Keep your Django backend, models, and business logic. No vendor lock-in.
203
+
204
+ **🆚 OpenAPI/GraphQL:** Get real-time updates and Django ORM power, not just basic CRUD
205
+
206
+ **🆚 Traditional REST APIs:** Write 90% less boilerplate. Focus on features, not data plumbing.
207
+
208
+ ## Pricing
209
+
210
+ StateZero uses a no-rugpull license model:
211
+
212
+ - **$0/month** for companies with revenue up to $3M
213
+ - **$75/month** for companies with revenue up to $7.5M
214
+ - **$200/month** for companies with revenue up to $20M
215
+ - **$500/month** for companies with revenue up to $100M
216
+ - **$1,000/month** for companies with revenue above $100M
217
+
218
+ Lock in your rate forever by signing up early. We can't change your fee or cancel your license.
219
+
220
+ ## Get Started
221
+
222
+ Run `pip install git+https://github.com/state-zero/statezero` and `npm install https://github.com/state-zero/statezero-client` to begin.
@@ -0,0 +1,117 @@
1
+ # **StateZero License Agreement**
2
+
3
+ _Last Updated: 2025-06-29_
4
+
5
+ ## **1. Copyright and Ownership**
6
+
7
+ 1.1. **StateZero is proprietary software** developed and owned by **Hoza Holdings Pte Ltd** ("Licensor").
8
+ 1.2. **StateZero is not open-source.** All rights not expressly granted in this License are **reserved by the Licensor**.
9
+ 1.3. **Distribution**: StateZero is made available via **PyPI** (Python Package Index), **npm** (Node Package Manager), and **GitHub**.
10
+ 1.4. **Early Release Status**: This is an **early release version** of StateZero designed for community feedback. It is **not considered production ready**. Users are encouraged to provide feedback but should exercise caution when implementing in critical systems.
11
+
12
+ ## **2. Commercial No-Rugpull License**
13
+
14
+ 2.1. **No-Rugpull Guarantee**: StateZero is available under a commercial "no-rugpull" license, which means:
15
+
16
+ - You receive an **irrevocable right** to use StateZero forever for a fixed monthly fee
17
+ - We **cannot change your fee**, other than a fixed CPI (Consumer Price Index) increase that's automatically added each year
18
+ - As long as you pay the fee and don't build a competitive product, the license will continue
19
+ - If we no longer wish to be associated with your use case, we will ask you not to pay the fee, but **your license will remain valid**
20
+
21
+ 2.2. **License Philosophy**: If SaaS is like renting and open-source is like owning, our license is like a **999-year leasehold on fixed rent**. It provides the security you need to build and grow your company around StateZero, while allowing us to maintain and develop StateZero to a high standard.
22
+
23
+ 2.3. **Rate Lock Guarantee**: You lock in the **full rate card for all tiers** at the time you sign up, meaning your fees remain predictable no matter how much your revenue or our pricing changes. To lock in your rates, simply contact us at **robert@statezero.dev**.
24
+
25
+ ## **3. Pricing Structure**
26
+
27
+ 3.1. **Revenue-Based Pricing**:
28
+
29
+ - **$0/month** for companies with revenue up to **$3M**
30
+ - **$75/month** for companies with revenue up to **$7.5M**
31
+ - **$200/month** for companies with revenue up to **$20M**
32
+ - **$1,000/month** for companies with revenue up to **$100M**
33
+ - **$5,000/month** for companies with revenue above **$100M**
34
+
35
+ 3.2. **Free Usage Guarantee**: StateZero will **always remain free** for companies with **annual revenue below $3 million**.
36
+
37
+ 3.3. **Annual CPI Adjustment**: Pricing may be adjusted annually based on the Consumer Price Index, but no other fee changes are permitted once you have locked in your rate.
38
+
39
+ ## **4. Grant of License**
40
+
41
+ 4.1. **Standard Usage License**:
42
+
43
+ - Licensor grants you a **non-exclusive, non-transferable, worldwide license** to download, install, and use StateZero
44
+ - StateZero **may be used** in both **development and production** environments
45
+ - You may **install StateZero** within your organization but **may not provide StateZero as a service to third parties** without explicit written permission
46
+
47
+ 4.2. **Scope and Limitations**:
48
+
49
+ - This License **does not** transfer ownership of StateZero or any intellectual property rights
50
+ - Usage is subject to the pricing structure outlined in Section 3
51
+
52
+ ## **5. LLM Training License**
53
+
54
+ 5.1. **Separate License Required**: Use of StateZero codebase for **Large Language Model (LLM) training purposes** requires a separate license agreement.
55
+
56
+ 5.2. **LLM Training License Fee**: The annual license fee for LLM training usage is **$250,000 per year**.
57
+
58
+ 5.3. **Contact for LLM License**: Organizations requiring LLM training rights must contact **Airhome Sp Zoo** at **robert@statezero.dev** to arrange a separate licensing agreement.
59
+
60
+ ## **6. Restrictions**
61
+
62
+ 6.1. **Prohibited Actions**:
63
+
64
+ - You **may not** modify, reverse engineer, decompile, or disassemble StateZero
65
+ - You **may not** remove, alter, or obscure any **proprietary notices, branding, or license enforcement mechanisms**
66
+ - You **may not** sublicense, resell, or distribute StateZero to any third party **without explicit written permission**
67
+ - You **may not** use StateZero for any illegal, unlawful, or criminal activities under the laws of Singapore or under the laws of the jurisdiction where you are located or operating
68
+ - You **may not** use StateZero to develop or offer **a competing product or service**
69
+ - You **may not** use StateZero to create a cloud-hosted version of our service (similar to services like Heroku, Netlify, AWS, etc.)
70
+ - You **may not** use StateZero for LLM training without the separate license outlined in Section 5
71
+
72
+ ## **7. Payment Terms**
73
+
74
+ 7.1. **Payment Obligations**: Companies exceeding the free tier revenue threshold must pay the applicable monthly fee as outlined in Section 3.
75
+
76
+ 7.2. **Revenue Tier Reporting**: You are responsible for accurately reporting your revenue tier and upgrading to the appropriate pricing tier when revenue thresholds are exceeded.
77
+
78
+ 7.3. **Rate Lock Process**: To lock in current pricing for all tiers, contact us at **robert@statezero.dev**.
79
+
80
+ ## **8. Disclaimer of Warranty**
81
+
82
+ 8.1. **AS-IS Basis**: StateZero is provided **"AS IS"**, without warranties or guarantees of any kind.
83
+ 8.2. The Licensor **expressly disclaims** all implied warranties, including but not limited to **merchantability, fitness for a particular purpose, or non-infringement**.
84
+
85
+ ## **9. Limitation of Liability**
86
+
87
+ 9.1. **No Liability for Damages**: To the **maximum extent permitted by law**, the Licensor **shall not** be liable for any damages resulting from the use or inability to use StateZero, including:
88
+
89
+ - Loss of revenue, data, or business opportunities
90
+ - Incidental, consequential, punitive, or special damages, even if advised of the possibility
91
+
92
+ ## **10. Termination**
93
+
94
+ 10.1. **License Irrevocability**: Under the no-rugpull guarantee, **we cannot terminate your license to use StateZero** as long as you:
95
+
96
+ - Pay the applicable monthly fee (if any), OR
97
+ - We have asked you not to pay the fee (as outlined in Section 2.1)
98
+ - AND you comply with the restrictions in Section 6 (primarily not building a competing product)
99
+
100
+ 10.2. **Limited Termination Rights**: The Licensor may only terminate this License for material violations of Section 6 (Restrictions), and only after providing 30 days written notice and opportunity to cure such violations.
101
+
102
+ 10.3. **Upon Valid Termination**: Only in cases of valid termination under Section 10.2, you must **uninstall StateZero** and delete all copies in your possession.
103
+
104
+ 10.4. **No-Rugpull Protection**: Your license to use StateZero is **irrevocable** under normal circumstances. Even if we no longer wish to be associated with your use case, we will simply ask you to stop paying fees, but your license remains valid and enforceable.
105
+
106
+ ## **11. Governing Law**
107
+
108
+ 11.1. This License shall be governed by and construed in accordance with the **laws of Singapore**, without regard to conflict of law principles.
109
+
110
+ ## **12. Contact Information**
111
+
112
+ 12.1. For general inquiries and rate lock requests, contact **Airhome Sp Zoo** at **robert@statezero.dev**.
113
+ 12.2. For LLM training license inquiries, contact **Airhome Sp Zoo** at **robert@statezero.dev**.
114
+
115
+ ---
116
+
117
+ **By downloading, installing, or using StateZero, you acknowledge that you have read, understood, and agree to be bound by the terms of this License Agreement.**
@@ -0,0 +1,26 @@
1
+ [build-system]
2
+ requires = ["setuptools", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "statezero"
7
+ version = "0.1.0b1"
8
+ description = "A short description of your package"
9
+ readme = "README.md"
10
+ license = { file = "LICENSE" }
11
+ authors = [
12
+ { name = "Robert Herring", email = "robert.herring@statezero.dev" }
13
+ ]
14
+ requires-python = ">=3.10"
15
+ dynamic = ["dependencies"]
16
+
17
+ [project.urls]
18
+ homepage = "https://www.statezero.dev"
19
+ repository = "https://github.com/state-zero/statezero"
20
+
21
+ [tool.setuptools.packages.find]
22
+ where = ["."]
23
+ include = ["statezero", "statezero.*"]
24
+
25
+ [tool.setuptools.dynamic]
26
+ dependencies = {file = ["requirements.txt"]}
@@ -0,0 +1,18 @@
1
+ Django>=5.1.0,<5.2.0
2
+ django-money>=3.4.0,<3.5.0
3
+ djangorestframework>=3.15.0,<3.16.0
4
+ fakeredis>=2.27.0,<3.0.0
5
+ fastapi>=0.115.0,<0.116.0
6
+ hypothesis>=6.108.0,<7.0.0
7
+ jsonschema>=4.23.0,<5.0.0
8
+ networkx>=3.4.0,<4.0.0
9
+ openapi-spec-validator>=0.7.0,<0.8.0
10
+ orjson>=3.10.0,<4.0.0
11
+ pusher>=3.3.0,<4.0.0
12
+ pydantic>=2.10.0,<3.0.0
13
+ rich>=13.9.0,<14.0.0
14
+ psycopg2>=2.9.0,<3.0.0
15
+ django-redis>=5.4.0,<6.0.0
16
+ django-cors-headers>=4.7.0,<5.0.0
17
+ django-zen-queries>=2.1.0,<3.0.0
18
+ cytoolz>=1.0.0,<2.0.0
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes
File without changes