LoginSignup
8
5

More than 3 years have passed since last update.

Pythonでrequestsを使ってhashAPIをコールする関数

Posted at

よく使うのでメモ

import sys
import requests

def main(hash):
    url = "http://xxxyyy/api/hash"
    p = {"q" : hash}
    r = requests.get(url,params=p)
    print(r.json()["hash"])
8
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
5