Pārlūkot izejas kodu

[python/hug] Remove Hug (#9645)

Hug hasn't received any updates in 2 years and seems abandonned:
https://github.com/hugapi/hug/issues/897

Also, it only implements the plaintext test, which isn't allowed by the
current rules.
Petrik de Heus 6 mēneši atpakaļ
vecāks
revīzija
0eae980152

+ 0 - 0
frameworks/Python/hug/README.md


+ 0 - 29
frameworks/Python/hug/app.py

@@ -1,29 +0,0 @@
-import hug
-
-from datetime import datetime
-
-
-# Create decorators for mimetypes (JSON is default)
-plaintext = hug.get(output=hug.output_format.text)
-json      = hug.get(output=hug.output_format.json)
-
-
-# Create a directive to add necessary headers
[email protected]_middleware()
-def set_required_headers(request, response, resource):
-    date_obj      = datetime.now()
-    rfc_1123      = "%a, %d %b %Y %H:%M:%S GMT"
-    rfc_1123_date = date_obj.strftime(rfc_1123)
-
-    headers       = { "Server": "hug", "Date": rfc_1123_date }
-
-    response.set_headers(headers)
-
-
-@plaintext
[email protected]("/plaintext")
-def plaintext():
-    """Plaintext handler."""
-    return "Hello, World!"
-
-app = hug.API(__name__).http.server()

+ 0 - 25
frameworks/Python/hug/benchmark_config.json

@@ -1,25 +0,0 @@
-{
-  "framework": "hug",
-  "tests": [
-    {
-      "default": {
-        "plaintext_url": "/plaintext",
-        "port": 8080,
-        "approach": "Realistic",
-        "classification": "Micro",
-        "database": "None",
-        "framework": "Hug",
-        "language": "Python",
-        "flavor": "Python3",
-        "orm": "Raw",
-        "platform": "Falcon",
-        "webserver": "None",
-        "os": "Linux",
-        "database_os": "Linux",
-        "display_name": "Hug",
-        "notes": "CPython 2",
-        "versus": "wsgi"
-      }
-    }
-  ]
-}

+ 0 - 14
frameworks/Python/hug/config.toml

@@ -1,14 +0,0 @@
-[framework]
-name = "hug"
-
-[main]
-urls.plaintext = "/plaintext"
-approach = "Realistic"
-classification = "Micro"
-database = "None"
-database_os = "Linux"
-os = "Linux"
-orm = "Raw"
-platform = "Falcon"
-webserver = "None"
-versus = "wsgi"

+ 0 - 12
frameworks/Python/hug/hug.dockerfile

@@ -1,12 +0,0 @@
-FROM python:3.6.6-stretch
-
-WORKDIR /hug
-COPY app.py app.py
-COPY uwsgi.ini uwsgi.ini
-COPY requirements.txt requirements.txt
-
-RUN pip3 install -r requirements.txt
-
-EXPOSE 8080
-
-CMD ["uwsgi", "--ini", "uwsgi.ini"]

+ 0 - 6
frameworks/Python/hug/requirements.txt

@@ -1,6 +0,0 @@
-Cython==0.28.5
-hug==2.3.2
-uWSGI==2.0.17.1
-greenlet==0.4.14
-gunicorn==19.9.0
-meinheld==0.6.1

+ 0 - 13
frameworks/Python/hug/uwsgi.ini

@@ -1,13 +0,0 @@
-; These preferences specifically tuned for performance.
-
-[uwsgi]
-http=:8080
-chdir=/hug
-wsgi-file=/hug/app.py
-callable=app
-workers=%(%k * 2 + 1)
-processes=%k
-enable-threads=True
-threads=1
-disable-logging=True
-max-worker-lifetime=30