# Python SDK sample: ziti-socket-sample.py

**URL:** https://openziti.discourse.group/t/python-sdk-sample-ziti-socket-sample-py/585
**Category:** SDK Questions
**Created:** [June 15, 2022, 12:21pm UTC](https://openziti.discourse.group/t/python-sdk-sample-ziti-socket-sample-py/585 "2022-06-15T12:21:25Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)
#### Post date: [June 15, 2022, 12:21pm UTC](https://openziti.discourse.group/t/python-sdk-sample-ziti-socket-sample-py/585/1 "2022-06-15T12:21:25Z")

</div>

I am working through how to run this example.. and are not really sure what you need.

I have the host running in a local docker instance..

> [http://httpbin.ziti:80](http://httpbin.ziti:80)

From what I understand, this is all you need.. however, when I run the sample it generates an error

I was thinking.. where is the client identity.. so I reran it setting the local variable

ZITI\_IDENTITIES="$HOME/public.dns.client.json"

However.. this did not change anything

The error appears to origination from line 22

sock.connect(('httpbin.ziti', 80))

> any tips on where to look?

 ![Screen Shot 2022-06-15 at 10.14.55 pm](https://global.discourse-cdn.com/free1/uploads/netfoundry/original/1X/c0405f774e806d2d6b52734682c6dbbdeaf07e59.png)

---

<div class="post-metadata">

### Author: ![qrkourier](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/qrkourier/32/52_2.png) [@qrkourier](https://openziti.discourse.group/u/qrkourier)
#### Post date: [June 15, 2022, 4:13pm UTC](https://openziti.discourse.group/t/python-sdk-sample-ziti-socket-sample-py/585/2 "2022-06-15T16:13:05Z")

</div>

@markamind Subscribing myself here because I’m working through these samples myself today and tomorrow.

---

<div class="post-metadata">

### Author: ![ekoby](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/ekoby/32/14_2.png) [@ekoby](https://openziti.discourse.group/u/ekoby)
#### Post date: [June 15, 2022, 7:35pm UTC](https://openziti.discourse.group/t/python-sdk-sample-ziti-socket-sample-py/585/3 "2022-06-15T19:35:26Z")

</div>

@markamind most likely you don’t have the service that _intercepts_ `httpbin.ziti:80` address. These samples were developed for use with identities provisioned from [ZEDS](https://zeds.openziti.org). You can try that yourself, or modify the sample to fit your setup

---

<div class="post-metadata">

### Author: ![ekoby](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/ekoby/32/14_2.png) [@ekoby](https://openziti.discourse.group/u/ekoby)
#### Post date: [June 15, 2022, 7:38pm UTC](https://openziti.discourse.group/t/python-sdk-sample-ziti-socket-sample-py/585/4 "2022-06-15T19:38:31Z")

</div>

Additionally you can enable debug logging to see what Ziti SDK is doing behind the scenes.  
set `ZITI_LOG` environment variable to desired level `[1-6]`

---

<div class="post-metadata">

### Author: ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)
#### Post date: [June 16, 2022, 12:24am UTC](https://openziti.discourse.group/t/python-sdk-sample-ziti-socket-sample-py/585/5 "2022-06-16T00:24:59Z")

</div>

> [@ekoby](#):
>
> These samples were developed for use with identities provisioned from [ZEDS](https://zeds.openziti.org).

That will be it.. I will aim to hack out something later today to get it working on my local environment

---

<div class="post-metadata">

### Author: ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)
#### Post date: [June 22, 2022, 7:01am UTC](https://openziti.discourse.group/t/python-sdk-sample-ziti-socket-sample-py/585/6 "2022-06-22T07:01:33Z")

</div>

I finally worked out how to run this…

1. you need to have ziti-http-server.py running on the server

2. you need to call ziti-socket-sample.py locally with a tunneler running

It should return the same result as when you tested out the ziti-http-server.py script.

Very happy now 🙂

Time to test these integration samples out more
