svc-infra 0.1.589__py3-none-any.whl → 0.1.591__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.

Potentially problematic release.


This version of svc-infra might be problematic. Click here for more details.

@@ -24,7 +24,7 @@ class CustomerOut(BaseModel):
24
24
 
25
25
  class IntentCreateIn(BaseModel):
26
26
  amount: AmountMinor = Field(..., description="Minor units (e.g., cents)")
27
- currency: Currency = Field(..., example="USD")
27
+ currency: Currency = Field(..., json_schema_extra={"example": "USD"})
28
28
  description: Optional[str] = None
29
29
  capture_method: Literal["automatic", "manual"] = "automatic"
30
30
  payment_method_types: list[str] = Field(default_factory=list) # let provider default
@@ -52,7 +52,7 @@ def add_payments(
52
52
  r, include_in_schema=True if include_in_docs is None else bool(include_in_docs)
53
53
  )
54
54
 
55
- @app.on_event("startup")
55
+ # Store the startup function to be called by lifespan if needed
56
56
  async def _payments_startup_check():
57
57
  try:
58
58
  reg = get_provider_registry()
@@ -60,5 +60,10 @@ def add_payments(
60
60
  # Try a cheap call (Stripe: read account or key balance; we just access .name)
61
61
  _ = adapter.name
62
62
  except Exception as e:
63
- # Log loud; dont crash the whole app by default
63
+ # Log loud; don't crash the whole app by default
64
64
  logger.warning(f"[payments] Provider adapter not ready: {e}")
65
+
66
+ # Add to app state for potential lifespan usage
67
+ if not hasattr(app.state, "startup_events"):
68
+ app.state.startup_events = []
69
+ app.state.startup_events.append(_payments_startup_check)
@@ -105,7 +105,7 @@ class SqlRepository:
105
105
  setattr(obj, self.soft_delete_flag_field, False)
106
106
  await session.flush()
107
107
  return True
108
- await session.delete(obj)
108
+ session.delete(obj)
109
109
  await session.flush()
110
110
  return True
111
111
 
@@ -18,7 +18,7 @@ class Timestamped(BaseModel):
18
18
 
19
19
  class ProviderAccountBase(BaseModel):
20
20
  model_config = ConfigDict(from_attributes=True)
21
- provider: str = Field(..., examples=["google", "github", "linkedin", "microsoft"])
21
+ provider: str = Field(..., json_schema_extra={"examples": ["google", "github", "linkedin", "microsoft"]})
22
22
  provider_account_id: str
23
23
 
24
24
  class ProviderAccountRead(ProviderAccountBase, Timestamped):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: svc-infra
3
- Version: 0.1.589
3
+ Version: 0.1.591
4
4
  Summary: Infrastructure for building and deploying prod-ready services
5
5
  License: MIT
6
6
  Keywords: fastapi,sqlalchemy,alembic,auth,infra,async,pydantic
@@ -6,14 +6,14 @@ svc_infra/apf_payments/provider/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
6
6
  svc_infra/apf_payments/provider/base.py,sha256=1t5znglpGFhjt4zdbuzE5VlHvGarFwzH2oscK8yyKNY,7678
7
7
  svc_infra/apf_payments/provider/registry.py,sha256=NZ4pUkFcbXNtqWEpFeI3NwoKRYGWe9fVQakmlrVLTKE,878
8
8
  svc_infra/apf_payments/provider/stripe.py,sha256=Xb_UjdobbBzK-an9cO1jRWiP6OHvki5MDp6JnS6a1-I,34392
9
- svc_infra/apf_payments/schemas.py,sha256=H2GdUtUv8iUIQNy5GaC07KEGFowERpucbWXH7JmgI7g,8538
9
+ svc_infra/apf_payments/schemas.py,sha256=1fdGnrXrm8Rmk9nwDsbcvrVIyPL2o8HwbZ7-KY9-yZo,8561
10
10
  svc_infra/apf_payments/service.py,sha256=bn3BTOTdfkJ4b0Z9cHuFHvlMcv9B1b2n0v-unveUplA,31060
11
11
  svc_infra/apf_payments/settings.py,sha256=VnNQbajbv843buUisqa82xOQ-f5JA8JzHD8o01-yhPQ,1239
12
12
  svc_infra/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  svc_infra/api/fastapi/__init__.py,sha256=VVdQjak74_wTDqmvL05_C97vIFugQxPVU-3JQEFBgR8,747
14
14
  svc_infra/api/fastapi/apf_payments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  svc_infra/api/fastapi/apf_payments/router.py,sha256=_9bqyZ9ZZsX43_b2LCghipPLkkHIEcswpR0yJxry-1U,34919
16
- svc_infra/api/fastapi/apf_payments/setup.py,sha256=PX-LHDiyu2eDuaw2m98VPUkF6EmXXRkbjRqh_gL8Kls,2263
16
+ svc_infra/api/fastapi/apf_payments/setup.py,sha256=tTUEcsT4FE5hxKvdl-R1S8JwJEJ-7cjQfw3RyzdZRs8,2501
17
17
  svc_infra/api/fastapi/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  svc_infra/api/fastapi/auth/_cookies.py,sha256=U4heUmMnLezHx8U6ksuUEpSZ6sNMJcIO0gdLpmZ5FXw,1367
19
19
  svc_infra/api/fastapi/auth/add.py,sha256=HSVP3Y01_gXPnRiJG0tEA9OS-cBd-zmqsiDbLMFGWu4,9528
@@ -159,7 +159,7 @@ svc_infra/db/sql/base.py,sha256=yeOM4Xo2CtTzsfx0hN8KLFTgOPZp6BrbV7Omz_bZUMg,317
159
159
  svc_infra/db/sql/constants.py,sha256=FqtoBWqP13gW8avIWpr8E41PDW5aQ88tjGmnokCV9Lk,1656
160
160
  svc_infra/db/sql/core.py,sha256=2W7o1uyEZBDbqX1ptArP5Fa5obaVpZqHpczJCdf1NZk,10855
161
161
  svc_infra/db/sql/management.py,sha256=bVpzj8BapwcghxAwmBsTnntWf3kaNf7CYETndppaiUM,3620
162
- svc_infra/db/sql/repository.py,sha256=_LT65NLvehGNuD2gq-3oQBATo7W_5-RKC87jA_sYyMU,5838
162
+ svc_infra/db/sql/repository.py,sha256=V-HA35rzRLebggfn1jqYGz-zy1JTc2keQicsb_mgQEA,5832
163
163
  svc_infra/db/sql/resource.py,sha256=RfbFGo1u4NOZ8AZpBwd7PfK42871eItvFDoCv5COuTo,1058
164
164
  svc_infra/db/sql/scaffold.py,sha256=aRC572W9Jqs1nLprR_zmmgERthMlJwoUjQ_xbRh53RU,9107
165
165
  svc_infra/db/sql/service.py,sha256=Jtb89FQgXWNRrh_bPLCvNyM7Up0_rn_wx1_CGWfiqNs,2790
@@ -167,7 +167,7 @@ svc_infra/db/sql/service_with_hooks.py,sha256=E2VHC-nqDp3AAop37WIM9nWyfTOsxzsa7W
167
167
  svc_infra/db/sql/templates/__init__.py,sha256=atHi2TYS0oe8ZzUv2JIMSYdPduuyvu8RcOQASo7SqwM,48
168
168
  svc_infra/db/sql/templates/models_schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
169
169
  svc_infra/db/sql/templates/models_schemas/auth/models.py.tmpl,sha256=9ji7yIAh2Cy942B8f67LBZpuWjtcEclplD0bCvoQd68,9453
170
- svc_infra/db/sql/templates/models_schemas/auth/schemas.py.tmpl,sha256=zLkYVJb-QFiKmjoDCHgSV_7pGvUtc9RC_TUZ37t16-k,2849
170
+ svc_infra/db/sql/templates/models_schemas/auth/schemas.py.tmpl,sha256=EVLGBBtQIlYXz0MN4yqAgbYLw0BdYawpZSFlPiw879g,2872
171
171
  svc_infra/db/sql/templates/models_schemas/entity/models.py.tmpl,sha256=cSUAfYgATv2SI0NQoHkn9Bzvt7RbOZ3_V8_p_VQsNMk,4349
172
172
  svc_infra/db/sql/templates/models_schemas/entity/schemas.py.tmpl,sha256=xHTXk8u2uiqmQe8XpXjGAPg8pDpdr0rLtsSOC_fo9vo,1032
173
173
  svc_infra/db/sql/templates/setup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -228,7 +228,7 @@ svc_infra/obs/templates/sidecars/railway/__init__.py,sha256=47DEQpj8HBSa-_TImW-5
228
228
  svc_infra/obs/templates/sidecars/railway/agent.yaml,sha256=hYv35yG92XEP_4joMFmMcVTD-4fG_zHitmChjreUJh4,516
229
229
  svc_infra/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
230
  svc_infra/utils.py,sha256=VX1yjTx61-YvAymyRhGy18DhybiVdPddiYD_FlKTbJU,952
231
- svc_infra-0.1.589.dist-info/METADATA,sha256=9agjFSnNBwWOxM2d9FHViUrri0l2uNxmo6IyZfMGprg,3487
232
- svc_infra-0.1.589.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
233
- svc_infra-0.1.589.dist-info/entry_points.txt,sha256=6x_nZOsjvn6hRZsMgZLgTasaCSKCgAjsGhACe_CiP0U,48
234
- svc_infra-0.1.589.dist-info/RECORD,,
231
+ svc_infra-0.1.591.dist-info/METADATA,sha256=cCJ81CBhhMMND7aL8Kx9O3YBsC2oS2G42bZspnRIiPI,3487
232
+ svc_infra-0.1.591.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
233
+ svc_infra-0.1.591.dist-info/entry_points.txt,sha256=6x_nZOsjvn6hRZsMgZLgTasaCSKCgAjsGhACe_CiP0U,48
234
+ svc_infra-0.1.591.dist-info/RECORD,,