File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 0.37.1 - TBD
4+
5+ #### Enhancements
6+ - Added platform information to the user agent reported by the ` Historical ` and ` Live ` clients
7+
38## 0.37.0 - 2024-07-09
49
510#### Enhancements
Original file line number Diff line number Diff line change 1- import sys
1+ import platform
2+ import re
3+ from typing import Final
24
35from databento .version import __version__
46
57
6- PYTHON_VERSION = f"{ sys .version_info .major } .{ sys .version_info .minor } "
7- USER_AGENT = f"Databento/{ __version__ } Python/{ PYTHON_VERSION } "
8+ TOKEN_PATTERN : Final = re .compile (r"[^a-zA-Z0-9\.]" )
9+
10+ PLATFORM_NAME : Final = TOKEN_PATTERN .sub ("-" , platform .system ())
11+ PLATFORM_VERSION : Final = TOKEN_PATTERN .sub ("-" , platform .release ())
12+ PYTHON_VERSION : Final = TOKEN_PATTERN .sub ("-" , platform .python_version ())
13+
14+ USER_AGENT : Final = (
15+ f"Databento/{ __version__ } Python/{ PYTHON_VERSION } { PLATFORM_NAME } /{ PLATFORM_VERSION } "
16+ )
You can’t perform that action at this time.
0 commit comments