pyntral 1.0.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.
Files changed (52) hide show
  1. pyntral/__init__.py +40 -0
  2. pyntral/admin.py +828 -0
  3. pyntral/auth.py +232 -0
  4. pyntral/bridge.py +38 -0
  5. pyntral/cli.py +478 -0
  6. pyntral/events.py +244 -0
  7. pyntral/filters.py +143 -0
  8. pyntral/logging.py +260 -0
  9. pyntral/orm.py +493 -0
  10. pyntral/orm_types.py +37 -0
  11. pyntral/resources.py +174 -0
  12. pyntral/transports/__init__.py +4 -0
  13. pyntral/transports/base.py +94 -0
  14. pyntral/transports/kafka.py +115 -0
  15. pyntral/transports/rabbitmq.py +105 -0
  16. pyntral/typegen.py +185 -0
  17. pyntral/ui/eslint.config.mjs +12 -0
  18. pyntral/ui/index.html +8 -0
  19. pyntral/ui/package.json +33 -0
  20. pyntral/ui/public/favicon.svg +1 -0
  21. pyntral/ui/scripts/lint-extensions.mjs +49 -0
  22. pyntral/ui/src/App.tsx +607 -0
  23. pyntral/ui/src/api.ts +46 -0
  24. pyntral/ui/src/bridge.ts +10 -0
  25. pyntral/ui/src/currentAdmin.tsx +13 -0
  26. pyntral/ui/src/feedback.tsx +90 -0
  27. pyntral/ui/src/filter-operator.tsx +98 -0
  28. pyntral/ui/src/filter-state.ts +47 -0
  29. pyntral/ui/src/filters.tsx +149 -0
  30. pyntral/ui/src/main.tsx +10 -0
  31. pyntral/ui/src/mutations.ts +75 -0
  32. pyntral/ui/src/navigation.tsx +86 -0
  33. pyntral/ui/src/popover.ts +74 -0
  34. pyntral/ui/src/relation.tsx +31 -0
  35. pyntral/ui/src/style.css +376 -0
  36. pyntral/ui/src/theme.ts +22 -0
  37. pyntral/ui/src/types.ts +123 -0
  38. pyntral/ui/src/ui.tsx +325 -0
  39. pyntral/ui/src/virtual.d.ts +11 -0
  40. pyntral/ui/tests/filter-state.test.mjs +30 -0
  41. pyntral/ui/tsconfig.json +74 -0
  42. pyntral/ui/vite.config.ts +122 -0
  43. pyntral/web_dist/assets/index-BmUJRJcd.css +1 -0
  44. pyntral/web_dist/assets/index-D72npMvS.js +9 -0
  45. pyntral/web_dist/favicon.svg +1 -0
  46. pyntral/web_dist/index.html +10 -0
  47. pyntral-1.0.0b1.dist-info/METADATA +217 -0
  48. pyntral-1.0.0b1.dist-info/RECORD +52 -0
  49. pyntral-1.0.0b1.dist-info/WHEEL +5 -0
  50. pyntral-1.0.0b1.dist-info/entry_points.txt +2 -0
  51. pyntral-1.0.0b1.dist-info/licenses/LICENSE +17 -0
  52. pyntral-1.0.0b1.dist-info/top_level.txt +1 -0
pyntral/__init__.py ADDED
@@ -0,0 +1,40 @@
1
+ """Composable FastAPI + SQLAlchemy admin backend with a React SPA."""
2
+
3
+ from .admin import Admin
4
+ from .auth import CallbackAuth, LocalAuth, ModelAuth, Principal, hash_password, verify_password
5
+ from .resources import Action, Field, Page, Resource, NavigationGroup, Relationship, RoleAccess
6
+ from .bridge import Bridge, BridgeContext
7
+ from .events import (AdminEvent, FieldRef, ResourceEvent, ResourceCreated, ResourceUpdated, ResourceDeleted,
8
+ ActionExecuted, LoginSucceeded, LoginFailed, LogoutSucceeded, CustomEvent,
9
+ InMemoryEventBus, EventBus, EventTransport, DeliveryReport)
10
+ from .transports.rabbitmq import RabbitMQEventBus
11
+ from .transports.kafka import KafkaEventBus
12
+ from .logging import LoggingConfig, EventFormatter, configure_logging, forward_to_loguru, stop_logging
13
+
14
+ __all__ = [
15
+ "Admin",
16
+ "AdminEvent", "FieldRef", "ResourceEvent", "ResourceCreated", "ResourceUpdated", "ResourceDeleted",
17
+ "ActionExecuted", "LoginSucceeded", "LoginFailed", "LogoutSucceeded", "CustomEvent",
18
+ "InMemoryEventBus", "EventBus", "EventTransport", "DeliveryReport",
19
+ "RabbitMQEventBus", "KafkaEventBus",
20
+ "LoggingConfig",
21
+ "EventFormatter",
22
+ "configure_logging",
23
+ "forward_to_loguru",
24
+ "stop_logging",
25
+ "Action",
26
+ "Bridge",
27
+ "BridgeContext",
28
+ "NavigationGroup",
29
+ "CallbackAuth",
30
+ "Field",
31
+ "LocalAuth",
32
+ "ModelAuth",
33
+ "Page",
34
+ "Principal",
35
+ "Resource",
36
+ "Relationship",
37
+ "RoleAccess",
38
+ "hash_password",
39
+ "verify_password",
40
+ ]