Developers
  • Introduction
  • Overview
    • Start here
    • Code examples
      • node.js
      • php
      • curl
      • C# / .NET
      • python
      • Postman
    • Introduction
    • More about API
    • Location of servers
    • API Status
    • Recent updates
Powered by GitBook
On this page
  1. Overview
  2. Code examples

python

import requests

url = 'https://api.taggun.io/api/receipt/v1/simple/file'

headers = {'apikey': 'yourapikey'}

files = {
  'file': (
    '1_Dinner.jpg', # set a filename for the file
    open('1_Dinner.jpg', 'rb'), # the actual file
    'image/jpg'), # content-type for the file

  # other optional parameters for Taggun API (eg: incognito, refresh, ipAddress, language)
  'incognito': (
    None, #must set to none for optional parameters
    'false') #value for the parameters
  }

response = requests.post(url, files=files, headers=headers)

print(response.content)
PreviousC# / .NETNextPostman

Last updated 3 years ago