Skip to content

Commit 94d6435

Browse files
committed
First commit
0 parents  commit 94d6435

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM python:3-onbuild
2+
CMD [ "python", "./app.py" ]

Readme.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Guessit API
2+
3+
### Build
4+
5+
```
6+
docker build -t gregdel/guessit .
7+
```
8+
9+
### Launch
10+
11+
```
12+
docker run -it --rm -p 127.0.0.1:5000:5000 --name guessit gregdel/guessit
13+
```
14+
15+
### Use
16+
17+
```
18+
curl http://localhost:5000/guess/your.filename.mp4
19+
```

app.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from flask import Flask
2+
from flask import jsonify
3+
from guessit import guess_file_info
4+
5+
app = Flask(__name__)
6+
7+
@app.route("/guess/<filename>")
8+
def guess(filename):
9+
return jsonify(guess_file_info(filename))
10+
11+
if __name__ == "__main__":
12+
app.run(host="0.0.0.0")

requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Flask==0.10.1
2+
guessit==0.10.1

0 commit comments

Comments
 (0)