Skip to content

Commit 248df5c

Browse files
committed
Remove serve
1 parent 75e609a commit 248df5c

File tree

3 files changed

+2
-153
lines changed

3 files changed

+2
-153
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ This repository contains:
66

77
- `ditto clone`: a script to crawl an instance of PokeAPI and download all data
88
- `ditto analyze`: a script to generate a JSON schema of the above data
9-
- `ditto transform`: a script to apply a new base url to the above data
10-
- `ditto serve`: a script to serve the data in the same form as PokeAPI
11-
- with full support for dynamic pagination using GET args `offset` and `limit`
9+
- `ditto transform`: a script to apply a new base url to the above data and schema
1210

1311
## Usage
1412

pokeapi_ditto/commands/serve.py

Lines changed: 0 additions & 138 deletions
This file was deleted.

pokeapi_ditto/main.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from gevent.pywsgi import WSGIServer
55

66
from pokeapi_ditto import __version__
7-
from pokeapi_ditto.commands import analyze, clone, serve, transform
7+
from pokeapi_ditto.commands import analyze, clone, transform
88

99

1010
class Ditto(object):
@@ -25,11 +25,6 @@ def __init__(self):
2525
analyze_args = subparsers.add_parser("analyze")
2626
analyze_args.add_argument("--data-dir", type=str, default="./data")
2727

28-
serve_args = subparsers.add_parser("serve")
29-
serve_args.add_argument("--port", type=int, default=80)
30-
serve_args.add_argument("--base-url", type=str, default="")
31-
serve_args.add_argument("--root-dir", type=str, default="./data")
32-
3328
args = vars(parser.parse_args(sys.argv[1:]))
3429
command = args.pop("command")
3530
if command is None:
@@ -53,12 +48,6 @@ def transform(args):
5348
def analyze(args):
5449
analyze.do_analyze(**args)
5550

56-
@staticmethod
57-
def serve(args):
58-
port = args.pop("port")
59-
app = serve.create_app(**args)
60-
WSGIServer(("", port), app).serve_forever()
61-
6251

6352
def main():
6453
Ditto()

0 commit comments

Comments
 (0)