add local handler and missing requirement

This commit is contained in:
Daniel Roth 2026-06-15 15:03:07 +00:00
parent 9b21cc5512
commit 03dc0a3eef
4 changed files with 29 additions and 0 deletions

View file

@ -13,3 +13,7 @@ def handler(event: dict[str, Any], context: Any) -> None:
sp_client = DomnaSharepointClient(DomnaSites.SOCIAL_HOUSING_WAVE_3)
orchestrator = SharepointRenamerOrchestrator(sp_client, CSV_PATH, dry_run=request.dry_run)
orchestrator.run()
if __name__ == "__main__":
handler({"dry_run": True}, None)

View file

@ -1,2 +1,3 @@
msal
requests
pydantic-settings==2.6.0

View file

@ -0,0 +1,9 @@
services:
sharepoint-renamer:
build:
context: ../../../
dockerfile: applications/sharepoint_renamer/handler/Dockerfile
ports:
- "9003:8080"
env_file:
- ../../../.env

View file

@ -0,0 +1,15 @@
#!/usr/bin/env python3
import requests
HOST = "localhost"
PORT = "9003"
LAMBDA_URL = f"http://{HOST}:{PORT}/2015-03-31/functions/function/invocations"
payload = {"dry_run": True}
response = requests.post(LAMBDA_URL, json=payload)
print("Status code:", response.status_code)
print("Response:")
print(response.text)