Skip to content

Commit 1236cce

Browse files
committed
feat: add platform agnostic uname() for user agent
1 parent e28bc15 commit 1236cce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

appwrite/client.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import io
22
import json
33
import os
4+
import platform
45
import requests
56
from .input_file import InputFile
67
from .exception import AppwriteException
@@ -13,7 +14,7 @@ def __init__(self):
1314
self._endpoint = 'https://cloud.appwrite.io/v1'
1415
self._global_headers = {
1516
'content-type': '',
16-
'user-agent' : f'AppwritePythonSDK/9.0.1 ({os.uname().sysname}; {os.uname().version}; {os.uname().machine})',
17+
'user-agent' : f'AppwritePythonSDK/9.0.1 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
1718
'x-sdk-name': 'Python',
1819
'x-sdk-platform': 'server',
1920
'x-sdk-language': 'python',

0 commit comments

Comments
 (0)