{"id":"94460c6f-97fc-4fc4-9bc1-ccce4ae347b1","shortId":"cJTneE","kind":"skill","title":"azure-eventgrid-py","tagline":"Azure Event Grid SDK for Python. Use for publishing events, handling CloudEvents, and event-driven architectures.","description":"# Azure Event Grid SDK for Python\n\nEvent routing service for building event-driven applications with pub/sub semantics.\n\n## Installation\n\n```bash\npip install azure-eventgrid azure-identity\n```\n\n## Environment Variables\n\n```bash\nEVENTGRID_TOPIC_ENDPOINT=https://<topic-name>.<region>.eventgrid.azure.net/api/events\nEVENTGRID_NAMESPACE_ENDPOINT=https://<namespace>.<region>.eventgrid.azure.net\n```\n\n## Authentication\n\n```python\nfrom azure.identity import DefaultAzureCredential\nfrom azure.eventgrid import EventGridPublisherClient\n\ncredential = DefaultAzureCredential()\nendpoint = \"https://<topic-name>.<region>.eventgrid.azure.net/api/events\"\n\nclient = EventGridPublisherClient(endpoint, credential)\n```\n\n## Event Types\n\n| Format | Class | Use Case |\n|--------|-------|----------|\n| Cloud Events 1.0 | `CloudEvent` | Standard, interoperable (recommended) |\n| Event Grid Schema | `EventGridEvent` | Azure-native format |\n\n## Publish CloudEvents\n\n```python\nfrom azure.eventgrid import EventGridPublisherClient, CloudEvent\nfrom azure.identity import DefaultAzureCredential\n\nclient = EventGridPublisherClient(endpoint, DefaultAzureCredential())\n\n# Single event\nevent = CloudEvent(\n    type=\"MyApp.Events.OrderCreated\",\n    source=\"/myapp/orders\",\n    data={\"order_id\": \"12345\", \"amount\": 99.99}\n)\nclient.send(event)\n\n# Multiple events\nevents = [\n    CloudEvent(\n        type=\"MyApp.Events.OrderCreated\",\n        source=\"/myapp/orders\",\n        data={\"order_id\": f\"order-{i}\"}\n    )\n    for i in range(10)\n]\nclient.send(events)\n```\n\n## Publish EventGridEvents\n\n```python\nfrom azure.eventgrid import EventGridEvent\nfrom datetime import datetime, timezone\n\nevent = EventGridEvent(\n    subject=\"/myapp/orders/12345\",\n    event_type=\"MyApp.Events.OrderCreated\",\n    data={\"order_id\": \"12345\", \"amount\": 99.99},\n    data_version=\"1.0\"\n)\n\nclient.send(event)\n```\n\n## Event Properties\n\n### CloudEvent Properties\n\n```python\nevent = CloudEvent(\n    type=\"MyApp.Events.ItemCreated\",      # Required: event type\n    source=\"/myapp/items\",                 # Required: event source\n    data={\"key\": \"value\"},                 # Event payload\n    subject=\"items/123\",                   # Optional: subject/path\n    datacontenttype=\"application/json\",   # Optional: content type\n    dataschema=\"https://schema.example\",  # Optional: schema URL\n    time=datetime.now(timezone.utc),      # Optional: timestamp\n    extensions={\"custom\": \"value\"}         # Optional: custom attributes\n)\n```\n\n### EventGridEvent Properties\n\n```python\nevent = EventGridEvent(\n    subject=\"/myapp/items/123\",            # Required: subject\n    event_type=\"MyApp.ItemCreated\",        # Required: event type\n    data={\"key\": \"value\"},                 # Required: event payload\n    data_version=\"1.0\",                    # Required: schema version\n    topic=\"/subscriptions/.../topics/...\", # Optional: auto-set\n    event_time=datetime.now(timezone.utc)  # Optional: timestamp\n)\n```\n\n## Async Client\n\n```python\nfrom azure.eventgrid.aio import EventGridPublisherClient\nfrom azure.identity.aio import DefaultAzureCredential\n\nasync def publish_events():\n    credential = DefaultAzureCredential()\n    \n    async with EventGridPublisherClient(endpoint, credential) as client:\n        event = CloudEvent(\n            type=\"MyApp.Events.Test\",\n            source=\"/myapp\",\n            data={\"message\": \"hello\"}\n        )\n        await client.send(event)\n\nimport asyncio\nasyncio.run(publish_events())\n```\n\n## Namespace Topics (Event Grid Namespaces)\n\nFor Event Grid Namespaces (pull delivery):\n\n```python\nfrom azure.eventgrid.aio import EventGridPublisherClient\n\n# Namespace endpoint (different from custom topic)\nnamespace_endpoint = \"https://<namespace>.<region>.eventgrid.azure.net\"\ntopic_name = \"my-topic\"\n\nasync with EventGridPublisherClient(\n    endpoint=namespace_endpoint,\n    credential=DefaultAzureCredential()\n) as client:\n    await client.send(\n        event,\n        namespace_topic=topic_name\n    )\n```\n\n## Best Practices\n\n1. **Use CloudEvents** for new applications (industry standard)\n2. **Batch events** when publishing multiple events\n3. **Include meaningful subjects** for filtering\n4. **Use async client** for high-throughput scenarios\n5. **Handle retries** — Event Grid has built-in retry\n6. **Set appropriate event types** for routing and filtering\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["azure","eventgrid","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows"],"capabilities":["skill","source-sickn33","skill-azure-eventgrid-py","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/azure-eventgrid-py","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34928 github stars · SKILL.md body (4,734 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T18:50:30.303Z","embedding":null,"createdAt":"2026-04-18T21:32:24.014Z","updatedAt":"2026-04-24T18:50:30.303Z","lastSeenAt":"2026-04-24T18:50:30.303Z","tsv":"'/api/events':58,78 '/myapp':303 '/myapp/items':200 '/myapp/items/123':240 '/myapp/orders':127,143 '/myapp/orders/12345':172 '/subscriptions':262 '/topics':263 '1':364 '1.0':91,184,257 '10':154 '12345':131,179 '2':372 '3':379 '4':385 '5':394 '6':404 '99.99':133,181 'action':425 'amount':132,180 'applic':36,369,419 'application/json':214 'appropri':406 'architectur':21 'ask':463 'async':274,285,291,345,387 'asyncio':311 'asyncio.run':312 'attribut':233 'authent':63 'auto':266 'auto-set':265 'await':307,355 'azur':2,5,22,45,48,101 'azure-eventgrid':44 'azure-eventgrid-pi':1 'azure-ident':47 'azure-n':100 'azure.eventgrid':70,108,161 'azure.eventgrid.aio':278,328 'azure.identity':66,113 'azure.identity.aio':282 'bash':41,52 'batch':373 'best':362 'boundari':471 'build':32 'built':401 'built-in':400 'case':88 'clarif':465 'class':86 'clear':438 'client':79,116,275,297,354,388 'client.send':134,155,185,308,356 'cloud':89 'cloudev':16,92,105,111,123,139,189,193,299,366 'content':216 'credenti':73,82,289,295,351 'criteria':474 'custom':229,232,335 'data':128,144,176,182,204,249,255,304 'datacontenttyp':213 'dataschema':218 'datetim':165,167 'datetime.now':224,270 'def':286 'defaultazurecredenti':68,74,115,119,284,290,352 'deliveri':325 'describ':426,442 'differ':333 'driven':20,35 'endpoint':55,61,75,81,118,294,332,338,348,350 'environ':50,454 'environment-specif':453 'event':6,14,19,23,28,34,83,90,96,121,122,135,137,138,156,169,173,186,187,192,197,202,207,237,243,247,253,268,288,298,309,314,317,321,357,374,378,397,407 'event-driven':18,33 'eventgrid':3,46,53,59 'eventgrid.azure.net':57,62,77,339 'eventgrid.azure.net/api/events':56,76 'eventgridev':99,158,163,170,234,238 'eventgridpublishercli':72,80,110,117,280,293,330,347 'execut':421 'expert':459 'extens':228 'f':147 'filter':384,412 'format':85,103 'grid':7,24,97,318,322,398 'handl':15,395 'hello':306 'high':391 'high-throughput':390 'id':130,146,178 'ident':49 'import':67,71,109,114,162,166,279,283,310,329 'includ':380 'industri':370 'input':468 'instal':40,43 'interoper':94 'items/123':210 'key':205,250 'limit':430 'match':439 'meaning':381 'messag':305 'miss':476 'multipl':136,377 'my-top':342 'myapp.events.itemcreated':195 'myapp.events.ordercreated':125,141,175 'myapp.events.test':301 'myapp.itemcreated':245 'name':341,361 'namespac':60,315,319,323,331,337,349,358 'nativ':102 'new':368 'option':211,215,220,226,231,264,272 'order':129,145,148,177 'output':448 'overview':429 'payload':208,254 'permiss':469 'pip':42 'practic':363 'properti':188,190,235 'pub/sub':38 'publish':13,104,157,287,313,376 'pull':324 'py':4 'python':10,27,64,106,159,191,236,276,326 'rang':153 'recommend':95 'requir':196,201,241,246,252,258,467 'retri':396,403 'review':460 'rout':29,410 'safeti':470 'scenario':393 'schema':98,221,259 'schema.example':219 'scope':441 'sdk':8,25 'semant':39 'servic':30 'set':267,405 'singl':120 'skill':417,433 'skill-azure-eventgrid-py' 'sourc':126,142,199,203,302 'source-sickn33' 'specif':455 'standard':93,371 'stop':461 'subject':171,209,239,242,382 'subject/path':212 'substitut':451 'success':473 'task':437 'test':457 'throughput':392 'time':223,269 'timestamp':227,273 'timezon':168 'timezone.utc':225,271 'topic':54,261,316,336,340,344,359,360 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'treat':446 'type':84,124,140,174,194,198,217,244,248,300,408 'url':222 'use':11,87,365,386,415,431 'valid':456 'valu':206,230,251 'variabl':51 'version':183,256,260 'workflow':423","prices":[{"id":"7e4c3adb-e058-46ca-acbf-a9fcee86c8a0","listingId":"94460c6f-97fc-4fc4-9bc1-ccce4ae347b1","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:32:24.014Z"}],"sources":[{"listingId":"94460c6f-97fc-4fc4-9bc1-ccce4ae347b1","source":"github","sourceId":"sickn33/antigravity-awesome-skills/azure-eventgrid-py","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-eventgrid-py","isPrimary":false,"firstSeenAt":"2026-04-18T21:32:24.014Z","lastSeenAt":"2026-04-24T18:50:30.303Z"}],"details":{"listingId":"94460c6f-97fc-4fc4-9bc1-ccce4ae347b1","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"azure-eventgrid-py","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34928,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-24T06:41:17Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"08a40df3254eebea8278ad34efa4a85ca98ba1fc","skill_md_path":"skills/azure-eventgrid-py/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-eventgrid-py"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"azure-eventgrid-py","description":"Azure Event Grid SDK for Python. Use for publishing events, handling CloudEvents, and event-driven architectures."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/azure-eventgrid-py"},"updatedAt":"2026-04-24T18:50:30.303Z"}}