agent-framework-postgres 1.0.0a261030__tar.gz → 1.0.0a261106__tar.gz
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.
- {agent_framework_postgres-1.0.0a261030 → agent_framework_postgres-1.0.0a261106}/PKG-INFO +5 -8
- {agent_framework_postgres-1.0.0a261030 → agent_framework_postgres-1.0.0a261106}/README.md +3 -6
- {agent_framework_postgres-1.0.0a261030 → agent_framework_postgres-1.0.0a261106}/agent_framework_postgres/_vector_store.py +10 -10
- {agent_framework_postgres-1.0.0a261030 → agent_framework_postgres-1.0.0a261106}/pyproject.toml +2 -2
- {agent_framework_postgres-1.0.0a261030 → agent_framework_postgres-1.0.0a261106}/LICENSE +0 -0
- {agent_framework_postgres-1.0.0a261030 → agent_framework_postgres-1.0.0a261106}/agent_framework_postgres/__init__.py +0 -0
- {agent_framework_postgres-1.0.0a261030 → agent_framework_postgres-1.0.0a261106}/agent_framework_postgres/py.typed +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: agent-framework-postgres
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0a261106
|
|
4
4
|
Summary: PostgreSQL and pgvector integration for Microsoft Agent Framework.
|
|
5
5
|
Author-email: Microsoft <af-support@microsoft.com>
|
|
6
|
-
Requires-Python: >=3.
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
9
9
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -41,12 +41,9 @@ The package uses Psycopg 3 and the official pgvector Python adapter.
|
|
|
41
41
|
pip install agent-framework-postgres --pre
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Supports Python 3.11–3.15.
|
|
45
|
-
compatibility is not guaranteed.
|
|
46
|
-
|
|
47
|
-
Requires PostgreSQL 13+ and pgvector 0.8.0+.
|
|
44
|
+
Supports Python 3.11–3.15. Requires PostgreSQL 13+ and pgvector 0.8.0+.
|
|
48
45
|
Import the connector directly from `agent_framework_postgres`.
|
|
49
|
-
Python 3.
|
|
46
|
+
Python 3.11 through 3.14 install Psycopg's binary distribution. Python 3.15+
|
|
50
47
|
uses the pure-Python implementation because binary wheels are not yet
|
|
51
48
|
published, so a system `libpq` installation is required.
|
|
52
49
|
|
|
@@ -69,7 +66,7 @@ The `schema` argument defaults to `public`.
|
|
|
69
66
|
A connector-created pool is closed by `close()` or an async context manager.
|
|
70
67
|
Alternatively, inject an open Psycopg `AsyncConnection` or `AsyncConnectionPool`
|
|
71
68
|
using `client`; it remains caller-owned and bypasses settings loading.
|
|
72
|
-
|
|
69
|
+
Connection-string and `.env` options are ignored when a client is injected.
|
|
73
70
|
Collections created by a store borrow its pool, so keep the store open while
|
|
74
71
|
using them.
|
|
75
72
|
|
|
@@ -14,12 +14,9 @@ The package uses Psycopg 3 and the official pgvector Python adapter.
|
|
|
14
14
|
pip install agent-framework-postgres --pre
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Supports Python 3.11–3.15.
|
|
18
|
-
compatibility is not guaranteed.
|
|
19
|
-
|
|
20
|
-
Requires PostgreSQL 13+ and pgvector 0.8.0+.
|
|
17
|
+
Supports Python 3.11–3.15. Requires PostgreSQL 13+ and pgvector 0.8.0+.
|
|
21
18
|
Import the connector directly from `agent_framework_postgres`.
|
|
22
|
-
Python 3.
|
|
19
|
+
Python 3.11 through 3.14 install Psycopg's binary distribution. Python 3.15+
|
|
23
20
|
uses the pure-Python implementation because binary wheels are not yet
|
|
24
21
|
published, so a system `libpq` installation is required.
|
|
25
22
|
|
|
@@ -42,7 +39,7 @@ The `schema` argument defaults to `public`.
|
|
|
42
39
|
A connector-created pool is closed by `close()` or an async context manager.
|
|
43
40
|
Alternatively, inject an open Psycopg `AsyncConnection` or `AsyncConnectionPool`
|
|
44
41
|
using `client`; it remains caller-owned and bypasses settings loading.
|
|
45
|
-
|
|
42
|
+
Connection-string and `.env` options are ignored when a client is injected.
|
|
46
43
|
Collections created by a store borrow its pool, so keep the store open while
|
|
47
44
|
using them.
|
|
48
45
|
|
|
@@ -11,7 +11,7 @@ from contextlib import asynccontextmanager
|
|
|
11
11
|
from dataclasses import replace
|
|
12
12
|
from datetime import date, datetime
|
|
13
13
|
from itertools import groupby
|
|
14
|
-
from typing import Any, ClassVar, Generic, TypeAlias, cast
|
|
14
|
+
from typing import Any, ClassVar, Generic, Self, TypeAlias, cast
|
|
15
15
|
from uuid import UUID
|
|
16
16
|
|
|
17
17
|
from agent_framework import (
|
|
@@ -35,7 +35,7 @@ from psycopg import AsyncConnection, Error, sql
|
|
|
35
35
|
from psycopg.rows import dict_row, tuple_row
|
|
36
36
|
from psycopg.types.json import Jsonb
|
|
37
37
|
from psycopg_pool import AsyncConnectionPool
|
|
38
|
-
from typing_extensions import
|
|
38
|
+
from typing_extensions import TypedDict, TypeVar
|
|
39
39
|
|
|
40
40
|
KeyT = TypeVar("KeyT", default=Any)
|
|
41
41
|
ModelT = TypeVar("ModelT", default=Any)
|
|
@@ -122,8 +122,6 @@ def _create_client(
|
|
|
122
122
|
env_file_encoding: str | None,
|
|
123
123
|
) -> _Client:
|
|
124
124
|
if client is not None:
|
|
125
|
-
if connection_string is not None or env_file_path is not None or env_file_encoding is not None:
|
|
126
|
-
raise ValueError("client cannot be combined with connection_string, env_file_path, or env_file_encoding.")
|
|
127
125
|
return _Client(None, client)
|
|
128
126
|
settings = load_settings(
|
|
129
127
|
PostgresSettings,
|
|
@@ -430,13 +428,14 @@ class PostgresCollection(
|
|
|
430
428
|
record_type: Decorated/registered model type, or ``dict``.
|
|
431
429
|
connection_string: Psycopg conninfo or URI for an owned lazy pool. Falls back to
|
|
432
430
|
``POSTGRES_CONNECTION_STRING`` in the selected .env file or process environment.
|
|
433
|
-
client: An open caller-owned async connection or pool
|
|
431
|
+
client: An open caller-owned async connection or pool. When provided,
|
|
432
|
+
connection_string and .env options are ignored.
|
|
434
433
|
schema: Existing PostgreSQL schema containing the table.
|
|
435
434
|
definition: Explicit field definition for dictionary records.
|
|
436
435
|
collection_name: Table name, overriding the model's collection name.
|
|
437
436
|
embedding_generator: Default local embedding client.
|
|
438
|
-
env_file_path: Optional .env file to read
|
|
439
|
-
env_file_encoding: Encoding of the .env file
|
|
437
|
+
env_file_path: Optional .env file to read when creating a pool.
|
|
438
|
+
env_file_encoding: Encoding of the .env file used when creating a pool.
|
|
440
439
|
"""
|
|
441
440
|
super().__init__(
|
|
442
441
|
record_type,
|
|
@@ -877,11 +876,12 @@ class PostgresStore(BaseVectorStore):
|
|
|
877
876
|
Args:
|
|
878
877
|
connection_string: Psycopg conninfo or URI for an owned lazy pool. Falls back to
|
|
879
878
|
``POSTGRES_CONNECTION_STRING`` in the selected .env file or process environment.
|
|
880
|
-
client: An open caller-owned async connection or pool.
|
|
879
|
+
client: An open caller-owned async connection or pool. When provided,
|
|
880
|
+
connection_string and .env options are ignored.
|
|
881
881
|
schema: Existing schema used by all collection clients.
|
|
882
882
|
embedding_generator: Default embedding generator for collections.
|
|
883
|
-
env_file_path: Optional .env file to read
|
|
884
|
-
env_file_encoding: Encoding of the .env file
|
|
883
|
+
env_file_path: Optional .env file to read when creating a pool.
|
|
884
|
+
env_file_encoding: Encoding of the .env file used when creating a pool.
|
|
885
885
|
"""
|
|
886
886
|
super().__init__(embedding_generator=embedding_generator, managed_client=client is None)
|
|
887
887
|
_prepare_identifier(schema)
|
{agent_framework_postgres-1.0.0a261030 → agent_framework_postgres-1.0.0a261106}/pyproject.toml
RENAMED
|
@@ -3,8 +3,8 @@ name = "agent-framework-postgres"
|
|
|
3
3
|
description = "PostgreSQL and pgvector integration for Microsoft Agent Framework."
|
|
4
4
|
authors = [{ name = "Microsoft", email = "af-support@microsoft.com" }]
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.
|
|
7
|
-
version = "1.0.
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
|
+
version = "1.0.0a261106"
|
|
8
8
|
license-files = ["LICENSE"]
|
|
9
9
|
urls.homepage = "https://aka.ms/agent-framework"
|
|
10
10
|
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|