kopisapi

This program provides data related to Korean performances.


License
MIT
Install
pip install kopisapi==0.1.2

Documentation

KOPIS API

KOPIS(๊ณต์—ฐ ์˜ˆ์ˆ  ํ†ตํ•ฉ ์ „์‚ฐ๋ง)์˜ ๋ฐ์ดํ„ฐ๋ฅผ
์‰ฝ๊ฒŒ ํ™œ์šฉํ•˜๊ธฐ ์œ„ํ•ด ๋งŒ๋“  API์ž…๋‹ˆ๋‹ค.

How to install

pip install kopisapi

How to use

from kopisapi import KopisAPI

kopis = KopisAPI("INPUT YOUR KOPIS SERVICE KEY")

kopis.get_performance_list(start_date="20220101",end_date="20220102")

๐Ÿ’ก KOPIS SERVICE KEY ๋Š” ๋ฐ‘์— ๋งํฌ๋ฅผ ํ†ตํ•˜์—ฌ ๋ฐœ๊ธ‰ ๋ฐ›์œผ์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
https://www.kopis.or.kr/por/cs/openapi/openApiInfo.do?menuId=MNU_00074&searchType=total&searchWord=


๐Ÿ’ ์ด 14๊ฐœ์˜ API ํ•ญ๋ชฉ์„ ์ง€์›ํ•˜๋ฉฐ ๋ชฉ๋ก์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

1. ๊ณต์—ฐ ๋ชฉ๋ก get_performance_list(start_date="20210101", end_date="20220101", region="seoul", genre="musical")
  
2. ๊ณต์—ฐ์‹œ์„ค ๋ชฉ๋ก get_performance_facility_list(region="seoul")
  
3. ๊ธฐํš/์ œ์ž‘์‚ฌ ๋ชฉ๋ก get_production_company_list(genre="musical")

4. ์ถ•์ œ ๋ชฉ๋ก get_festival_list(start_date="20210101", end_date="20220101", region="seoul", genre="musical")

5. ์ˆ˜์ƒ์ž‘ ๋ชฉ๋ก get_award_list(start_date="20210101", end_date="20220101", region="seoul", genre="musical")

6. ๊ทน์ž‘๊ฐ€ ๋ชฉ๋ก get_playwright_list(start_date="20210101", end_date="20220101", region="seoul", genre="musical")

7. ์˜ˆ๋งค ์ƒํ™ฉํŒ get_reservation_status_list(date_type="day", start_date="20220101", region="seoul", genre="musical")

8. ์ผ๋ณ„ ํ‹ฐ์ผ“ํŒ๋งค์ˆ˜ ๋ฐ ํ‹ฐ์ผ“ํŒ๋งค์•ก get_daily_ticket_sales(start_month="202201")

9. ์›”๋ณ„ ํ‹ฐ์ผ“ํŒ๋งค์ˆ˜ ๋ฐ ํ‹ฐ์ผ“ํŒ๋งค์•ก get_monthly_ticket_sales(start_year="2022")

10. ์š”์ผ๋ณ„ ํ‹ฐ์ผ“ํŒ๋งค์ˆ˜ ๋ฐ ํ‹ฐ์ผ“ํŒ๋งค์•ก get_day_ticket_sales(start_date="20221217",end_date="20221224")

11. ๊ตญ๋‚ด/๋‚ดํ•œ๋ณ„ ํ†ต๊ณ„ get_statistics_by_domestic_abroad(start_date="20210101", end_date="20220101")

12. ๊ณต์—ฐ ์‹œ์„ค๋ณ„ ํ†ต๊ณ„ get_statistics_by_facility(start_date="20210101", end_date="20220101", region="seoul")

13. ์ง€์—ญ๋ณ„ ํ†ต๊ณ„ get_statistics_by_region(start_date="20210101", end_date="20220101")

14. ์žฅ๋ฅด๋ณ„ ํ†ต๊ณ„ get_statistics_by_genre(start_date="20210101", end_date="20220101")

15. ๊ณต์—ฐ๋ณ„ ํ†ต๊ณ„ get_statistics_by_performance(start_date="20210101", end_date="20220101", genre="musical")

๐Ÿ’ก API ๋งˆ๋‹ค ์ธ์ž๊ฐ’์ด ์ƒ์ดํ•˜๋ฏ€๋กœ ๋ฐ‘์— ์˜ˆ์‹œ๋ฅผ ํ†ตํ•˜์—ฌ ์ ์ ˆํžˆ ๊ฐ’์„ ์ž…๋ ฅํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

API์— ์ž…๋ ฅ๋˜๋Š” ์ธ์ž๊ฐ’์€ ๋ชจ๋‘ string type์ž…๋‹ˆ๋‹ค.

  • start_date="๋…„/์›”/์ผ"
  • end_date="๋…„/์›”/์ผ"
  • start_month="๋…„/์›”"
  • start_year="๋…„"
  • date_type=["month","week","day"]
  • region=["seoul","busan","daegu","inchon","gwangju","daejeon","ulsan","sejong","gyeonggi", "gangwon","chungbuk","chungnam","jeonbuk","jeonnam","gyeongbuk","gyeongnam","jeju"]
  • genre=["act","musical","dance","classic","opera","korean_classical","complex"]

์ถœ์ฒ˜: (์žฌ)์˜ˆ์ˆ ๊ฒฝ์˜์ง€์›์„ผํ„ฐ ๊ณต์—ฐ์˜ˆ์ˆ ํ†ตํ•ฉ์ „์‚ฐ๋ง(www.kopis.or.kr)