Skip to content

Commit b37e26e

Browse files
haoruizhouclaude
andcommitted
Add HttpInfluxClient for HTTPS/Cloudflare environments; v0.2.1
gRPC/Arrow Flight is blocked through Cloudflare tunnels (HTTP/2 not passed through). HttpInfluxClient uses /api/v3/query_sql over plain HTTPS with JSON responses as a drop-in replacement for InfluxDBClient3. Auto-selected by get_influx_client() when host starts with https://. Local http:// stacks continue to use InfluxDBClient3 (gRPC). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8e82cb0 commit b37e26e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/slicks/fetcher.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def __init__(self, v):
1616
self._v = v
1717

1818
def as_py(self):
19+
"""Return the wrapped Python value."""
1920
return self._v
2021

2122

@@ -33,9 +34,11 @@ def __init__(self, df: pd.DataFrame):
3334

3435
@property
3536
def num_rows(self) -> int:
37+
"""Number of rows in the result."""
3638
return len(self._df)
3739

3840
def column(self, name: str) -> List[_Scalar]:
41+
"""Return a column as a list of _Scalar values with .as_py()."""
3942
if name not in self._df.columns:
4043
return []
4144
return [_Scalar(v) for v in self._df[name]]
@@ -85,12 +88,15 @@ def query(self, query: str, mode: str = None, database: str = None, **kwargs) ->
8588
return _ArrowLike(df)
8689

8790
def close(self):
91+
"""No-op — kept for interface compatibility with InfluxDBClient3."""
8892
pass
8993

9094
def __enter__(self):
95+
"""Context manager entry."""
9196
return self
9297

9398
def __exit__(self, *_):
99+
"""Context manager exit."""
94100
pass
95101

96102

0 commit comments

Comments
 (0)