Python API programming

Published by onesixx on

API(Application Programming Interface)

web API (over the network or internet using HTTP request verbs)

: GET, POST, PUT

: HEAD, CONNECT, OPTIONS, TRACE, PATCH

https://api.coindesk.com/v1/bpi/currentprice.json

vscode ~ new file ~ select language : json ~ Shift+Option(alt)+ F ==> json 예쁘게 보기

JSON
Shell
Python

json

https://docs.python.org/3.10/library/json.html

형태 변화 없이 형변환만 str으로

Python

API사용하는 이유

  • 여러 Application 을 통합
  • cross-platform Application 만들기
  • Application의 기능 강화
  • Application에 외부접근 제공
  • app backend로써

API Design Patterns

복잡한 HTTP methods를 간략하기 위해 , HTTP architecture patterns을 사용

  • RESTful APIs
  • GraphQL APIs
  • CRUD APIs
  • SOAP APIs

RESTful APIs 의 methods

  • GET
  • POST
  • PUT
  • DELETE

Building API

Python
Categories: dash

onesixx

Blog Owner

guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x