diff --git a/.travis.yml b/.travis.yml
index 3524174..eb82890 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,6 @@
 language: python
 python:
   - "2.7"
-  - "3.4"
   - "3.5"
   - "3.6"
 matrix:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index be90790..1c5a58d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -100,7 +100,7 @@ Before you submit a pull request, check that it meets these guidelines:
 2. If the pull request adds functionality, the docs should be updated. Put
    your new functionality into a function with a docstring, and add the
    feature to the list in README.rst.
-3. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check
+3. The pull request should work for Python 2.7, 3.5 and 3.6, and for PyPy. Check
    https://travis-ci.org/hetznercloud/hetznercloud-python/pull_requests
    and make sure that the tests pass for all supported Python versions.
 
diff --git a/hcloud/hcloud.py b/hcloud/hcloud.py
index 4e20f24..c580534 100644
--- a/hcloud/hcloud.py
+++ b/hcloud/hcloud.py
@@ -15,7 +15,7 @@ from hcloud.images.client import ImagesClient
 from hcloud.locations.client import LocationsClient
 from hcloud.datacenters.client import DatacentersClient
 
-from .version import VERSION
+from .version import VERSION, USER_AGENT_PREFIX
 
 
 class HcloudAPIException(Exception):
@@ -29,9 +29,11 @@ class HcloudClient(object):
     version = VERSION
     retry_wait_time = 0.5
 
-    def __init__(self, token):
+    def __init__(self, token, api_endpoint="https://api.hetzner.cloud/v1", application_name=None, application_version=None):
         self.token = token
-        self.api_endpoint = "https://api.hetzner.cloud/v1"
+        self._api_endpoint = api_endpoint
+        self._application_name = application_name
+        self._application_version = application_version
 
         self.datacenters = DatacentersClient(self)
         self.locations = LocationsClient(self)
@@ -45,7 +47,18 @@ class HcloudClient(object):
         self.floating_ips = FloatingIPsClient(self)
 
     def _get_user_agent(self):
-        return "hcloud-python/" + self.version
+        if self._application_name is not None and self._application_version is None:
+            return "{application_name} {prefix}/{version}".format(application_name=self._application_name,
+                                                                  prefix=USER_AGENT_PREFIX,
+                                                                  version=self.version)
+        elif self._application_name is not None and self._application_version is not None:
+            return "{application_name}/{application_version} {prefix}/{version}".format(
+                application_name=self._application_name,
+                application_version=self._application_version,
+                prefix=USER_AGENT_PREFIX,
+                version=self.version)
+        else:
+            return "{prefix}/{version}".format(prefix=USER_AGENT_PREFIX, version=self.version)
 
     def _get_headers(self):
         headers = {
@@ -73,7 +86,7 @@ class HcloudClient(object):
     def request(self, method, url, tries=1, **kwargs):
         response = requests.request(
             method,
-            self.api_endpoint + url,
+            self._api_endpoint + url,
             headers=self._get_headers(),
             **kwargs
         )
diff --git a/hcloud/version.py b/hcloud/version.py
index 1f6518e..471dc57 100644
--- a/hcloud/version.py
+++ b/hcloud/version.py
@@ -1,1 +1,2 @@
 VERSION = '0.1.0'
+USER_AGENT_PREFIX = 'hcloud-python'

Allow Endpoint to be set
We should support the same Client Configuration as the hcloud-go. 

So we should also allow the user to customize the endpoint, instead of hardcoding it.


diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py
index 5d87f6e..3caffc2 100644
--- a/tests/integration/conftest.py
+++ b/tests/integration/conftest.py
@@ -6,6 +6,5 @@ from hcloud import HcloudClient
 
 @pytest.fixture(autouse=True, scope='function')
 def hetzner_client():
-    hetzner_client = HcloudClient(token="test-token")
-    hetzner_client.api_endpoint = os.getenv("FAKE_API_ENDPOINT", default="http://localhost:8080")
+    hetzner_client = HcloudClient(token="test-token", api_endpoint=os.getenv("FAKE_API_ENDPOINT", default="http://localhost:4000"))
     return hetzner_client
diff --git a/tests/unit/test_hcloud.py b/tests/unit/test_hcloud.py
index 2215c11..df1996f 100644
--- a/tests/unit/test_hcloud.py
+++ b/tests/unit/test_hcloud.py
@@ -55,6 +55,16 @@ class TestHetznerClient(object):
         user_agent = client._get_user_agent()
         assert user_agent == "hcloud-python/0.0.0"
 
+    def test__get_user_agent_with_application_name(self, client):
+        client = HcloudClient(token="project_token", application_name="my-app")
+        user_agent = client._get_user_agent()
+        assert user_agent == "my-app hcloud-python/0.0.0"
+
+    def test__get_user_agent_with_application_name_and_version(self, client):
+        client = HcloudClient(token="project_token", application_name="my-app", application_version="1.0.0")
+        user_agent = client._get_user_agent()
+        assert user_agent == "my-app/1.0.0 hcloud-python/0.0.0"
+
     def test__get_headers(self, client):
         headers = client._get_headers()
         assert headers == {

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest tox mock
apt-get update apt-get install -y gcc
3.9
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.16
arrow==0.12.1
babel==2.17.0
cachetools==5.5.2
certifi==2025.1.31
chardet==5.2.0
colorama==0.4.6
CommonMark==0.5.4
distlib==0.3.9
docutils==0.21.2
exceptiongroup==1.2.2
filelock==3.18.0
future==0.17.1
-e git+https://github.com/hetznercloud/hcloud-python.git@0b1c03afe6ccc4cf50ccfa1aad1fb3367c4d6041#egg=hcloud
idna==2.7
imagesize==1.4.1
iniconfig==2.1.0
Jinja2==3.1.6
MarkupSafe==3.0.2
mock==5.2.0
packaging==24.2
platformdirs==4.3.7
pluggy==1.5.0
Pygments==2.19.1
pyproject-api==1.9.0
pytest==8.3.5
python-dateutil==2.7.5
recommonmark==0.4.0
requests==2.20.0
six==1.17.0
snowballstemmer==2.2.0
Sphinx==1.8.1
sphinx-rtd-theme==0.4.2
sphinxcontrib-serializinghtml==2.0.0
sphinxcontrib-websupport==1.2.4
tomli==2.2.1
tox==4.25.0
typing_extensions==4.13.0
urllib3==1.24.3
virtualenv==20.29.3

name: hcloud-python
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.16
      - arrow==0.12.1
      - babel==2.17.0
      - cachetools==5.5.2
      - certifi==2025.1.31
      - chardet==5.2.0
      - colorama==0.4.6
      - commonmark==0.5.4
      - distlib==0.3.9
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - filelock==3.18.0
      - future==0.17.1
      - idna==2.7
      - imagesize==1.4.1
      - iniconfig==2.1.0
      - jinja2==3.1.6
      - markupsafe==3.0.2
      - mock==5.2.0
      - packaging==24.2
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pygments==2.19.1
      - pyproject-api==1.9.0
      - pytest==8.3.5
      - python-dateutil==2.7.5
      - recommonmark==0.4.0
      - requests==2.20.0
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==1.8.1
      - sphinx-rtd-theme==0.4.2
      - sphinxcontrib-serializinghtml==2.0.0
      - sphinxcontrib-websupport==1.2.4
      - tomli==2.2.1
      - tox==4.25.0
      - typing-extensions==4.13.0
      - urllib3==1.24.3
      - virtualenv==20.29.3
prefix: /opt/conda/envs/hcloud-python

tests/unit/test_hcloud.py::TestHetznerClient::test__get_user_agent_with_application_name tests/unit/test_hcloud.py::TestHetznerClient::test__get_user_agent_with_application_name_and_version
tests/unit/test_hcloud.py::TestHetznerClient::test__get_user_agent tests/unit/test_hcloud.py::TestHetznerClient::test__get_headers tests/unit/test_hcloud.py::TestHetznerClient::test_request_library_mocked tests/unit/test_hcloud.py::TestHetznerClient::test_request_ok tests/unit/test_hcloud.py::TestHetznerClient::test_request_fails tests/unit/test_hcloud.py::TestHetznerClient::test_request_500 tests/unit/test_hcloud.py::TestHetznerClient::test_request_broken_json_200 tests/unit/test_hcloud.py::TestHetznerClient::test_request_empty_content_200 tests/unit/test_hcloud.py::TestHetznerClient::test_request_500_empty_content tests/unit/test_hcloud.py::TestHetznerClient::test_request_limit tests/unit/test_hcloud.py::TestHetznerClient::test_request_limit_then_success
hcloud/hcloud.py .travis.yml CONTRIBUTING.md hcloud/version.py
hcloud/hcloud.py .travis.yml CONTRIBUTING.md hcloud/version.py