Skip to content

Instantly share code, notes, and snippets.

swagger: '2.0'
host: 'api.predic8.de:443'
basePath: /shop
schemes:
- https
info:
title: Fruit Shop API
version: 1.0.0
description: >-
This is a showcase for REST API design and serves as a public API for
./bin/kafka-console-producer.sh --bootstrap-server 127.0.0.1:9092 --topic metrics
./bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic metrics
@predic8
predic8 / covid.py
Created March 30, 2020 20:15
Covid API mit Datum
import falcon
from json import load, dumps
import datetime
with open('db.json') as f:
db = load(f)["records"]
def trans(r):
return {
"Land": r["geoId"],
import matplotlib.pyplot as plt
p = 1000
i = 1
r = 3
imun = 0
openapi: "3.0.0"
info:
version: 1.0.0
title: X API
paths: {}
openapi: "3.0.0"
info:
version: 1.0.0
title: ASA API
paths: {}
{
"id": 731,
"date": "16th of May 2011",
"customer": 17,
"items" : [
{
"quantity": 5,
"description": "Oolong",
"price": 5.98,
"in-stock": true
{
"id": "060EE52B-B3A5-4650-85B3-76B7F9BFE5C3",
"number": "DN-34-1323",
"date": "2020-23-02",
"image": {
"type": "jpeg",
"size": 50000
},
"tags": ["ANPR", "Transportation","Whitelist"]
}
@predic8
predic8 / poll.py
Created March 2, 2020 20:37
Event Store Demo Dateien
import requests
from requests.auth import HTTPBasicAuth
import logging
import json
from uuid import uuid4
from time import sleep
headers= { "Accept": "application/vnd.eventstore.events+json" }
auth=HTTPBasicAuth('changeit', 'changeit');