fast-platform 0.12.2__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.
Files changed (377) hide show
  1. fast_platform-0.12.2/LICENSE +9 -0
  2. fast_platform-0.12.2/PKG-INFO +208 -0
  3. fast_platform-0.12.2/README.md +86 -0
  4. fast_platform-0.12.2/pyproject.toml +274 -0
  5. fast_platform-0.12.2/setup.cfg +4 -0
  6. fast_platform-0.12.2/src/admin/__init__.py +31 -0
  7. fast_platform-0.12.2/src/admin/abstraction.py +14 -0
  8. fast_platform-0.12.2/src/admin/abstractions.py +24 -0
  9. fast_platform-0.12.2/src/admin/audit_hooks.py +98 -0
  10. fast_platform-0.12.2/src/admin/crud.py +203 -0
  11. fast_platform-0.12.2/src/admin/repositories.py +105 -0
  12. fast_platform-0.12.2/src/admin/router.py +98 -0
  13. fast_platform-0.12.2/src/admin/schemas.py +49 -0
  14. fast_platform-0.12.2/src/analytics/__init__.py +31 -0
  15. fast_platform-0.12.2/src/analytics/abstraction.py +14 -0
  16. fast_platform-0.12.2/src/analytics/base.py +57 -0
  17. fast_platform-0.12.2/src/analytics/buffer.py +86 -0
  18. fast_platform-0.12.2/src/analytics/http_sink.py +89 -0
  19. fast_platform-0.12.2/src/analytics/middleware.py +89 -0
  20. fast_platform-0.12.2/src/analytics/pii.py +84 -0
  21. fast_platform-0.12.2/src/analytics/rate_limit.py +60 -0
  22. fast_platform-0.12.2/src/analytics/schema_registry.py +70 -0
  23. fast_platform-0.12.2/src/analytics/validating_backend.py +38 -0
  24. fast_platform-0.12.2/src/cache/__init__.py +17 -0
  25. fast_platform-0.12.2/src/cache/abstraction.py +14 -0
  26. fast_platform-0.12.2/src/cache/backend.py +222 -0
  27. fast_platform-0.12.2/src/channels/__init__.py +49 -0
  28. fast_platform-0.12.2/src/channels/abstraction.py +14 -0
  29. fast_platform-0.12.2/src/channels/acl.py +61 -0
  30. fast_platform-0.12.2/src/channels/base.py +25 -0
  31. fast_platform-0.12.2/src/channels/config_loader.py +52 -0
  32. fast_platform-0.12.2/src/channels/dto.py +20 -0
  33. fast_platform-0.12.2/src/channels/heartbeat.py +40 -0
  34. fast_platform-0.12.2/src/channels/hub.py +182 -0
  35. fast_platform-0.12.2/src/channels/kafka_backend.py +18 -0
  36. fast_platform-0.12.2/src/channels/metrics.py +53 -0
  37. fast_platform-0.12.2/src/channels/presence.py +123 -0
  38. fast_platform-0.12.2/src/channels/py.typed +0 -0
  39. fast_platform-0.12.2/src/channels/redis_backend.py +32 -0
  40. fast_platform-0.12.2/src/channels/subscriber_counters.py +96 -0
  41. fast_platform-0.12.2/src/configuration/__init__.py +92 -0
  42. fast_platform-0.12.2/src/configuration/abstraction.py +77 -0
  43. fast_platform-0.12.2/src/configuration/analytics.py +16 -0
  44. fast_platform-0.12.2/src/configuration/cache.py +16 -0
  45. fast_platform-0.12.2/src/configuration/datadog.py +16 -0
  46. fast_platform-0.12.2/src/configuration/db.py +16 -0
  47. fast_platform-0.12.2/src/configuration/events.py +16 -0
  48. fast_platform-0.12.2/src/configuration/feature_flags.py +16 -0
  49. fast_platform-0.12.2/src/configuration/identity_providers.py +16 -0
  50. fast_platform-0.12.2/src/configuration/jobs.py +16 -0
  51. fast_platform-0.12.2/src/configuration/kafka.py +54 -0
  52. fast_platform-0.12.2/src/configuration/llm.py +16 -0
  53. fast_platform-0.12.2/src/configuration/notifications.py +69 -0
  54. fast_platform-0.12.2/src/configuration/payments.py +60 -0
  55. fast_platform-0.12.2/src/configuration/queues.py +16 -0
  56. fast_platform-0.12.2/src/configuration/realtime.py +16 -0
  57. fast_platform-0.12.2/src/configuration/search.py +16 -0
  58. fast_platform-0.12.2/src/configuration/secrets.py +16 -0
  59. fast_platform-0.12.2/src/configuration/storage.py +16 -0
  60. fast_platform-0.12.2/src/configuration/streams.py +16 -0
  61. fast_platform-0.12.2/src/configuration/telemetry.py +16 -0
  62. fast_platform-0.12.2/src/configuration/vectors.py +16 -0
  63. fast_platform-0.12.2/src/datastores/__init__.py +25 -0
  64. fast_platform-0.12.2/src/datastores/abstraction.py +14 -0
  65. fast_platform-0.12.2/src/datastores/cassandra.py +72 -0
  66. fast_platform-0.12.2/src/datastores/cosmos.py +168 -0
  67. fast_platform-0.12.2/src/datastores/dynamo.py +119 -0
  68. fast_platform-0.12.2/src/datastores/elasticsearch.py +90 -0
  69. fast_platform-0.12.2/src/datastores/interfaces.py +175 -0
  70. fast_platform-0.12.2/src/datastores/mongo.py +86 -0
  71. fast_platform-0.12.2/src/datastores/py.typed +0 -0
  72. fast_platform-0.12.2/src/datastores/redis_kv.py +85 -0
  73. fast_platform-0.12.2/src/datastores/scylla.py +73 -0
  74. fast_platform-0.12.2/src/db/__init__.py +101 -0
  75. fast_platform-0.12.2/src/db/abstraction.py +14 -0
  76. fast_platform-0.12.2/src/db/async_dependency.py +39 -0
  77. fast_platform-0.12.2/src/db/async_engine.py +228 -0
  78. fast_platform-0.12.2/src/db/dependency.py +24 -0
  79. fast_platform-0.12.2/src/db/engine.py +153 -0
  80. fast_platform-0.12.2/src/db/migration_lock.py +69 -0
  81. fast_platform-0.12.2/src/db/replica.py +135 -0
  82. fast_platform-0.12.2/src/db/table.py +15 -0
  83. fast_platform-0.12.2/src/db/url.py +38 -0
  84. fast_platform-0.12.2/src/dtos/__init__.py +97 -0
  85. fast_platform-0.12.2/src/dtos/abstraction.py +14 -0
  86. fast_platform-0.12.2/src/dtos/analytics.py +13 -0
  87. fast_platform-0.12.2/src/dtos/aws_secrets.py +16 -0
  88. fast_platform-0.12.2/src/dtos/cache.py +16 -0
  89. fast_platform-0.12.2/src/dtos/celery_jobs.py +15 -0
  90. fast_platform-0.12.2/src/dtos/datadog.py +14 -0
  91. fast_platform-0.12.2/src/dtos/db.py +27 -0
  92. fast_platform-0.12.2/src/dtos/dramatiq_jobs.py +14 -0
  93. fast_platform-0.12.2/src/dtos/event_bridge.py +18 -0
  94. fast_platform-0.12.2/src/dtos/event_hubs.py +14 -0
  95. fast_platform-0.12.2/src/dtos/events.py +19 -0
  96. fast_platform-0.12.2/src/dtos/feature_flags.py +17 -0
  97. fast_platform-0.12.2/src/dtos/feature_flags_snapshot.py +13 -0
  98. fast_platform-0.12.2/src/dtos/gcp_secrets.py +14 -0
  99. fast_platform-0.12.2/src/dtos/http_sink.py +14 -0
  100. fast_platform-0.12.2/src/dtos/identity_providers.py +15 -0
  101. fast_platform-0.12.2/src/dtos/jobs.py +22 -0
  102. fast_platform-0.12.2/src/dtos/kafka.py +49 -0
  103. fast_platform-0.12.2/src/dtos/kafka_event.py +13 -0
  104. fast_platform-0.12.2/src/dtos/launchdarkly_feature_flags.py +14 -0
  105. fast_platform-0.12.2/src/dtos/llm.py +80 -0
  106. fast_platform-0.12.2/src/dtos/meilisearch.py +14 -0
  107. fast_platform-0.12.2/src/dtos/nats_config.py +16 -0
  108. fast_platform-0.12.2/src/dtos/notifications.py +120 -0
  109. fast_platform-0.12.2/src/dtos/oauth_provider.py +21 -0
  110. fast_platform-0.12.2/src/dtos/payments.py +59 -0
  111. fast_platform-0.12.2/src/dtos/pinecone_config.py +15 -0
  112. fast_platform-0.12.2/src/dtos/qdrant_config.py +14 -0
  113. fast_platform-0.12.2/src/dtos/queues.py +19 -0
  114. fast_platform-0.12.2/src/dtos/rabbit_mq_config.py +15 -0
  115. fast_platform-0.12.2/src/dtos/realtime.py +13 -0
  116. fast_platform-0.12.2/src/dtos/rq_jobs.py +15 -0
  117. fast_platform-0.12.2/src/dtos/s3_storage.py +16 -0
  118. fast_platform-0.12.2/src/dtos/scheduler_jobs.py +12 -0
  119. fast_platform-0.12.2/src/dtos/search.py +48 -0
  120. fast_platform-0.12.2/src/dtos/secrets.py +17 -0
  121. fast_platform-0.12.2/src/dtos/service_bus_config.py +14 -0
  122. fast_platform-0.12.2/src/dtos/sns_notification.py +16 -0
  123. fast_platform-0.12.2/src/dtos/sqs_config.py +16 -0
  124. fast_platform-0.12.2/src/dtos/storage.py +14 -0
  125. fast_platform-0.12.2/src/dtos/streams.py +15 -0
  126. fast_platform-0.12.2/src/dtos/telemetry.py +15 -0
  127. fast_platform-0.12.2/src/dtos/unleash_feature_flags.py +16 -0
  128. fast_platform-0.12.2/src/dtos/vault_secrets.py +15 -0
  129. fast_platform-0.12.2/src/dtos/vectors.py +17 -0
  130. fast_platform-0.12.2/src/dtos/weaviate_config.py +14 -0
  131. fast_platform-0.12.2/src/dtos/webrtc_ice_config.py +18 -0
  132. fast_platform-0.12.2/src/dtos/webrtc_ice_server.py +16 -0
  133. fast_platform-0.12.2/src/errors/__init__.py +44 -0
  134. fast_platform-0.12.2/src/errors/abstraction.py +7 -0
  135. fast_platform-0.12.2/src/errors/bad_input_error.py +27 -0
  136. fast_platform-0.12.2/src/errors/conflict_error.py +23 -0
  137. fast_platform-0.12.2/src/errors/crypto_configuration_error.py +22 -0
  138. fast_platform-0.12.2/src/errors/error.py +74 -0
  139. fast_platform-0.12.2/src/errors/forbidden_error.py +23 -0
  140. fast_platform-0.12.2/src/errors/llm_dependency_error.py +32 -0
  141. fast_platform-0.12.2/src/errors/llm_feature_not_available_error.py +22 -0
  142. fast_platform-0.12.2/src/errors/not_found_error.py +27 -0
  143. fast_platform-0.12.2/src/errors/rate_limit_error.py +22 -0
  144. fast_platform-0.12.2/src/errors/service_unavailable_error.py +23 -0
  145. fast_platform-0.12.2/src/errors/token_budget_exceeded_error.py +19 -0
  146. fast_platform-0.12.2/src/errors/unauthorized_error.py +22 -0
  147. fast_platform-0.12.2/src/errors/unexpected_response_error.py +27 -0
  148. fast_platform-0.12.2/src/errors/unsupported_llm_provider_error.py +22 -0
  149. fast_platform-0.12.2/src/events/__init__.py +15 -0
  150. fast_platform-0.12.2/src/events/abstraction.py +14 -0
  151. fast_platform-0.12.2/src/events/bus.py +238 -0
  152. fast_platform-0.12.2/src/fast_platform/__init__.py +15 -0
  153. fast_platform-0.12.2/src/fast_platform/abstraction.py +14 -0
  154. fast_platform-0.12.2/src/fast_platform/py.typed +0 -0
  155. fast_platform-0.12.2/src/fast_platform/taxonomy.py +159 -0
  156. fast_platform-0.12.2/src/fast_platform.egg-info/PKG-INFO +208 -0
  157. fast_platform-0.12.2/src/fast_platform.egg-info/SOURCES.txt +375 -0
  158. fast_platform-0.12.2/src/fast_platform.egg-info/dependency_links.txt +1 -0
  159. fast_platform-0.12.2/src/fast_platform.egg-info/requires.txt +155 -0
  160. fast_platform-0.12.2/src/fast_platform.egg-info/top_level.txt +35 -0
  161. fast_platform-0.12.2/src/features/__init__.py +36 -0
  162. fast_platform-0.12.2/src/features/abstraction.py +119 -0
  163. fast_platform-0.12.2/src/features/evaluation.py +30 -0
  164. fast_platform-0.12.2/src/features/flags.py +432 -0
  165. fast_platform-0.12.2/src/features/kill_switch.py +80 -0
  166. fast_platform-0.12.2/src/features/launchdarkly_client.py +69 -0
  167. fast_platform-0.12.2/src/features/request_context.py +58 -0
  168. fast_platform-0.12.2/src/features/snapshot.py +120 -0
  169. fast_platform-0.12.2/src/features/streaming.py +69 -0
  170. fast_platform-0.12.2/src/features/unleash_client.py +52 -0
  171. fast_platform-0.12.2/src/identity/__init__.py +42 -0
  172. fast_platform-0.12.2/src/identity/abstraction.py +14 -0
  173. fast_platform-0.12.2/src/identity/api_key.py +63 -0
  174. fast_platform-0.12.2/src/identity/claims_normalize.py +106 -0
  175. fast_platform-0.12.2/src/identity/jwks_cache.py +67 -0
  176. fast_platform-0.12.2/src/identity/multi_issuer_jwks.py +45 -0
  177. fast_platform-0.12.2/src/identity/providers.py +204 -0
  178. fast_platform-0.12.2/src/jobs/__init__.py +41 -0
  179. fast_platform-0.12.2/src/jobs/abstraction.py +14 -0
  180. fast_platform-0.12.2/src/jobs/cancel.py +75 -0
  181. fast_platform-0.12.2/src/jobs/celery_app.py +51 -0
  182. fast_platform-0.12.2/src/jobs/enqueue.py +244 -0
  183. fast_platform-0.12.2/src/jobs/result.py +224 -0
  184. fast_platform-0.12.2/src/jobs/schedule.py +76 -0
  185. fast_platform-0.12.2/src/jobs/timeout.py +40 -0
  186. fast_platform-0.12.2/src/kafka/__init__.py +58 -0
  187. fast_platform-0.12.2/src/kafka/abstraction.py +14 -0
  188. fast_platform-0.12.2/src/kafka/consumer.py +93 -0
  189. fast_platform-0.12.2/src/kafka/dlq.py +42 -0
  190. fast_platform-0.12.2/src/kafka/health.py +56 -0
  191. fast_platform-0.12.2/src/kafka/idempotent.py +56 -0
  192. fast_platform-0.12.2/src/kafka/lag.py +101 -0
  193. fast_platform-0.12.2/src/kafka/outbox.py +91 -0
  194. fast_platform-0.12.2/src/kafka/producer.py +104 -0
  195. fast_platform-0.12.2/src/kafka/serde.py +41 -0
  196. fast_platform-0.12.2/src/kafka/worker.py +33 -0
  197. fast_platform-0.12.2/src/llm/__init__.py +107 -0
  198. fast_platform-0.12.2/src/llm/abstraction.py +172 -0
  199. fast_platform-0.12.2/src/llm/budget.py +56 -0
  200. fast_platform-0.12.2/src/llm/caching.py +77 -0
  201. fast_platform-0.12.2/src/llm/constants.py +11 -0
  202. fast_platform-0.12.2/src/llm/instrumented.py +147 -0
  203. fast_platform-0.12.2/src/llm/providers/__init__.py +27 -0
  204. fast_platform-0.12.2/src/llm/providers/anthropic_llm_service.py +42 -0
  205. fast_platform-0.12.2/src/llm/providers/factory.py +59 -0
  206. fast_platform-0.12.2/src/llm/providers/gemini_llm_service.py +52 -0
  207. fast_platform-0.12.2/src/llm/providers/groq_llm_service.py +19 -0
  208. fast_platform-0.12.2/src/llm/providers/illm_service.py +14 -0
  209. fast_platform-0.12.2/src/llm/providers/mistral_llm_service.py +19 -0
  210. fast_platform-0.12.2/src/llm/providers/ollama_llm_service.py +41 -0
  211. fast_platform-0.12.2/src/llm/providers/openai_llm_service.py +34 -0
  212. fast_platform-0.12.2/src/llm/streaming.py +102 -0
  213. fast_platform-0.12.2/src/llm/token_usage.py +54 -0
  214. fast_platform-0.12.2/src/llm/tools.py +97 -0
  215. fast_platform-0.12.2/src/media/__init__.py +46 -0
  216. fast_platform-0.12.2/src/media/abstraction.py +85 -0
  217. fast_platform-0.12.2/src/media/generator.py +75 -0
  218. fast_platform-0.12.2/src/media/memory_store.py +58 -0
  219. fast_platform-0.12.2/src/media/pipeline.py +117 -0
  220. fast_platform-0.12.2/src/media/upload.py +53 -0
  221. fast_platform-0.12.2/src/media/variants.py +55 -0
  222. fast_platform-0.12.2/src/media/virus_scan.py +123 -0
  223. fast_platform-0.12.2/src/notifications/__init__.py +65 -0
  224. fast_platform-0.12.2/src/notifications/abstraction.py +14 -0
  225. fast_platform-0.12.2/src/notifications/digest.py +88 -0
  226. fast_platform-0.12.2/src/notifications/fanout.py +129 -0
  227. fast_platform-0.12.2/src/notifications/idempotency.py +77 -0
  228. fast_platform-0.12.2/src/notifications/preferences.py +36 -0
  229. fast_platform-0.12.2/src/notifications/push.py +64 -0
  230. fast_platform-0.12.2/src/notifications/retry_policy.py +44 -0
  231. fast_platform-0.12.2/src/notifications/service.py +60 -0
  232. fast_platform-0.12.2/src/notifications/templating.py +25 -0
  233. fast_platform-0.12.2/src/notifications/webhook_retry_compat.py +34 -0
  234. fast_platform-0.12.2/src/observability/__init__.py +24 -0
  235. fast_platform-0.12.2/src/observability/abstraction.py +14 -0
  236. fast_platform-0.12.2/src/observability/audit.py +342 -0
  237. fast_platform-0.12.2/src/observability/datadog.py +51 -0
  238. fast_platform-0.12.2/src/observability/logging.py +246 -0
  239. fast_platform-0.12.2/src/observability/metrics.py +345 -0
  240. fast_platform-0.12.2/src/observability/otel.py +85 -0
  241. fast_platform-0.12.2/src/observability/py.typed +0 -0
  242. fast_platform-0.12.2/src/observability/tracing.py +358 -0
  243. fast_platform-0.12.2/src/otel/__init__.py +11 -0
  244. fast_platform-0.12.2/src/otel/abstraction.py +14 -0
  245. fast_platform-0.12.2/src/otel/bridge.py +87 -0
  246. fast_platform-0.12.2/src/payments/__init__.py +49 -0
  247. fast_platform-0.12.2/src/payments/abstraction.py +91 -0
  248. fast_platform-0.12.2/src/payments/reconciliation.py +127 -0
  249. fast_platform-0.12.2/src/payments/sca.py +54 -0
  250. fast_platform-0.12.2/src/payments/subscription_events.py +37 -0
  251. fast_platform-0.12.2/src/payments/webhook_idempotency.py +52 -0
  252. fast_platform-0.12.2/src/queues/__init__.py +61 -0
  253. fast_platform-0.12.2/src/queues/abstraction.py +14 -0
  254. fast_platform-0.12.2/src/queues/broker.py +249 -0
  255. fast_platform-0.12.2/src/queues/dlq.py +124 -0
  256. fast_platform-0.12.2/src/queues/envelope.py +115 -0
  257. fast_platform-0.12.2/src/resilience/__init__.py +39 -0
  258. fast_platform-0.12.2/src/resilience/abstraction.py +14 -0
  259. fast_platform-0.12.2/src/resilience/circuit_breaker.py +253 -0
  260. fast_platform-0.12.2/src/resilience/py.typed +0 -0
  261. fast_platform-0.12.2/src/resilience/retry.py +276 -0
  262. fast_platform-0.12.2/src/search/__init__.py +28 -0
  263. fast_platform-0.12.2/src/search/abstraction.py +14 -0
  264. fast_platform-0.12.2/src/search/base.py +160 -0
  265. fast_platform-0.12.2/src/search/bulk.py +85 -0
  266. fast_platform-0.12.2/src/search/dto.py +7 -0
  267. fast_platform-0.12.2/src/search/meilisearch_backend.py +105 -0
  268. fast_platform-0.12.2/src/search/opensearch_backend.py +152 -0
  269. fast_platform-0.12.2/src/search/rollover.py +26 -0
  270. fast_platform-0.12.2/src/search/suggest.py +25 -0
  271. fast_platform-0.12.2/src/search/typesense_backend.py +121 -0
  272. fast_platform-0.12.2/src/secrets/__init__.py +51 -0
  273. fast_platform-0.12.2/src/secrets/abstraction.py +14 -0
  274. fast_platform-0.12.2/src/secrets/aws_backend.py +49 -0
  275. fast_platform-0.12.2/src/secrets/base.py +78 -0
  276. fast_platform-0.12.2/src/secrets/cache.py +88 -0
  277. fast_platform-0.12.2/src/secrets/gcp_backend.py +56 -0
  278. fast_platform-0.12.2/src/secrets/lease.py +106 -0
  279. fast_platform-0.12.2/src/secrets/redact.py +64 -0
  280. fast_platform-0.12.2/src/secrets/vault_backend.py +42 -0
  281. fast_platform-0.12.2/src/security/__init__.py +57 -0
  282. fast_platform-0.12.2/src/security/abstraction.py +14 -0
  283. fast_platform-0.12.2/src/security/api_keys.py +395 -0
  284. fast_platform-0.12.2/src/security/encryption.py +196 -0
  285. fast_platform-0.12.2/src/security/llm_provider_keys.py +55 -0
  286. fast_platform-0.12.2/src/security/py.typed +0 -0
  287. fast_platform-0.12.2/src/security/webhooks.py +292 -0
  288. fast_platform-0.12.2/src/service/__init__.py +17 -0
  289. fast_platform-0.12.2/src/service/abstraction.py +14 -0
  290. fast_platform-0.12.2/src/service/crypto.py +134 -0
  291. fast_platform-0.12.2/src/storage/__init__.py +21 -0
  292. fast_platform-0.12.2/src/storage/abstraction.py +14 -0
  293. fast_platform-0.12.2/src/storage/azure_backend.py +90 -0
  294. fast_platform-0.12.2/src/storage/base.py +129 -0
  295. fast_platform-0.12.2/src/storage/gcs_backend.py +85 -0
  296. fast_platform-0.12.2/src/storage/local_backend.py +63 -0
  297. fast_platform-0.12.2/src/storage/multipart.py +138 -0
  298. fast_platform-0.12.2/src/storage/s3_backend.py +108 -0
  299. fast_platform-0.12.2/src/streams/__init__.py +11 -0
  300. fast_platform-0.12.2/src/streams/abstraction.py +14 -0
  301. fast_platform-0.12.2/src/streams/abstractions.py +68 -0
  302. fast_platform-0.12.2/src/streams/market.py +235 -0
  303. fast_platform-0.12.2/src/tenancy/__init__.py +57 -0
  304. fast_platform-0.12.2/src/tenancy/abstraction.py +14 -0
  305. fast_platform-0.12.2/src/tenancy/context.py +198 -0
  306. fast_platform-0.12.2/src/tenancy/middleware.py +149 -0
  307. fast_platform-0.12.2/src/tenancy/resolution.py +179 -0
  308. fast_platform-0.12.2/src/utils/__init__.py +70 -0
  309. fast_platform-0.12.2/src/utils/abstraction.py +26 -0
  310. fast_platform-0.12.2/src/utils/archive.py +158 -0
  311. fast_platform-0.12.2/src/utils/clock/__init__.py +15 -0
  312. fast_platform-0.12.2/src/utils/clock/frozen_clock.py +23 -0
  313. fast_platform-0.12.2/src/utils/clock/protocol.py +18 -0
  314. fast_platform-0.12.2/src/utils/clock/registry.py +40 -0
  315. fast_platform-0.12.2/src/utils/clock/system_clock.py +16 -0
  316. fast_platform-0.12.2/src/utils/currency.py +61 -0
  317. fast_platform-0.12.2/src/utils/datatype/__init__.py +18 -0
  318. fast_platform-0.12.2/src/utils/datatype/abstraction.py +14 -0
  319. fast_platform-0.12.2/src/utils/datatype/boolean.py +71 -0
  320. fast_platform-0.12.2/src/utils/datatype/integer.py +70 -0
  321. fast_platform-0.12.2/src/utils/datatype/string.py +54 -0
  322. fast_platform-0.12.2/src/utils/decimal.py +73 -0
  323. fast_platform-0.12.2/src/utils/digests.py +41 -0
  324. fast_platform-0.12.2/src/utils/encryption/__init__.py +18 -0
  325. fast_platform-0.12.2/src/utils/encryption/abstraction.py +27 -0
  326. fast_platform-0.12.2/src/utils/encryption/aes.py +50 -0
  327. fast_platform-0.12.2/src/utils/encryption/fernet.py +108 -0
  328. fast_platform-0.12.2/src/utils/hashing.py +168 -0
  329. fast_platform-0.12.2/src/utils/html/__init__.py +5 -0
  330. fast_platform-0.12.2/src/utils/html/html.py +125 -0
  331. fast_platform-0.12.2/src/utils/html/html_strip_tags_parser.py +35 -0
  332. fast_platform-0.12.2/src/utils/idempotency.py +59 -0
  333. fast_platform-0.12.2/src/utils/media/abstraction.py +14 -0
  334. fast_platform-0.12.2/src/utils/media/audio.py +93 -0
  335. fast_platform-0.12.2/src/utils/media/image.py +163 -0
  336. fast_platform-0.12.2/src/utils/media/pdf.py +141 -0
  337. fast_platform-0.12.2/src/utils/media/text.py +117 -0
  338. fast_platform-0.12.2/src/utils/media/video.py +96 -0
  339. fast_platform-0.12.2/src/utils/metrics/__init__.py +13 -0
  340. fast_platform-0.12.2/src/utils/metrics/counter.py +30 -0
  341. fast_platform-0.12.2/src/utils/metrics/histogram.py +28 -0
  342. fast_platform-0.12.2/src/utils/metrics/registry.py +42 -0
  343. fast_platform-0.12.2/src/utils/nutrition.py +19 -0
  344. fast_platform-0.12.2/src/utils/optional_imports.py +63 -0
  345. fast_platform-0.12.2/src/utils/request_id_context.py +39 -0
  346. fast_platform-0.12.2/src/utils/retry.py +54 -0
  347. fast_platform-0.12.2/src/utils/sanitization/abstraction.py +14 -0
  348. fast_platform-0.12.2/src/utils/sanitization/json.py +42 -0
  349. fast_platform-0.12.2/src/utils/structured_log/__init__.py +14 -0
  350. fast_platform-0.12.2/src/utils/structured_log/fields.py +19 -0
  351. fast_platform-0.12.2/src/utils/structured_log/log.py +63 -0
  352. fast_platform-0.12.2/src/utils/structured_log/sink.py +16 -0
  353. fast_platform-0.12.2/src/utils/time.py +40 -0
  354. fast_platform-0.12.2/src/vectors/__init__.py +28 -0
  355. fast_platform-0.12.2/src/vectors/abstraction.py +14 -0
  356. fast_platform-0.12.2/src/vectors/base.py +86 -0
  357. fast_platform-0.12.2/src/vectors/names.py +75 -0
  358. fast_platform-0.12.2/src/vectors/pinecone_backend.py +53 -0
  359. fast_platform-0.12.2/src/vectors/qdrant_backend.py +53 -0
  360. fast_platform-0.12.2/src/vectors/weaviate_backend.py +55 -0
  361. fast_platform-0.12.2/src/versioning/__init__.py +19 -0
  362. fast_platform-0.12.2/src/versioning/abstraction.py +14 -0
  363. fast_platform-0.12.2/src/versioning/router.py +340 -0
  364. fast_platform-0.12.2/src/webhooks/__init__.py +27 -0
  365. fast_platform-0.12.2/src/webhooks/abstraction.py +14 -0
  366. fast_platform-0.12.2/src/webhooks/delivery.py +102 -0
  367. fast_platform-0.12.2/src/webhooks/fastapi_deps.py +86 -0
  368. fast_platform-0.12.2/src/webhooks/signing.py +66 -0
  369. fast_platform-0.12.2/src/webrtc/__init__.py +37 -0
  370. fast_platform-0.12.2/src/webrtc/abstraction.py +14 -0
  371. fast_platform-0.12.2/src/webrtc/config_loader.py +54 -0
  372. fast_platform-0.12.2/src/webrtc/consent.py +38 -0
  373. fast_platform-0.12.2/src/webrtc/dto.py +24 -0
  374. fast_platform-0.12.2/src/webrtc/ice_config.py +42 -0
  375. fast_platform-0.12.2/src/webrtc/rooms.py +100 -0
  376. fast_platform-0.12.2/src/webrtc/signaling.py +129 -0
  377. fast_platform-0.12.2/src/webrtc/turn_twilio.py +78 -0
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) FastMVC contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,208 @@
1
+ Metadata-Version: 2.4
2
+ Name: fast-platform
3
+ Version: 0.12.2
4
+ Summary: Umbrella package: fast_platform.configuration, fast_admin, fast_notifications, fast_resilience, fast_versioning, fast_features, fast_channels, fast_db, observability, analytics, queues, … — merged fast_* modules under one install.
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/shregar1/fastMVC
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: aiokafka<1.0.0,>=0.8.0
11
+ Requires-Dist: fastapi>=0.100.0
12
+ Requires-Dist: starlette>=0.27.0
13
+ Requires-Dist: httpx>=0.24.0
14
+ Requires-Dist: pydantic>=2.0.0
15
+ Requires-Dist: loguru>=0.7.0
16
+ Requires-Dist: cryptography<44.0.0,>=41.0.0
17
+ Requires-Dist: sqlalchemy<3.0.0,>=2.0.0
18
+ Requires-Dist: jsonschema>=4.0.0
19
+ Requires-Dist: redis<7.0.0,>=4.0.0
20
+ Provides-Extra: dev
21
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
22
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
23
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
24
+ Requires-Dist: aiosqlite>=0.19.0; extra == "dev"
25
+ Requires-Dist: jinja2>=3.0.0; extra == "dev"
26
+ Requires-Dist: mypy>=1.11.0; extra == "dev"
27
+ Requires-Dist: basedpyright>=1.19.0; extra == "dev"
28
+ Requires-Dist: ruff>=0.8.0; extra == "dev"
29
+ Requires-Dist: black>=24.0; extra == "dev"
30
+ Requires-Dist: flake8>=7.0; extra == "dev"
31
+ Requires-Dist: types-redis; extra == "dev"
32
+ Provides-Extra: async
33
+ Requires-Dist: asyncpg<1.0.0,>=0.29.0; extra == "async"
34
+ Provides-Extra: rabbitmq
35
+ Requires-Dist: pika>=1.3.0; extra == "rabbitmq"
36
+ Provides-Extra: sqs
37
+ Requires-Dist: boto3>=1.28.0; extra == "sqs"
38
+ Provides-Extra: service-bus
39
+ Requires-Dist: azure-servicebus>=7.0.0; extra == "service-bus"
40
+ Provides-Extra: nats
41
+ Requires-Dist: nats-py>=2.0.0; extra == "nats"
42
+ Provides-Extra: vault
43
+ Requires-Dist: hvac>=2.0.0; extra == "vault"
44
+ Provides-Extra: aws
45
+ Requires-Dist: boto3>=1.28.0; extra == "aws"
46
+ Provides-Extra: gcp
47
+ Requires-Dist: google-cloud-secret-manager>=2.0.0; extra == "gcp"
48
+ Provides-Extra: pinecone
49
+ Requires-Dist: pinecone-client>=3.0.0; extra == "pinecone"
50
+ Provides-Extra: qdrant
51
+ Requires-Dist: qdrant-client>=1.0.0; extra == "qdrant"
52
+ Provides-Extra: weaviate
53
+ Requires-Dist: weaviate-client>=4.0.0; extra == "weaviate"
54
+ Provides-Extra: s3
55
+ Requires-Dist: boto3>=1.28.0; extra == "s3"
56
+ Provides-Extra: gcs
57
+ Requires-Dist: google-cloud-storage>=2.10.0; extra == "gcs"
58
+ Provides-Extra: azure
59
+ Requires-Dist: azure-storage-blob>=12.17.0; extra == "azure"
60
+ Provides-Extra: celery
61
+ Requires-Dist: celery[redis]>=5.3.0; extra == "celery"
62
+ Provides-Extra: rq
63
+ Requires-Dist: rq>=1.0.0; extra == "rq"
64
+ Provides-Extra: dramatiq
65
+ Requires-Dist: dramatiq[redis]>=1.0.0; extra == "dramatiq"
66
+ Provides-Extra: fastapi
67
+ Requires-Dist: fastapi>=0.100.0; extra == "fastapi"
68
+ Provides-Extra: openai
69
+ Requires-Dist: openai>=1.0.0; extra == "openai"
70
+ Provides-Extra: anthropic
71
+ Requires-Dist: anthropic>=0.18.0; extra == "anthropic"
72
+ Provides-Extra: ollama
73
+ Requires-Dist: httpx>=0.24.0; extra == "ollama"
74
+ Provides-Extra: groq
75
+ Requires-Dist: openai>=1.0.0; extra == "groq"
76
+ Provides-Extra: mistral
77
+ Requires-Dist: openai>=1.0.0; extra == "mistral"
78
+ Provides-Extra: gemini
79
+ Requires-Dist: google-generativeai>=0.8.0; extra == "gemini"
80
+ Provides-Extra: protobuf
81
+ Requires-Dist: protobuf>=5.0; extra == "protobuf"
82
+ Provides-Extra: avro
83
+ Requires-Dist: fastavro>=1.9; extra == "avro"
84
+ Provides-Extra: oauth
85
+ Requires-Dist: httpx>=0.24.0; extra == "oauth"
86
+ Provides-Extra: pillow
87
+ Requires-Dist: Pillow>=10.0.0; extra == "pillow"
88
+ Provides-Extra: utils-pdf
89
+ Requires-Dist: pypdf>=4.0.0; extra == "utils-pdf"
90
+ Provides-Extra: meilisearch
91
+ Requires-Dist: meilisearch>=0.31.0; extra == "meilisearch"
92
+ Provides-Extra: typesense
93
+ Requires-Dist: typesense>=0.18.0; extra == "typesense"
94
+ Provides-Extra: opensearch
95
+ Requires-Dist: opensearch-py>=2.0.0; extra == "opensearch"
96
+ Provides-Extra: mongo
97
+ Requires-Dist: pymongo>=4.0.0; extra == "mongo"
98
+ Provides-Extra: elasticsearch
99
+ Requires-Dist: elasticsearch<9.0.0,>=8.0.0; extra == "elasticsearch"
100
+ Provides-Extra: dynamo
101
+ Requires-Dist: boto3>=1.28.0; extra == "dynamo"
102
+ Provides-Extra: cassandra
103
+ Requires-Dist: cassandra-driver>=3.28.0; extra == "cassandra"
104
+ Provides-Extra: cosmos
105
+ Requires-Dist: azure-cosmos>=4.5.0; extra == "cosmos"
106
+ Provides-Extra: web
107
+ Requires-Dist: starlette>=0.27.0; extra == "web"
108
+ Provides-Extra: segment
109
+ Requires-Dist: analytics-python>=1.0.0; extra == "segment"
110
+ Provides-Extra: posthog
111
+ Requires-Dist: posthog>=3.0.0; extra == "posthog"
112
+ Provides-Extra: mixpanel
113
+ Requires-Dist: mixpanel>=4.0.0; extra == "mixpanel"
114
+ Provides-Extra: jinja2
115
+ Requires-Dist: jinja2>=3.0.0; extra == "jinja2"
116
+ Provides-Extra: otel
117
+ Requires-Dist: opentelemetry-api>=1.20.0; extra == "otel"
118
+ Requires-Dist: opentelemetry-sdk>=1.20.0; extra == "otel"
119
+ Requires-Dist: opentelemetry-exporter-otlp>=1.20.0; extra == "otel"
120
+ Requires-Dist: opentelemetry-instrumentation-fastapi>=0.41b0; extra == "otel"
121
+ Dynamic: license-file
122
+
123
+ # fast-platform
124
+
125
+ Single installable distribution (**`pip install fast-platform`**) that bundles many former standalone `fast_*` modules **unchanged at import time** (flat top-level imports such as `from notifications import …`, `from db import …`).
126
+
127
+ Logical organization is defined by the **package taxonomy** in [`src/fast_platform/taxonomy.py`](src/fast_platform/taxonomy.py). Imports stay flat under `src/`; the taxonomy is used for docs, tests layout, and navigation.
128
+
129
+ ## Package taxonomy
130
+
131
+ Each top-level name under `src/` belongs to exactly one **section** (`PackageSection`). The canonical mapping is `PACKAGE_TO_SECTION` in `fast_platform.taxonomy`.
132
+
133
+ | Section | Meaning |
134
+ |--------|---------|
135
+ | **core** | Config, DTOs, errors, helpers, orchestration services |
136
+ | **security** | Crypto, API keys, identity, secret backends |
137
+ | **persistence** | SQLAlchemy + multi-backend datastores |
138
+ | **data_platform** | Search, vectors, object storage, cache |
139
+ | **messaging** | Queues, Kafka, jobs, events, notifications, webhooks |
140
+ | **realtime** | Channels, streams, WebRTC |
141
+ | **integrations** | LLM, payments, media, analytics, admin |
142
+ | **operations** | Observability, OpenTelemetry, flags, tenancy, resilience, API versioning |
143
+
144
+ ### Packages by section
145
+
146
+ | Section | Packages |
147
+ |--------|----------|
148
+ | **core** | `configuration`, `dtos`, `errors`, `utils`, `service`, `fast_platform` |
149
+ | **security** | `security`, `secrets`, `identity` |
150
+ | **persistence** | `db`, `datastores` |
151
+ | **data_platform** | `search`, `vectors`, `storage`, `cache` |
152
+ | **messaging** | `kafka`, `queues`, `events`, `jobs`, `notifications`, `webhooks` |
153
+ | **realtime** | `channels`, `streams`, `webrtc` |
154
+ | **integrations** | `llm`, `payments`, `media`, `analytics`, `admin` |
155
+ | **operations** | `observability`, `otel`, `resilience`, `tenancy`, `versioning`, `features` |
156
+
157
+ Use in code:
158
+
159
+ ```python
160
+ from fast_platform.taxonomy import section_of, PackageSection
161
+
162
+ section_of("notifications") # PackageSection.MESSAGING
163
+ ```
164
+
165
+ ## Layout: `src/` vs `tests/`
166
+
167
+ - **`src/`** — **flat** top-level packages (`configuration/`, `notifications/`, …) so existing imports remain stable.
168
+ - **`tests/`** — mirrors the taxonomy: **`tests/<section_folder>/<package>/`**. Section folder names come from `SECTION_TEST_FOLDER` in `taxonomy.py` (e.g. `core`, `persistence`, `data_platform`). The security section uses **`sec`** (not `security`) so the `security` package can live at `tests/sec/security/` without a path collision.
169
+
170
+ Example: tests for `utils` live under `tests/core/utils/`; tests for `notifications` under `tests/messaging/notifications/`.
171
+
172
+ ## Highlights (by import name)
173
+
174
+ | Import | Role |
175
+ |--------|------|
176
+ | `configuration` | JSON config loaders + Pydantic DTOs per subsystem |
177
+ | `dtos` | Shared Pydantic DTOs (`IDTO` base) |
178
+ | `errors` | Structured HTTP-oriented exceptions (`BadInputError`, `NotFoundError`, …) |
179
+ | `notifications` | Email/SMS/push templates, fan-out, idempotency, preferences (`pip install fast-platform[jinja2]` for templating extras) |
180
+ | `resilience` | Circuit breakers, retries, bulkheads |
181
+ | `versioning` | API versioning (`VersionedAPIRouter`, `VersioningMiddleware`, path/header/query strategies) |
182
+ | `features` | In-app feature flags, rollout, targeting |
183
+ | `channels` | Real-time hub, Redis/Kafka backends, presence, ACLs, metrics |
184
+ | `db` | SQLAlchemy engine, sessions, `DBDependency` |
185
+ | `datastores` | `IDataStore` adapters (Redis, Mongo, ES, …) |
186
+ | `observability` | Logging, metrics, tracing, audit, OTLP |
187
+ | `admin` | Admin API router (users, roles, audit log), generic SQLAlchemy CRUD routers |
188
+ | `queues` | Queues (DLQ, envelope, backends) |
189
+ | `jobs` | Background jobs |
190
+ | `storage` | Object storage (S3, GCS, Azure) |
191
+ | `secrets` | Secret backends + cache (Vault, AWS, GCP; not the stdlib `secrets` module) |
192
+ | `vectors` | Vector stores |
193
+ | `tenancy` | Multi-tenant context |
194
+ | `webhooks` | Webhook signing / delivery |
195
+ | `webrtc` | WebRTC signaling |
196
+ | `llm` | LLM providers, tools, streaming |
197
+ | `kafka` | Kafka producer/consumer, outbox |
198
+ | `identity` | OAuth/OIDC, JWKS, API keys |
199
+ | `media` | Uploads, variants, presigned URLs |
200
+ | `payments` | Payment gateways, webhooks, SCA |
201
+ | `search` | Meilisearch, Typesense, OpenSearch |
202
+ | `security` | API keys, inbound webhooks, field encryption |
203
+
204
+ **Install:** `pip install fast-platform`
205
+
206
+ Optional backends: e.g. `pip install fast-platform[async,otel,rabbitmq,s3,openai,meilisearch,pillow]`.
207
+
208
+ `pyfastmvc` depends on this wheel for these modules instead of many separate distributions.
@@ -0,0 +1,86 @@
1
+ # fast-platform
2
+
3
+ Single installable distribution (**`pip install fast-platform`**) that bundles many former standalone `fast_*` modules **unchanged at import time** (flat top-level imports such as `from notifications import …`, `from db import …`).
4
+
5
+ Logical organization is defined by the **package taxonomy** in [`src/fast_platform/taxonomy.py`](src/fast_platform/taxonomy.py). Imports stay flat under `src/`; the taxonomy is used for docs, tests layout, and navigation.
6
+
7
+ ## Package taxonomy
8
+
9
+ Each top-level name under `src/` belongs to exactly one **section** (`PackageSection`). The canonical mapping is `PACKAGE_TO_SECTION` in `fast_platform.taxonomy`.
10
+
11
+ | Section | Meaning |
12
+ |--------|---------|
13
+ | **core** | Config, DTOs, errors, helpers, orchestration services |
14
+ | **security** | Crypto, API keys, identity, secret backends |
15
+ | **persistence** | SQLAlchemy + multi-backend datastores |
16
+ | **data_platform** | Search, vectors, object storage, cache |
17
+ | **messaging** | Queues, Kafka, jobs, events, notifications, webhooks |
18
+ | **realtime** | Channels, streams, WebRTC |
19
+ | **integrations** | LLM, payments, media, analytics, admin |
20
+ | **operations** | Observability, OpenTelemetry, flags, tenancy, resilience, API versioning |
21
+
22
+ ### Packages by section
23
+
24
+ | Section | Packages |
25
+ |--------|----------|
26
+ | **core** | `configuration`, `dtos`, `errors`, `utils`, `service`, `fast_platform` |
27
+ | **security** | `security`, `secrets`, `identity` |
28
+ | **persistence** | `db`, `datastores` |
29
+ | **data_platform** | `search`, `vectors`, `storage`, `cache` |
30
+ | **messaging** | `kafka`, `queues`, `events`, `jobs`, `notifications`, `webhooks` |
31
+ | **realtime** | `channels`, `streams`, `webrtc` |
32
+ | **integrations** | `llm`, `payments`, `media`, `analytics`, `admin` |
33
+ | **operations** | `observability`, `otel`, `resilience`, `tenancy`, `versioning`, `features` |
34
+
35
+ Use in code:
36
+
37
+ ```python
38
+ from fast_platform.taxonomy import section_of, PackageSection
39
+
40
+ section_of("notifications") # PackageSection.MESSAGING
41
+ ```
42
+
43
+ ## Layout: `src/` vs `tests/`
44
+
45
+ - **`src/`** — **flat** top-level packages (`configuration/`, `notifications/`, …) so existing imports remain stable.
46
+ - **`tests/`** — mirrors the taxonomy: **`tests/<section_folder>/<package>/`**. Section folder names come from `SECTION_TEST_FOLDER` in `taxonomy.py` (e.g. `core`, `persistence`, `data_platform`). The security section uses **`sec`** (not `security`) so the `security` package can live at `tests/sec/security/` without a path collision.
47
+
48
+ Example: tests for `utils` live under `tests/core/utils/`; tests for `notifications` under `tests/messaging/notifications/`.
49
+
50
+ ## Highlights (by import name)
51
+
52
+ | Import | Role |
53
+ |--------|------|
54
+ | `configuration` | JSON config loaders + Pydantic DTOs per subsystem |
55
+ | `dtos` | Shared Pydantic DTOs (`IDTO` base) |
56
+ | `errors` | Structured HTTP-oriented exceptions (`BadInputError`, `NotFoundError`, …) |
57
+ | `notifications` | Email/SMS/push templates, fan-out, idempotency, preferences (`pip install fast-platform[jinja2]` for templating extras) |
58
+ | `resilience` | Circuit breakers, retries, bulkheads |
59
+ | `versioning` | API versioning (`VersionedAPIRouter`, `VersioningMiddleware`, path/header/query strategies) |
60
+ | `features` | In-app feature flags, rollout, targeting |
61
+ | `channels` | Real-time hub, Redis/Kafka backends, presence, ACLs, metrics |
62
+ | `db` | SQLAlchemy engine, sessions, `DBDependency` |
63
+ | `datastores` | `IDataStore` adapters (Redis, Mongo, ES, …) |
64
+ | `observability` | Logging, metrics, tracing, audit, OTLP |
65
+ | `admin` | Admin API router (users, roles, audit log), generic SQLAlchemy CRUD routers |
66
+ | `queues` | Queues (DLQ, envelope, backends) |
67
+ | `jobs` | Background jobs |
68
+ | `storage` | Object storage (S3, GCS, Azure) |
69
+ | `secrets` | Secret backends + cache (Vault, AWS, GCP; not the stdlib `secrets` module) |
70
+ | `vectors` | Vector stores |
71
+ | `tenancy` | Multi-tenant context |
72
+ | `webhooks` | Webhook signing / delivery |
73
+ | `webrtc` | WebRTC signaling |
74
+ | `llm` | LLM providers, tools, streaming |
75
+ | `kafka` | Kafka producer/consumer, outbox |
76
+ | `identity` | OAuth/OIDC, JWKS, API keys |
77
+ | `media` | Uploads, variants, presigned URLs |
78
+ | `payments` | Payment gateways, webhooks, SCA |
79
+ | `search` | Meilisearch, Typesense, OpenSearch |
80
+ | `security` | API keys, inbound webhooks, field encryption |
81
+
82
+ **Install:** `pip install fast-platform`
83
+
84
+ Optional backends: e.g. `pip install fast-platform[async,otel,rabbitmq,s3,openai,meilisearch,pillow]`.
85
+
86
+ `pyfastmvc` depends on this wheel for these modules instead of many separate distributions.
@@ -0,0 +1,274 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "fast-platform"
7
+ version = "0.12.2"
8
+ description = "Umbrella package: fast_platform.configuration, fast_admin, fast_notifications, fast_resilience, fast_versioning, fast_features, fast_channels, fast_db, observability, analytics, queues, … — merged fast_* modules under one install."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ dependencies = [
13
+ "aiokafka>=0.8.0,<1.0.0",
14
+ "fastapi>=0.100.0",
15
+ "starlette>=0.27.0",
16
+ "httpx>=0.24.0",
17
+ "pydantic>=2.0.0",
18
+ "loguru>=0.7.0",
19
+ "cryptography>=41.0.0,<44.0.0",
20
+ "sqlalchemy>=2.0.0,<3.0.0",
21
+ "jsonschema>=4.0.0",
22
+ "redis>=4.0.0,<7.0.0",
23
+ ]
24
+
25
+ [project.optional-dependencies]
26
+ dev = [
27
+ "pytest>=7.0.0",
28
+ "pytest-cov>=4.0.0",
29
+ "pytest-asyncio>=0.21.0",
30
+ "aiosqlite>=0.19.0",
31
+ "jinja2>=3.0.0",
32
+ # Static typing (strict)
33
+ "mypy>=1.11.0",
34
+ "basedpyright>=1.19.0",
35
+ "ruff>=0.8.0",
36
+ "black>=24.0",
37
+ "flake8>=7.0",
38
+ "types-redis",
39
+ ]
40
+ # fast_db
41
+ async = ["asyncpg>=0.29.0,<1.0.0"]
42
+ # fast_queues
43
+ rabbitmq = ["pika>=1.3.0"]
44
+ sqs = ["boto3>=1.28.0"]
45
+ service-bus = ["azure-servicebus>=7.0.0"]
46
+ nats = ["nats-py>=2.0.0"]
47
+ # fast_secrets
48
+ vault = ["hvac>=2.0.0"]
49
+ aws = ["boto3>=1.28.0"]
50
+ gcp = ["google-cloud-secret-manager>=2.0.0"]
51
+ # fast_vectors
52
+ pinecone = ["pinecone-client>=3.0.0"]
53
+ qdrant = ["qdrant-client>=1.0.0"]
54
+ weaviate = ["weaviate-client>=4.0.0"]
55
+ # fast_storage
56
+ s3 = ["boto3>=1.28.0"]
57
+ gcs = ["google-cloud-storage>=2.10.0"]
58
+ azure = ["azure-storage-blob>=12.17.0"]
59
+ # fast_jobs
60
+ celery = ["celery[redis]>=5.3.0"]
61
+ rq = ["rq>=1.0.0"]
62
+ dramatiq = ["dramatiq[redis]>=1.0.0"]
63
+ # fast_webhooks
64
+ fastapi = ["fastapi>=0.100.0"]
65
+ # fast_llm
66
+ openai = ["openai>=1.0.0"]
67
+ anthropic = ["anthropic>=0.18.0"]
68
+ ollama = ["httpx>=0.24.0"]
69
+ groq = ["openai>=1.0.0"]
70
+ mistral = ["openai>=1.0.0"]
71
+ gemini = ["google-generativeai>=0.8.0"]
72
+ # fast_kafka
73
+ protobuf = ["protobuf>=5.0"]
74
+ avro = ["fastavro>=1.9"]
75
+ # fast_identity
76
+ oauth = ["httpx>=0.24.0"]
77
+ # fast_media
78
+ pillow = ["Pillow>=10.0.0"]
79
+ # utils (PDF helpers)
80
+ utils-pdf = ["pypdf>=4.0.0"]
81
+ # fast_search
82
+ meilisearch = ["meilisearch>=0.31.0"]
83
+ typesense = ["typesense>=0.18.0"]
84
+ opensearch = ["opensearch-py>=2.0.0"]
85
+ # fast_datastores
86
+ mongo = ["pymongo>=4.0.0"]
87
+ elasticsearch = ["elasticsearch>=8.0.0,<9.0.0"]
88
+ dynamo = ["boto3>=1.28.0"]
89
+ cassandra = ["cassandra-driver>=3.28.0"]
90
+ cosmos = ["azure-cosmos>=4.5.0"]
91
+ # fast_analytics
92
+ web = ["starlette>=0.27.0"]
93
+ segment = ["analytics-python>=1.0.0"]
94
+ posthog = ["posthog>=3.0.0"]
95
+ mixpanel = ["mixpanel>=4.0.0"]
96
+ # fast_notifications (optional templating; redis is already a base dependency)
97
+ jinja2 = ["jinja2>=3.0.0"]
98
+ # fast_observability
99
+ otel = [
100
+ "opentelemetry-api>=1.20.0",
101
+ "opentelemetry-sdk>=1.20.0",
102
+ "opentelemetry-exporter-otlp>=1.20.0",
103
+ "opentelemetry-instrumentation-fastapi>=0.41b0",
104
+ ]
105
+
106
+ [project.urls]
107
+ Homepage = "https://github.com/shregar1/fastMVC"
108
+
109
+ # Type checking (strict):
110
+ # uv sync --extra dev
111
+ # uv run mypy src
112
+ # uv run basedpyright src
113
+ # uv run ruff check src tests
114
+ # Optional modernization: ``uv run ruff check --select UP src``
115
+
116
+ [tool.setuptools.packages.find]
117
+ where = ["src"]
118
+
119
+ [tool.setuptools.package-data]
120
+ fast_platform = ["configuration/**/*.json", "py.typed"]
121
+
122
+ [tool.pytest.ini_options]
123
+ testpaths = ["tests"]
124
+ pythonpath = ["src", "."]
125
+ asyncio_mode = "auto"
126
+ # Many packages use the same test module basenames (e.g. test_public_api.py); importlib mode avoids collisions.
127
+ addopts = "--import-mode=importlib"
128
+
129
+ [tool.coverage.run]
130
+ source = ["src"]
131
+ branch = false
132
+ omit = [
133
+ "*/tests/*",
134
+ ]
135
+
136
+ [tool.coverage.report]
137
+ # Aggregate across many merged packages; optional backends inflate the tree.
138
+ fail_under = 64
139
+ show_missing = true
140
+ exclude_lines = [
141
+ "pragma: no cover",
142
+ "\\.\\.\\.",
143
+ "if TYPE_CHECKING:",
144
+ ]
145
+
146
+ # ---------------------------------------------------------------------------
147
+ # Ruff — fast linter + import sorting; strict typing-related rules on ``src/``.
148
+ # ---------------------------------------------------------------------------
149
+ [tool.ruff]
150
+ target-version = "py310"
151
+ line-length = 100
152
+ src = ["src", "tests"]
153
+
154
+ [tool.ruff.lint]
155
+ # Strict typing + imports. Optional: ``uv run ruff check --select UP src`` (PEP 585/604 modernization).
156
+ # Broader style: ``--extend-select E,W,B,RUF``
157
+ select = [
158
+ "E9", # runtime errors (syntax / import)
159
+ "F", # pyflakes (incl. unused imports / undefined names)
160
+ "I", # isort
161
+ "ANN", # flake8-annotations
162
+ "PYI", # flake8-pyi
163
+ "TC", # flake8-type-checking (incl. TYPE_CHECKING imports)
164
+ "TID", # tidy imports
165
+ ]
166
+ ignore = [
167
+ "ANN401", # typing.Any parameters — allowed when intentional
168
+ ]
169
+
170
+ [tool.ruff.lint.per-file-ignores]
171
+ # Tests: enforce correctness but allow looser annotations than production code.
172
+ "tests/**" = [
173
+ "ANN001", "ANN002", "ANN003", "ANN201", "ANN202", "ANN204", "ANN205",
174
+ "TC001", "TC002", "TC003", "TC006",
175
+ "TID252",
176
+ ]
177
+ "**/conftest.py" = ["ANN"]
178
+
179
+ [tool.ruff.format]
180
+ quote-style = "double"
181
+ indent-style = "space"
182
+
183
+ # ---------------------------------------------------------------------------
184
+ # Black — formatter (line length matches Ruff).
185
+ # ---------------------------------------------------------------------------
186
+ [tool.black]
187
+ line-length = 100
188
+ target-version = ["py310"]
189
+ # Ruff’s formatter wraps ``kafka/lag.py`` differently than Black; omit from Black checks.
190
+ extend-exclude = "/(build|dist|\\.venv|\\.eggs)/|src/kafka/lag\\.py"
191
+
192
+ # ---------------------------------------------------------------------------
193
+ # mypy — strict mode for ``src/`` (application code).
194
+ # ---------------------------------------------------------------------------
195
+ [tool.mypy]
196
+ python_version = "3.10"
197
+ mypy_path = "src"
198
+ explicit_package_bases = true
199
+ namespace_packages = true
200
+ strict = true
201
+ warn_unused_ignores = true
202
+ warn_redundant_casts = true
203
+ warn_return_any = true
204
+ warn_unreachable = true
205
+ show_error_codes = true
206
+ show_column_numbers = true
207
+ pretty = true
208
+ exclude = [
209
+ "^build/",
210
+ "^dist/",
211
+ ]
212
+
213
+ plugins = ["pydantic.mypy"]
214
+
215
+ [[tool.mypy.overrides]]
216
+ module = "tests.*"
217
+ strict = false
218
+ disallow_untyped_defs = false
219
+ disallow_incomplete_defs = false
220
+ warn_return_any = false
221
+ check_untyped_defs = true
222
+
223
+ # Third-party libraries without usable stubs: silence import-not-found noise.
224
+ [[tool.mypy.overrides]]
225
+ module = [
226
+ "aiokafka.*",
227
+ "boto3.*",
228
+ "botocore.*",
229
+ "cassandra.*",
230
+ "dramatiq.*",
231
+ "google.*",
232
+ "hvac.*",
233
+ "loguru",
234
+ "nats.*",
235
+ "opensearchpy.*",
236
+ "pinecone.*",
237
+ "posthog.*",
238
+ "pymongo.*",
239
+ "pypdf.*",
240
+ "qdrant_client.*",
241
+ "redis.*",
242
+ "rq.*",
243
+ "segment.*",
244
+ "weaviate.*",
245
+ ]
246
+ ignore_missing_imports = true
247
+
248
+ # ---------------------------------------------------------------------------
249
+ # Based Pyright — duplicate strict signal (editor + CI); aligns with mypy on ``src/``.
250
+ # ---------------------------------------------------------------------------
251
+ [tool.basedpyright]
252
+ pythonVersion = "3.10"
253
+ typeCheckingMode = "strict"
254
+ include = ["src"]
255
+ exclude = ["**/node_modules", "**/__pycache__", "build", "dist"]
256
+ executionEnvironments = [{ root = ".", extraPaths = ["src"] }]
257
+ reportMissingImports = true
258
+ reportMissingTypeStubs = true
259
+ # ``Unknown``-shaped values from untyped deps overlap mypy; keep structural strictness here.
260
+ reportUnknownMemberType = false
261
+ reportUnknownArgumentType = false
262
+ reportUnknownVariableType = false
263
+ reportUnknownParameterType = false
264
+ reportUnknownLambdaType = false
265
+ reportUntypedFunctionDecorator = true
266
+ reportUntypedClassDecorator = true
267
+ reportUntypedBaseClass = true
268
+ reportMissingTypeArgument = true
269
+ reportInvalidTypeForm = true
270
+ reportPrivateUsage = true
271
+ reportIncompatibleMethodOverride = true
272
+ reportIncompatibleVariableOverride = true
273
+ reportOverlappingOverload = true
274
+ useLibraryCodeForTypes = true
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,31 @@
1
+ """
2
+ fast_admin – CRUD API for admin resources (users, roles, audit log) for FastMVC.
3
+ """
4
+
5
+ from .audit_hooks import (
6
+ AuditLogHook,
7
+ AuditTarget,
8
+ as_audit_hook,
9
+ audit_repository_hook,
10
+ )
11
+ from .crud import crud_router_from_model
12
+ from .repositories import IAdminRoleRepository, IAdminUserRepository, IAuditLogRepository
13
+ from .router import get_admin_router
14
+ from .schemas import AdminRoleSummary, AdminUserSummary, AuditLogEntry
15
+
16
+ __version__ = "0.1.1"
17
+
18
+ __all__ = [
19
+ "AdminUserSummary",
20
+ "AdminRoleSummary",
21
+ "AuditLogEntry",
22
+ "IAdminUserRepository",
23
+ "IAdminRoleRepository",
24
+ "IAuditLogRepository",
25
+ "get_admin_router",
26
+ "crud_router_from_model",
27
+ "AuditLogHook",
28
+ "AuditTarget",
29
+ "audit_repository_hook",
30
+ "as_audit_hook",
31
+ ]
@@ -0,0 +1,14 @@
1
+ """admin package abstractions."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from abc import ABC
6
+
7
+
8
+ class IAdmin(ABC):
9
+ """Marker base for concrete types in the ``admin`` package."""
10
+
11
+ __slots__ = ()
12
+
13
+
14
+ __all__ = ["IAdmin"]
@@ -0,0 +1,24 @@
1
+ """
2
+ Admin resource abstractions: users, roles, audit log.
3
+
4
+ Prefer importing from :mod:`admin.schemas` and :mod:`admin.repositories`;
5
+ this module re-exports the same names for backward compatibility.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from .repositories import (
11
+ IAdminRoleRepository,
12
+ IAdminUserRepository,
13
+ IAuditLogRepository,
14
+ )
15
+ from .schemas import AdminRoleSummary, AdminUserSummary, AuditLogEntry
16
+
17
+ __all__ = [
18
+ "AdminRoleSummary",
19
+ "AdminUserSummary",
20
+ "AuditLogEntry",
21
+ "IAdminUserRepository",
22
+ "IAdminRoleRepository",
23
+ "IAuditLogRepository",
24
+ ]