Unable to use Python to create a group

I am trying to create a new group using Python, my code is the following. But I keep receiving error. I could be wrong but I assume it has something to do with the User-Agent in the header (which is missing here since I do not know the User-Agent of the Purple Air End). Does anyone know what to do with it?

My Python Code:
import requests
my_headers = {‘Content-Type’:‘application/json’,
‘X-API-Key’ : ‘***** my WRITE api-key *******’}
in_values = {‘name’:‘Alaska’}
url=‘https://api.purpleair.com/v1/groups
response = requests.post(url, headers=my_headers, data=in_values)
print(response.text)

The Error Information:

Hello,
This worked for me:

import json
import requests

header_data = {'X-API-Key': 'XX'} # Make sure that your API key has write permissions enabled
query = json.loads('{"name": "Alaska"}')

def create_purple_air_group(header_data, query):
  request_url = 'https://api.purpleair.com/v1/groups'
  r = requests.post(request_url, data=query, headers=header_data)

  return r
  
r = create_purple_air_group(header_data, query)
assert r.status_code == 201