Python read item state

Hi,
I am trying to write python script to read one of my item state…I look at the example but not able to find place where to put the url and item…for example: my oh server setup 192.168.1.100 port:1122 user:test pass:testing the item is “myceilinglight”…i want to write python script myceiling.py…i dont know where to input my setup in the code

myceiling.py

def get_status(self, name):
""" Request updates for any item in group NAME from OpenHAB.
Long-polling will not respond until item updates.
"""
# When an item in Group NAME changes we will get all items in the group
# and need to determine which has changed
url = ‘http://%s:%s/rest/items/%s’%(self.openhab_host,
self.openhab_port, name)
payload = {‘type’: ‘json’}
try:
req = requests.get(url, params=payload,
headers=self.polling_header())
if req.status_code != requests.codes.ok:
req.raise_for_status()
# Try to parse JSON response
# At top level, there is type, name, state, link and members array
members = req.json()[“members”]
for member in members:
# Each member has a type, name, state and link
name = member[“name”]
state = member[“state”]
do_publish = True
# Pub unless we had key before and it hasn’t changed
if name in self.prev_state_dict:
if self.prev_state_dict[name] == state:
do_publish = False
self.prev_state_dict[name] = state
if do_publish:
self.publish(name, state)