vibe-client 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,53 @@
1
+ # Code generated by smithy-python-codegen DO NOT EDIT.
2
+
3
+ from typing import AsyncIterable
4
+ from urllib.parse import quote as urlquote
5
+
6
+ from smithy_core import URI as _URI
7
+ from smithy_core.aio.types import AsyncBytesReader, SeekableAsyncBytesReader
8
+ from smithy_core.types import TimestampFormat
9
+ from smithy_http import Field, Fields
10
+ from smithy_http.aio import HTTPRequest as _HTTPRequest
11
+ from smithy_http.aio.interfaces import HTTPRequest
12
+ from smithy_json import JSONCodec
13
+
14
+ from .config import Config
15
+ from .models import QueryAgentInput, ServiceError
16
+
17
+
18
+ async def _serialize_query_agent(input: QueryAgentInput, config: Config) -> HTTPRequest:
19
+ if not input.experiment_id:
20
+ raise ServiceError("experiment_id must not be empty.")
21
+
22
+ path = "/agents/{experiment_id}/query".format(
23
+ experiment_id=urlquote(input.experiment_id, safe=''),
24
+ )
25
+ query: str = f''
26
+
27
+ body: AsyncIterable[bytes] = AsyncBytesReader(b'')
28
+ codec = JSONCodec(default_timestamp_format=TimestampFormat.EPOCH_SECONDS)
29
+ content = codec.serialize(input)
30
+ if not content:
31
+ content = b"{}"
32
+ content_length = len(content)
33
+ body = SeekableAsyncBytesReader(content)
34
+
35
+ headers = Fields(
36
+ [
37
+ Field(name="Content-Type", values=["application/json"]),
38
+ Field(name="Content-Length", values=[str(content_length)]),
39
+
40
+ ]
41
+ )
42
+
43
+ return _HTTPRequest(
44
+ destination=_URI(
45
+ host="",
46
+ path=path,
47
+ scheme="https",
48
+ query=query,
49
+ ),
50
+ method="POST",
51
+ fields=headers,
52
+ body=body,
53
+ )
@@ -0,0 +1,128 @@
1
+ Metadata-Version: 2.4
2
+ Name: vibe-client
3
+ Version: 0.1.0
4
+ Summary: vibe client
5
+ License: Apache-2.0
6
+ Keywords: smithy,vibe
7
+ Classifier: Development Status :: 2 - Pre-Alpha
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Intended Audience :: System Administrators
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Natural Language :: English
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Requires-Python: >=3.12
18
+ Requires-Dist: smithy-core<0.1.0
19
+ Requires-Dist: smithy-http[aiohttp]<0.1.0
20
+ Requires-Dist: smithy-json<0.1.0
21
+ Provides-Extra: docs
22
+ Requires-Dist: pydata-sphinx-theme>=0.16.1; extra == 'docs'
23
+ Requires-Dist: sphinx>=8.2.3; extra == 'docs'
24
+ Provides-Extra: tests
25
+ Requires-Dist: pytest-asyncio<0.21.0,>=0.20.3; extra == 'tests'
26
+ Requires-Dist: pytest<8.0.0,>=7.2.0; extra == 'tests'
27
+ Description-Content-Type: text/markdown
28
+
29
+ # Vibe Python SDK
30
+
31
+ A Python client for the Vibe API, enabling seamless interaction with Vibe agents and experiments.
32
+
33
+ ## Installation
34
+
35
+ ```bash
36
+ pip install vibe
37
+ ```
38
+
39
+ ## Features
40
+
41
+ - Easy-to-use client for interacting with Vibe API
42
+ - Comprehensive data models for structuring requests and responses
43
+ - Async support for efficient API communication
44
+ - Built-in error handling and serialization/deserialization
45
+
46
+ ## Quick Start
47
+
48
+ ```python
49
+ import asyncio
50
+ from vibe.models import QueryAgentInput, ObservationValueBox
51
+ from vibe.client import VibeClient
52
+
53
+ async def main():
54
+ # Initialize the client with your API key
55
+ client = VibeClient(api_key="your_api_key_here")
56
+
57
+ # Create observations
58
+ observations = ObservationValueBox([
59
+ [1, 1.2, 3.0],
60
+ [1, 1.2, 3.0],
61
+ [1, 1.2, 3.0],
62
+ [1, 1.2, 3.0],
63
+ [1, 1.2, 3.0]
64
+ ])
65
+
66
+ # Set up query input
67
+ query_input = QueryAgentInput(
68
+ experiment_id="your_experiment_id",
69
+ observations=observations
70
+ )
71
+
72
+ # Execute the query
73
+ try:
74
+ response = await client.query_agent(input=query_input)
75
+ print("Query response:", response)
76
+ print("Actions:", response.actions)
77
+ except Exception as e:
78
+ print(f"Error executing query_agent: {e}")
79
+
80
+ if __name__ == "__main__":
81
+ asyncio.run(main())
82
+ ```
83
+
84
+ ## Documentation
85
+
86
+ Full documentation is available in the `/docs` directory. To build the documentation:
87
+
88
+ ```bash
89
+ cd docs
90
+ make html
91
+ ```
92
+
93
+ The built documentation will be available in `docs/build/html/index.html`.
94
+
95
+ ## Project Structure
96
+
97
+ ```
98
+ vibe/
99
+ ├── src/vibe/ # Main package source code
100
+ │ ├── __init__.py # Package initialization
101
+ │ ├── client.py # API client implementation
102
+ │ ├── config.py # Configuration utilities
103
+ │ ├── models.py # Data models
104
+ │ ├── serialize.py # Serialization utilities
105
+ │ ├── deserialize.py # Deserialization utilities
106
+ │ └── _private/ # Private implementation details
107
+ ├── tests/ # Test suite
108
+ ├── docs/ # Documentation
109
+ │ ├── client/ # Client API documentation
110
+ │ └── models/ # Models documentation
111
+ └── build/ # Build artifacts
112
+ ```
113
+
114
+ ## Development
115
+
116
+ ### Setting Up Development Environment
117
+
118
+ 1. Clone the repository
119
+ 2. Install development dependencies:
120
+ ```bash
121
+ pip install -e ".[dev]"
122
+ ```
123
+ 3. Run tests:
124
+ ```bash
125
+ pytest tests/
126
+ ```
127
+
128
+
@@ -0,0 +1,11 @@
1
+ vibe_client/__init__.py,sha256=XekyD00QFziYRdN_E7vlH9X7nnEV6NjGWRiQ0v0NcB8,83
2
+ vibe_client/client.py,sha256=93hup4Jfqba5_NQNVCU4f5LxKq1Y5nOs0dGuP0T6Qnw,20538
3
+ vibe_client/config.py,sha256=09qiTYTuJnv0krlJl5srgWncPWnGaMA9w0dDKswnNbI,2669
4
+ vibe_client/deserialize.py,sha256=EXgPy-O6acFNL3Vs5qR1sJqmbTWE_J4CWE6DuwLWvTE,4065
5
+ vibe_client/models.py,sha256=AAaUMCA0rYtteHI_HunrL-9FaKV_yNvVuYMON3fevDk,26070
6
+ vibe_client/serialize.py,sha256=O2ki-TARbjvwqztWYLCRZGMDzgzD15kI7uiOevjwQYY,1593
7
+ vibe_client/_private/__init__.py,sha256=DxsJq42a0KfQv9zzLrqT0JVpoXrR-IDIYFGuJe4g1Gc,55
8
+ vibe_client/_private/schemas.py,sha256=EghHfaLbHS47726W3AgRHNPyYFaGWY0ELPw9SImbhfo,7785
9
+ vibe_client-0.1.0.dist-info/METADATA,sha256=EZenhgcYREALvj_NXPCPDQsGTvadvF1-gaPzfayw53c,3569
10
+ vibe_client-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
11
+ vibe_client-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any