# Python client introduction

## Install the client

The easy way to install TinyChain's Python client is using Pip:

```bash
# on newer operating systems this command may be "pip" instead of "pip3"
pip3 install tinychain
```

## Hello, World!

You can verify that you've installed the Python client correctly by running this Hello, World! program:

```python
import tinychain as tc

# This host is available for demonstration purposes, but may be slow
# due to the volume of requests it receives.
HOST = tc.host.Host("http://demo.tinychain.net")

# This endpoint will attempt to execute resolve whatever State it receives,
# without committing any write operations.
ENDPOINT = "/transact/hypothetical"

@tc.get_op
def hello(name: tc.String):
    return tc.String("Hello, {{name}}!").render(name=name)

if __name__ == "__main__":
    cxt = tc.Context()
    cxt.hello = hello
    cxt.result = cxt.hello("World")
    print(HOST.post(ENDPOINT, cxt))
```

If you have any trouble with the host at demo.tinychain.net, you can run your own host by following the steps in [Install TinyChain](/fundamentals/install-tinychain.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tinychain.net/guides/python-client-introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
