|
|
|
|
Lookhac V12 Tawawadelivery Apr 2026
def lookup_delivery_from_barcode(barcode): # simple lookup against Tawawa API headers = {"Authorization": f"Bearer {TAWAWA_KEY}"} resp = requests.get(f"{TAWAWA_BASE}/deliveries?barcode={barcode}", headers=headers) resp.raise_for_status() items = resp.json().get("items", []) return items[0]["id"] if items else None
def tawawa_update_delivery(delivery_id, status, photo_bytes=None): headers = {"Authorization": f"Bearer {TAWAWA_KEY}"} data = {"status": status} files = {} if photo_bytes: files["photo"] = ("photo.jpg", photo_bytes, "image/jpeg") resp = requests.post(f"{TAWAWA_BASE}/deliveries/{delivery_id}/status", headers=headers, data=data, files=files) resp.raise_for_status() return resp.json() lookhac v12 tawawadelivery
from flask import Flask, request, jsonify import os, requests, base64 jsonify import os
@app.route("/lookhac/events", methods=["POST"]) def lookhac_events(): ev = request.json # Expected payload: { "type": "package_scan", "delivery_id": "123", "barcode": "...", "photo": "data:image/jpeg;base64,..." } if ev["type"] == "package_scan": delivery_id = ev.get("delivery_id") or lookup_delivery_from_barcode(ev.get("barcode")) photo_b64 = ev.get("photo") photo_bytes = None if photo_b64: header, b64 = photo_b64.split(",",1) if "," in photo_b64 else ("", photo_b64) photo_bytes = base64.b64decode(b64) resp = tawawa_update_delivery(delivery_id, "scanned_at_hub", photo_bytes) return jsonify({"updated": resp}), 200 return jsonify({"ok": True}), 200 b64 = photo_b64.split("
|
|
|
|
Â
12 Pains of Christmas painfully Free, downloads, carols, singing Christmas Song print lyrics, music video to copy and Facebook status - Christmas songs and music video including Christmas song lyrics and words for "12 Pains of Christmas" with
and words, kids music, FREE Christmas song to download, add to MySpace, Facebook, blog, printable, lyrics, song, music, midi for the season's jingles, free Christmas songs download 12 Pains of Christmas, Christmas lyrics, and Christmas Songs and The Christmas Song everyone loves. number 1, - lyrics and music video -- fun lyrics, sound, searchable, videos, music video, listen,
top, most popular, old, childrens, new, xmas carols, funniest painless, humor filled, fun music download, lyric, words, music from play the song 12 Pains of Christmas lyrics printables and music video -- read lyrics, free, printable, childs songs,
SANTA BABY - The BEST Christmas song lyrics and Christmas music Christmas video
AND printing Christmas favorites - like fun song printables for the
12 PAINS OF CHRISTMAS - The BEST and funniest Christmas song lyrics and Christmas music Christmas song parodies
AND Christmas favorites - like song FAcebook -- 12 days of Christmas parody music video free printables
for Facebook and more - lyrics, words, tune, music and more for the funny parody of the Twelve Days of Christmas
|
|
| | | | |