File tree 4 files changed +35
-0
lines changed
4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM python:3-onbuild
2
+ CMD [ "python" , "./app.py" ]
Original file line number Diff line number Diff line change
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
+ ```
Original file line number Diff line number Diff line change
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" )
Original file line number Diff line number Diff line change
1
+ Flask == 0.10.1
2
+ guessit == 0.10.1
You can’t perform that action at this time.
0 commit comments