Skip to content

Commit 921a90e

Browse files
committed
Add python platform & version, system platform to user agent.
1 parent 705f611 commit 921a90e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Adafruit_IO/client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,21 @@
1919
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020
# SOFTWARE.
2121
import json
22+
import pkg_resources
23+
import platform
2224

2325
import requests
2426

2527
from .errors import RequestError, ThrottlingError
2628
from .model import Data, Feed, Group
2729

2830
# set outgoing version, pulled from setup.py
29-
import pkg_resources
3031
version = pkg_resources.require("Adafruit_IO")[0].version
3132
default_headers = {
32-
'User-Agent': 'AdafruitIO-Python/{0}'.format(version)
33+
'User-Agent': 'AdafruitIO-Python/{0} ({1}, {2} {3})'.format(version,
34+
platform.platform(),
35+
platform.python_implementation(),
36+
platform.python_version())
3337
}
3438

3539
class Client(object):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
setup(
1818
name = 'adafruit-io',
19-
version = '1.1.0',
19+
version = '1.1.1',
2020
author = 'Justin Cooper',
2121
author_email = '[email protected]',
2222
packages = ['Adafruit_IO'],

0 commit comments

Comments
 (0)