From 62b33b8cc43d346873f440b5cfc6b2b256416d1d Mon Sep 17 00:00:00 2001 From: Anson Date: Fri, 28 Feb 2020 19:22:14 -0700 Subject: [PATCH] init commit --- .gitignore | 1 + Dockerfile | 3 +++ main.py | 17 +++++++++++++++++ quotes.json | 20 ++++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 main.py create mode 100644 quotes.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ed8ebf5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cfa3f5d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7 + +COPY ./ /app \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..5c3ce50 --- /dev/null +++ b/main.py @@ -0,0 +1,17 @@ +from fastapi import FastAPI +import json +import random + +quotes = json.load(open("quotes.json")) + +app = FastAPI() + + +@app.get("/") +async def quote(): + return {"message": random.choice(quotes)} + + +@app.get("/dump") +async def dump(): + return quotes diff --git a/quotes.json b/quotes.json new file mode 100644 index 0000000..81b29bb --- /dev/null +++ b/quotes.json @@ -0,0 +1,20 @@ +[ + "My side chick got pregnant by her main dude and i'm offended.", + "I kiss your lady, eat her pussy, then kiss the baby.", + "Left hand on that steering wheel, right hand on that pussy!", + "For my birthday I threw me a surprise party!", + "She got a big booty so I call her big booty", + "My girl got a big purse with a purse in it and her pussy so clean, I can go to church in it!", + "Beat the pussy up, I need riot gear.", + "Gas in a Ziplock, now thats loud and clear.", + "My wrist deserve a shout out, 'I'm like what up wrist?' My stove deserve a shout out, 'I'm like what up stove?'", + "I'm in the kitchen. Yams errrrrwhere.", + "I encourage everyone to pay attention to the issues that matter to you, from jobs and the economy, to education and our schools, to criminal justice reform. Whatever it is that you care about, make sure you use your voice.", + "If you a chicken head, go somewhere and lay some eggs", + "Chain hang to my ding-a-ling, chain hang, chain hang to my ding-a-ling", + "I tried to get a tan but I'm black already.", + "Then I put a fat rabbit on a Craftmatic!", + "Yeah, I love them strippers", + "If I wasn't rapping I'd be trapping.", + "Started from the trap, now I rap" +]