statezero 0.1.0b1__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.
- statezero/__init__.py +0 -0
- statezero/adaptors/__init__.py +0 -0
- statezero/adaptors/django/__init__.py +0 -0
- statezero/adaptors/django/apps.py +97 -0
- statezero/adaptors/django/config.py +99 -0
- statezero/adaptors/django/context_manager.py +12 -0
- statezero/adaptors/django/event_emitters.py +78 -0
- statezero/adaptors/django/exception_handler.py +98 -0
- statezero/adaptors/django/extensions/__init__.py +0 -0
- statezero/adaptors/django/extensions/custom_field_serializers/__init__.py +0 -0
- statezero/adaptors/django/extensions/custom_field_serializers/file_fields.py +141 -0
- statezero/adaptors/django/extensions/custom_field_serializers/money_field.py +75 -0
- statezero/adaptors/django/f_handler.py +312 -0
- statezero/adaptors/django/helpers.py +153 -0
- statezero/adaptors/django/middleware.py +10 -0
- statezero/adaptors/django/migrations/0001_initial.py +33 -0
- statezero/adaptors/django/migrations/0002_delete_modelviewsubscription.py +16 -0
- statezero/adaptors/django/migrations/__init__.py +0 -0
- statezero/adaptors/django/orm.py +915 -0
- statezero/adaptors/django/permissions.py +252 -0
- statezero/adaptors/django/query_optimizer.py +772 -0
- statezero/adaptors/django/schemas.py +324 -0
- statezero/adaptors/django/search_providers/__init__.py +0 -0
- statezero/adaptors/django/search_providers/basic_search.py +24 -0
- statezero/adaptors/django/search_providers/postgres_search.py +51 -0
- statezero/adaptors/django/serializers.py +554 -0
- statezero/adaptors/django/urls.py +14 -0
- statezero/adaptors/django/views.py +336 -0
- statezero/core/__init__.py +34 -0
- statezero/core/ast_parser.py +821 -0
- statezero/core/ast_validator.py +266 -0
- statezero/core/classes.py +167 -0
- statezero/core/config.py +263 -0
- statezero/core/context_storage.py +4 -0
- statezero/core/event_bus.py +175 -0
- statezero/core/event_emitters.py +60 -0
- statezero/core/exceptions.py +106 -0
- statezero/core/interfaces.py +492 -0
- statezero/core/process_request.py +184 -0
- statezero/core/types.py +63 -0
- statezero-0.1.0b1.dist-info/METADATA +252 -0
- statezero-0.1.0b1.dist-info/RECORD +45 -0
- statezero-0.1.0b1.dist-info/WHEEL +5 -0
- statezero-0.1.0b1.dist-info/licenses/license.md +117 -0
- statezero-0.1.0b1.dist-info/top_level.txt +1 -0
statezero/core/types.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from abc import ABC, abstractmethod
|
|
4
|
+
from enum import Enum, auto
|
|
5
|
+
from typing import (Any, Callable, Dict, List, Optional, Set, Type, TypeVar,
|
|
6
|
+
Union)
|
|
7
|
+
|
|
8
|
+
# Django imports
|
|
9
|
+
try:
|
|
10
|
+
from django.db.models import Field as DjangoField
|
|
11
|
+
from django.db.models import Model as DjangoModel
|
|
12
|
+
from django.db.models.query import QuerySet as DjangoQuerySet
|
|
13
|
+
from rest_framework.request import Request as DRFRequest
|
|
14
|
+
except ImportError:
|
|
15
|
+
DjangoField = None
|
|
16
|
+
DjangoQuerySet = None
|
|
17
|
+
DjangoModel = None
|
|
18
|
+
DRFRequest = object
|
|
19
|
+
|
|
20
|
+
# SQLAlchemy imports
|
|
21
|
+
try:
|
|
22
|
+
from sqlalchemy.ext.declarative import \
|
|
23
|
+
DeclarativeMeta as SQLAlchemyDeclarativeMeta
|
|
24
|
+
from sqlalchemy.orm.query import Query as SQLAlchemyQuery
|
|
25
|
+
from sqlalchemy.sql.schema import Column as SQLAlchemyColumn # type:ignore
|
|
26
|
+
except ImportError:
|
|
27
|
+
SQLAlchemyColumn = None
|
|
28
|
+
SQLAlchemyQuery = None
|
|
29
|
+
SQLAlchemyDeclarativeMeta = None
|
|
30
|
+
|
|
31
|
+
# FastAPI & Flask imports
|
|
32
|
+
try:
|
|
33
|
+
from fastapi import Request as FastAPIRequest
|
|
34
|
+
except ImportError:
|
|
35
|
+
FastAPIRequest = object
|
|
36
|
+
|
|
37
|
+
try:
|
|
38
|
+
from flask import Request as FlaskRequest
|
|
39
|
+
except ImportError:
|
|
40
|
+
FlaskRequest = object
|
|
41
|
+
|
|
42
|
+
# Type definitions
|
|
43
|
+
# Explicitly list all possible types. Including 'object' as a fallback ensures the type remains valid
|
|
44
|
+
ORMField = Union[object, DjangoField, SQLAlchemyColumn]
|
|
45
|
+
ORMModel = Union[object, DjangoModel, SQLAlchemyDeclarativeMeta]
|
|
46
|
+
ORMQuerySet = Union[Any, DjangoQuerySet, SQLAlchemyQuery]
|
|
47
|
+
RequestType = Union[DRFRequest, FastAPIRequest, FlaskRequest]
|
|
48
|
+
|
|
49
|
+
class HotPathActionType(Enum):
|
|
50
|
+
CREATED = "created"
|
|
51
|
+
COMPLETED = "completed"
|
|
52
|
+
REJECTED = "rejected"
|
|
53
|
+
|
|
54
|
+
class ActionType(Enum):
|
|
55
|
+
CREATE = "create"
|
|
56
|
+
READ = "read"
|
|
57
|
+
UPDATE = "update"
|
|
58
|
+
DELETE = "delete"
|
|
59
|
+
BULK_UPDATE = "bulk_update"
|
|
60
|
+
BULK_DELETE = "bulk_delete"
|
|
61
|
+
# new pre-operation types
|
|
62
|
+
PRE_UPDATE = "pre_update"
|
|
63
|
+
PRE_DELETE = "pre_delete"
|
|
@@ -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,45 @@
|
|
|
1
|
+
statezero/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
statezero/adaptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
statezero/adaptors/django/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
statezero/adaptors/django/apps.py,sha256=UtL1XTZ70_9-q0ZEct0getDnaxJxnEjo_P9iEIqiYYE,4388
|
|
5
|
+
statezero/adaptors/django/config.py,sha256=FVoKf-bYv0GAeAFjpQhfDnvn-L1c2noKXAg0B79egVo,3878
|
|
6
|
+
statezero/adaptors/django/context_manager.py,sha256=Vrscb63wGJ2frXnOPPcJGULiyDkPnRO2SUhN-K-pJeI,379
|
|
7
|
+
statezero/adaptors/django/event_emitters.py,sha256=Lb7NW7yFf_KxczVbj8g0vRcKZEny15t25m7PyIi2d3s,3057
|
|
8
|
+
statezero/adaptors/django/exception_handler.py,sha256=cQF1Fm5IjH91ydB54TK9sqXiAOnWBS2LcZ0yf1iuZDg,3964
|
|
9
|
+
statezero/adaptors/django/f_handler.py,sha256=yvITFj9UAnz8-r-aLEcWoz48tBhZ08-VMq9Fsm2uiN8,12305
|
|
10
|
+
statezero/adaptors/django/helpers.py,sha256=0Dyq5vboDuTUaH-KpS3oVDjastA9yv6xI6XpBuvRM3I,5974
|
|
11
|
+
statezero/adaptors/django/middleware.py,sha256=YVr8fkqCk51xJQM-ovtrUiB9Kt9H81cLd9xv4cM9YlM,410
|
|
12
|
+
statezero/adaptors/django/orm.py,sha256=0Tyyp81zX7Wc-2AXTQgIei7TqDoXWh23lopaaNxbJMs,36279
|
|
13
|
+
statezero/adaptors/django/permissions.py,sha256=fU2c4bKK0zX2uuVB0UazZHTI-5OkiI5-BtPNcPEWmW0,9525
|
|
14
|
+
statezero/adaptors/django/query_optimizer.py,sha256=-GNqL7Xn8WP8OsLEAAxXpIszSyEwm-l6WjgdkEFzxUM,38541
|
|
15
|
+
statezero/adaptors/django/schemas.py,sha256=shq8ed9qHCnbCfYVsRxVE7V3R3GhGIKeRRj7dI3r1IU,12728
|
|
16
|
+
statezero/adaptors/django/serializers.py,sha256=fOKuAlui076yNqQzBqYXLqz5uYwi_KAIHXHwRnomiL0,22586
|
|
17
|
+
statezero/adaptors/django/urls.py,sha256=G4LAUVG1WtPCyB_POQ3wa_VKqKCSI6p3fHZGy6GV99g,636
|
|
18
|
+
statezero/adaptors/django/views.py,sha256=ZoTocBkqv8sdxaq5bMOZpsj1zko5FDcSYP1C9m8s9Hw,13723
|
|
19
|
+
statezero/adaptors/django/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
+
statezero/adaptors/django/extensions/custom_field_serializers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
+
statezero/adaptors/django/extensions/custom_field_serializers/file_fields.py,sha256=BaOaJPmyzCp-YFwpsTOvGHjHpk6s8UJuZ5JsF-PEGV4,4518
|
|
22
|
+
statezero/adaptors/django/extensions/custom_field_serializers/money_field.py,sha256=pDgwF_oZgOL02P0aJ4TIZJKMhtKD8ioaqfgrxRblQvQ,2767
|
|
23
|
+
statezero/adaptors/django/migrations/0001_initial.py,sha256=F5kr819sPN5_xc82GpX6-e5CwVWDvywePWC0cv9zYKY,1318
|
|
24
|
+
statezero/adaptors/django/migrations/0002_delete_modelviewsubscription.py,sha256=7fJXl18gvMdEjKnQbO2h8mPAl4jNGVCAb60NRl5V6tI,317
|
|
25
|
+
statezero/adaptors/django/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
+
statezero/adaptors/django/search_providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
+
statezero/adaptors/django/search_providers/basic_search.py,sha256=5_GJ1r_B6JdIYXL6yYEYn5mik88EolSH5aZvygc_UF0,977
|
|
28
|
+
statezero/adaptors/django/search_providers/postgres_search.py,sha256=IMoHxzfi-Y3hAxPND4Xc6GatrPs1eXAqpmcfwt5Zr14,2459
|
|
29
|
+
statezero/core/__init__.py,sha256=Z6RTutAAElLMEjBFphVVmpySPdJBA55j-Uo0BtR7c5E,1040
|
|
30
|
+
statezero/core/ast_parser.py,sha256=epJ2pBpzRlKnrSgDMdVNOTRX6NX28khwkf_xOoPH_Uw,35561
|
|
31
|
+
statezero/core/ast_validator.py,sha256=YZAflPyba0kXWBNhd1Z_XeEk-_zUzM6MkY9zSlX1PMs,11582
|
|
32
|
+
statezero/core/classes.py,sha256=-rJ8szqGGzsFxE3TvbtYHFHFP9Kg2WP24aYi74Io338,4923
|
|
33
|
+
statezero/core/config.py,sha256=oOjcudQO0XgEZ60kwkzpcOoTi0QZARS8XWbp9gzgasg,11489
|
|
34
|
+
statezero/core/context_storage.py,sha256=DVx525ZMRorj41kg5K0N6pPdGkQ5_XEJcBucpH5ChxQ,162
|
|
35
|
+
statezero/core/event_bus.py,sha256=2IFLBHSkLzpm1AX0MfSXSmF2X-lXK-gOoODZCtB2Jdw,6284
|
|
36
|
+
statezero/core/event_emitters.py,sha256=qjMbeUmdn4bG7WiVfqTmNdaflEea5amnTEpOn5X0J44,2046
|
|
37
|
+
statezero/core/exceptions.py,sha256=_krMHWW9qBbMXvvqFdWf85a3Kayn7XbJczfC3x3gmBI,3330
|
|
38
|
+
statezero/core/interfaces.py,sha256=HwcFXWJfIAxqYgWbGesn1Th9O8mvqH2r0XP2UyYifEw,15866
|
|
39
|
+
statezero/core/process_request.py,sha256=NiG36XEjPMemJI03l5eTNaymyfUbwVgrx78chVcs4Nk,8047
|
|
40
|
+
statezero/core/types.py,sha256=K9x9AU5J6yd2AWvqRz27CeAY6UYfuQoQ7xTEwTijrmM,1982
|
|
41
|
+
statezero-0.1.0b1.dist-info/licenses/license.md,sha256=0uKjybTt9K_YbEmYgf25JN292qjjJ-BPofvIZ3wdtX4,7411
|
|
42
|
+
statezero-0.1.0b1.dist-info/METADATA,sha256=1CuwSOuqcbbu6tExi6yTLnPWrBykuleeAP_J51R62BA,7183
|
|
43
|
+
statezero-0.1.0b1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
44
|
+
statezero-0.1.0b1.dist-info/top_level.txt,sha256=UAuZYPKczradU1kcMQxsGjUzEW0qdgsqzhXyscrcLpw,10
|
|
45
|
+
statezero-0.1.0b1.dist-info/RECORD,,
|
|
@@ -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 @@
|
|
|
1
|
+
statezero
|