Any data placed into connection URIs or transmitted over the network (e.g., JSON payloads/headers) must be encoded/serialized according to the protocol’s rules.
A-Z a-z 0-9 - . _ ~) and “sub-delims” (! $ & ' ( ) * + , ; =).UUID objects—convert to a string representation (commonly .hex or str(uuid)).Example:
from uuid import uuid4
from urllib.parse import quote
user = quote('alice+team', safe='')
password = quote('p@ss:word', safe='')
uri = f"amqp://{user}:{password}@host/vhost"
# For JSON/headers:
monitoring_id = uuid4().hex # not uuid4() directly
headers = {"monitoring_id": monitoring_id}
Enter the URL of a public GitHub repository