- 전체
- Python 일반
- Python 수학
- Python 그래픽
- Python 자료구조
- Python 인공지능
- Python 인터넷
- Python SAGE
- wxPython
- TkInter
- iPython
- wxPython
- pyQT
- Jython
- django
- flask
- blender python scripting
- python for minecraft
- Python 데이터 분석
- Python RPA
- cython
- PyCharm
- pySide
- kivy (python)
Cinema 3 - (Extremely Simplified) Example of Microservices in Python
Overview
microservices-master.zip
Cinema 3 is an example project which demonstrates the use of microservices for a fictional movie theater. The Cinema 3 backend is powered by 4 microservices, all of which happen to be written in Python using Flask.
- Movie Service: Provides information like movie ratings, title, etc.
- Show Times Service: Provides show times information.
- Booking Service: Provides booking information.
- Users Service: Provides movie suggestions for users by communicating with other services.
Requirements
- Python 2.7
- Works on Linux, Windows, Mac OSX and (quite possibly) BSD.
Install
The quick way is use the provided make file.
$ make install
Starting and Stopping Services
To launch the services:
$ make launch
To stop the services:
$ make shutdown
APIs and Documentation
Movie Service (port 5001)
This service is used to get information about a movie. It provides the movie title, rating on a 1-10 scale, director and other information.
To lookup all movies in the database, hit: http://127.0.0.1:5001/movies
GET /movies
Returns a list of all movies.
{
"267eedb8-0f5d-42d5-8f43-72426b9fb3e6": {
"director": "Ryan Coogler",
"id": "267eedb8-0f5d-42d5-8f43-72426b9fb3e6",
"rating": 8.8,
"title": "Creed"
},
...... output truncated ......
To lookup a movie by its id:
GET /movies/7daf7208-be4d-4944-a3ae-c1c2f516f3e6
Returns the specified movie.
{
"director": "Paul McGuigan",
"id": "7daf7208-be4d-4944-a3ae-c1c2f516f3e6",
"rating": 6.4,
"title": "Victor Frankenstein",
"uri": "/movies/7daf7208-be4d-4944-a3ae-c1c2f516f3e6"
}
Showtimes Service (port 5002)
This service is used get a list of movies playing on a certain date.
To lookup all showtimes, hit: http://127.0.0.1:5002/showtimes
GET /showtimes
Returns a list of all showtimes by date.
{
"20151130": [
"720d006c-3a57-4b6a-b18f-9b713b073f3c",
"a8034f44-aee4-44cf-b32c-74cf452aaaae",
"39ab85e5-5e8e-4dc5-afea-65dc368bd7ab"
],
...... output truncated ......
To get movies playing on a certain date:
GET /showtimes/20151201
Returns all movies playing on the date.
[
"267eedb8-0f5d-42d5-8f43-72426b9fb3e6",
"7daf7208-be4d-4944-a3ae-c1c2f516f3e6",
"39ab85e5-5e8e-4dc5-afea-65dc368bd7ab",
"a8034f44-aee4-44cf-b32c-74cf452aaaae"
]
Booking Service (port 5003)
Used to lookup booking information for users.
To get all bookings by all users in the system, hit: http://127.0.0.1:5003/bookings
GET /bookings
Returns a list of booking information for all bookings in the database.
{
"chris_rivers": {
"20151201": [
"267eedb8-0f5d-42d5-8f43-72426b9fb3e6"
]
},
...... output truncated ......
To lookup booking information for a user:
GET /bookings/dwight_schrute
{
"20151201": [
"7daf7208-be4d-4944-a3ae-c1c2f516f3e6",
"267eedb8-0f5d-42d5-8f43-72426b9fb3e6"
],
"20151205": [
"a8034f44-aee4-44cf-b32c-74cf452aaaae",
"276c79ec-a26a-40a6-b3d3-fb242a5947b6"
]
}
User Service (port 5000)
This service returns information about the users of Cinema 3 and also provides movie suggestions to the users. It communicates with other services to retrieve booking or movie information.
To get a list of all the users in the system, hit: http://127.0.0.1:5000/users
GET /users
Returns a list of all users in the database.
{
"chris_rivers": {
"id": "chris_rivers",
"last_active": 1360031010,
"name": "Chris Rivers"
},
...... output truncated ......
To lookup information about a user:
GET /users/michael_scott
{
"id": "michael_scott",
"last_active": 1360031625,
"name": "Michael Scott"
}
To get suggested movies for a user:
GET /users/michael_scott/suggested
[출처] https://github.com/umermansoor/microservices#cinema-3---extremely-simplified-example-of-microservices-in-python
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|
| 11 |
[PyQT5] PyQt5 Mainwindow에 Qt Designer를 사용한 graph Widget 추가
| 졸리운_곰 | 2024.06.06 | 476 |
| 10 |
[PyQT5] [Python with Pyqt5] Widget에다가 그래프 넣기 (Feat. Matplotlib)
| 졸리운_곰 | 2024.06.06 | 437 |
| 9 |
[PyQT5] 파이썬(Python)PyQt5 - QMessageBox 사용하기
| 졸리운_곰 | 2024.06.06 | 455 |
| 8 |
[PyQT5] UI Designer 에서 Tab Widget 생성 하기
| 졸리운_곰 | 2024.06.06 | 420 |
| 7 |
[PyQT5] UI Designer 에서 리사이즈 시 같이 확장하기
| 졸리운_곰 | 2024.06.06 | 537 |
| 6 |
[PyQT5] UI Designer 에서 Grid Layout 배치 해보기
| 졸리운_곰 | 2024.06.06 | 474 |
| 5 |
[pyQT] 「Python : PyQt5」 Qt Designer : .ui → .py 변환
| 졸리운_곰 | 2024.06.05 | 624 |
| 4 |
[pyQT] Dev/python/ [pyqt5] 프로그램창을 항상 가장 위에 있게 하면서 동시에 타이틀 바도 없게 하려면?
| 졸리운_곰 | 2024.06.01 | 542 |
| 3 |
[pyQT] QtDesigner에서 리소스 편집기 사용하기
| 졸리운_곰 | 2024.05.28 | 499 |
| 2 |
[pyQT] Qt Resource 파일 (.qrc) 적용방법
| 졸리운_곰 | 2024.05.28 | 421 |
| 1 | [pyQT] from PyQt5.QtChart import QLineSeries, QChart, QValueAxis, QDateTimeAxis ImportError: DLL load failed while importing QtChart: 지정된 모듈을 찾을 수 없습니다. | 졸리운_곰 | 2024.01.28 | 430 |

