langchain-eustore 0.1.0__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.
- langchain_eustore-0.1.0/PKG-INFO +73 -0
- langchain_eustore-0.1.0/README.md +52 -0
- langchain_eustore-0.1.0/langchain_eustore/__init__.py +191 -0
- langchain_eustore-0.1.0/langchain_eustore.egg-info/PKG-INFO +73 -0
- langchain_eustore-0.1.0/langchain_eustore.egg-info/SOURCES.txt +8 -0
- langchain_eustore-0.1.0/langchain_eustore.egg-info/dependency_links.txt +1 -0
- langchain_eustore-0.1.0/langchain_eustore.egg-info/requires.txt +4 -0
- langchain_eustore-0.1.0/langchain_eustore.egg-info/top_level.txt +1 -0
- langchain_eustore-0.1.0/pyproject.toml +31 -0
- langchain_eustore-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: langchain-eustore
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: LangChain tools for eustore.dev — European S3 storage for AI agents
|
|
5
|
+
Author-email: AI BOLLINGMO <hello@eustore.dev>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://eustore.dev
|
|
8
|
+
Project-URL: Documentation, https://api.eustore.dev/docs
|
|
9
|
+
Project-URL: Repository, https://github.com/AIBOLLINGMO/eustore
|
|
10
|
+
Keywords: langchain,s3,storage,europe,gdpr,ai-agent,eustore
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
Requires-Dist: requests>=2.28
|
|
19
|
+
Provides-Extra: langchain
|
|
20
|
+
Requires-Dist: langchain-core>=0.1; extra == "langchain"
|
|
21
|
+
|
|
22
|
+
# langchain-eustore
|
|
23
|
+
|
|
24
|
+
LangChain tools for [eustore.dev](https://eustore.dev) — European S3 storage for AI agents.
|
|
25
|
+
|
|
26
|
+
**50 free credits on signup. No card required.**
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install langchain-eustore
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
from langchain_eustore import EUStoreClient
|
|
38
|
+
|
|
39
|
+
# Register (once)
|
|
40
|
+
result = EUStoreClient.register("my-agent", "agent@example.com")
|
|
41
|
+
api_key = result["api_key"] # Save this!
|
|
42
|
+
|
|
43
|
+
# Use
|
|
44
|
+
client = EUStoreClient(api_key=api_key)
|
|
45
|
+
bucket = client.create_bucket("my-data")
|
|
46
|
+
client.upload(bucket["id"], "test.txt", b"hello from EU!")
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## With LangChain Agent
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from langchain_eustore import get_eustore_tools
|
|
53
|
+
|
|
54
|
+
tools = get_eustore_tools(api_key="eust_YOUR_KEY")
|
|
55
|
+
|
|
56
|
+
# Add to any LangChain agent
|
|
57
|
+
from langchain.agents import AgentExecutor, create_openai_tools_agent
|
|
58
|
+
agent = create_openai_tools_agent(llm, tools, prompt)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
|
|
63
|
+
- S3-compatible European storage (Germany & Finland)
|
|
64
|
+
- GDPR-compliant (Norwegian company)
|
|
65
|
+
- 50 free credits on signup
|
|
66
|
+
- Crypto payments (USDC, ETH)
|
|
67
|
+
- Works with any LangChain agent
|
|
68
|
+
|
|
69
|
+
## Links
|
|
70
|
+
|
|
71
|
+
- [eustore.dev](https://eustore.dev)
|
|
72
|
+
- [API Docs](https://api.eustore.dev/docs)
|
|
73
|
+
- [GitHub](https://github.com/AIBOLLINGMO/eustore)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# langchain-eustore
|
|
2
|
+
|
|
3
|
+
LangChain tools for [eustore.dev](https://eustore.dev) — European S3 storage for AI agents.
|
|
4
|
+
|
|
5
|
+
**50 free credits on signup. No card required.**
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install langchain-eustore
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from langchain_eustore import EUStoreClient
|
|
17
|
+
|
|
18
|
+
# Register (once)
|
|
19
|
+
result = EUStoreClient.register("my-agent", "agent@example.com")
|
|
20
|
+
api_key = result["api_key"] # Save this!
|
|
21
|
+
|
|
22
|
+
# Use
|
|
23
|
+
client = EUStoreClient(api_key=api_key)
|
|
24
|
+
bucket = client.create_bucket("my-data")
|
|
25
|
+
client.upload(bucket["id"], "test.txt", b"hello from EU!")
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## With LangChain Agent
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
from langchain_eustore import get_eustore_tools
|
|
32
|
+
|
|
33
|
+
tools = get_eustore_tools(api_key="eust_YOUR_KEY")
|
|
34
|
+
|
|
35
|
+
# Add to any LangChain agent
|
|
36
|
+
from langchain.agents import AgentExecutor, create_openai_tools_agent
|
|
37
|
+
agent = create_openai_tools_agent(llm, tools, prompt)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Features
|
|
41
|
+
|
|
42
|
+
- S3-compatible European storage (Germany & Finland)
|
|
43
|
+
- GDPR-compliant (Norwegian company)
|
|
44
|
+
- 50 free credits on signup
|
|
45
|
+
- Crypto payments (USDC, ETH)
|
|
46
|
+
- Works with any LangChain agent
|
|
47
|
+
|
|
48
|
+
## Links
|
|
49
|
+
|
|
50
|
+
- [eustore.dev](https://eustore.dev)
|
|
51
|
+
- [API Docs](https://api.eustore.dev/docs)
|
|
52
|
+
- [GitHub](https://github.com/AIBOLLINGMO/eustore)
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"""
|
|
2
|
+
LangChain Tool for eustore.dev — European S3 Storage
|
|
3
|
+
|
|
4
|
+
Usage with LangChain:
|
|
5
|
+
from langchain_eustore import EUStoreTool
|
|
6
|
+
tool = EUStoreTool(api_key="eust_YOUR_KEY")
|
|
7
|
+
# Use in any LangChain agent
|
|
8
|
+
|
|
9
|
+
Usage standalone:
|
|
10
|
+
from langchain_eustore import EUStoreClient
|
|
11
|
+
client = EUStoreClient(api_key="eust_YOUR_KEY")
|
|
12
|
+
bucket = client.create_bucket("my-data", region="eu-central-fsn1")
|
|
13
|
+
client.upload(bucket["id"], "test.txt", b"hello world")
|
|
14
|
+
"""
|
|
15
|
+
import json
|
|
16
|
+
from typing import Optional, Type
|
|
17
|
+
|
|
18
|
+
import requests
|
|
19
|
+
from pydantic import BaseModel, Field
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
API_BASE = "https://api.eustore.dev"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class EUStoreClient:
|
|
26
|
+
"""Simple client for eustore.dev API."""
|
|
27
|
+
|
|
28
|
+
def __init__(self, api_key: str):
|
|
29
|
+
self.api_key = api_key
|
|
30
|
+
self._token = None
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def token(self) -> str:
|
|
34
|
+
if not self._token:
|
|
35
|
+
r = requests.post(
|
|
36
|
+
f"{API_BASE}/v1/auth/token",
|
|
37
|
+
json={"api_key": self.api_key},
|
|
38
|
+
)
|
|
39
|
+
r.raise_for_status()
|
|
40
|
+
self._token = r.json()["access_token"]
|
|
41
|
+
return self._token
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def headers(self) -> dict:
|
|
45
|
+
return {"Authorization": f"Bearer {self.token}"}
|
|
46
|
+
|
|
47
|
+
def create_bucket(self, name: str, region: str = "eu-central-fsn1") -> dict:
|
|
48
|
+
r = requests.post(
|
|
49
|
+
f"{API_BASE}/v1/storage/buckets",
|
|
50
|
+
headers=self.headers,
|
|
51
|
+
json={"name": name, "region": region},
|
|
52
|
+
)
|
|
53
|
+
r.raise_for_status()
|
|
54
|
+
return r.json()
|
|
55
|
+
|
|
56
|
+
def list_buckets(self) -> list:
|
|
57
|
+
r = requests.get(f"{API_BASE}/v1/storage/buckets", headers=self.headers)
|
|
58
|
+
r.raise_for_status()
|
|
59
|
+
return r.json()
|
|
60
|
+
|
|
61
|
+
def get_credentials(self, bucket_id: str) -> dict:
|
|
62
|
+
r = requests.get(
|
|
63
|
+
f"{API_BASE}/v1/storage/buckets/{bucket_id}/credentials",
|
|
64
|
+
headers=self.headers,
|
|
65
|
+
)
|
|
66
|
+
r.raise_for_status()
|
|
67
|
+
return r.json()
|
|
68
|
+
|
|
69
|
+
def get_balance(self) -> dict:
|
|
70
|
+
r = requests.get(f"{API_BASE}/v1/billing/balance", headers=self.headers)
|
|
71
|
+
r.raise_for_status()
|
|
72
|
+
return r.json()
|
|
73
|
+
|
|
74
|
+
def upload(self, bucket_id: str, key: str, data: bytes) -> dict:
|
|
75
|
+
"""Upload data to a bucket via S3 proxy."""
|
|
76
|
+
creds = self.get_credentials(bucket_id)
|
|
77
|
+
r = requests.put(
|
|
78
|
+
f"{creds['s3_endpoint']}/{creds['bucket_name']}/{key}",
|
|
79
|
+
headers={
|
|
80
|
+
"Authorization": f"AWS {creds['s3_access_key']}:dummy",
|
|
81
|
+
"Content-Type": "application/octet-stream",
|
|
82
|
+
},
|
|
83
|
+
data=data,
|
|
84
|
+
)
|
|
85
|
+
return {"status": r.status_code, "key": key}
|
|
86
|
+
|
|
87
|
+
def download(self, bucket_id: str, key: str) -> bytes:
|
|
88
|
+
"""Download data from a bucket via S3 proxy."""
|
|
89
|
+
creds = self.get_credentials(bucket_id)
|
|
90
|
+
r = requests.get(
|
|
91
|
+
f"{creds['s3_endpoint']}/{creds['bucket_name']}/{key}",
|
|
92
|
+
headers={"Authorization": f"AWS {creds['s3_access_key']}:dummy"},
|
|
93
|
+
)
|
|
94
|
+
r.raise_for_status()
|
|
95
|
+
return r.content
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def register(cls, name: str, email: str) -> dict:
|
|
99
|
+
"""Register a new account. Returns api_key and customer_id."""
|
|
100
|
+
r = requests.post(
|
|
101
|
+
f"{API_BASE}/v1/auth/register",
|
|
102
|
+
json={"name": name, "email": email},
|
|
103
|
+
)
|
|
104
|
+
r.raise_for_status()
|
|
105
|
+
return r.json()
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
# --- LangChain Tool ---
|
|
109
|
+
|
|
110
|
+
try:
|
|
111
|
+
from langchain_core.tools import BaseTool
|
|
112
|
+
|
|
113
|
+
class EUStoreCreateBucketInput(BaseModel):
|
|
114
|
+
name: str = Field(description="Name for the storage bucket")
|
|
115
|
+
region: str = Field(
|
|
116
|
+
default="eu-central-fsn1",
|
|
117
|
+
description="EU region: eu-central-fsn1 (Germany), eu-central-nbg1 (Germany), eu-north-hel1 (Finland)",
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
class EUStoreUploadInput(BaseModel):
|
|
121
|
+
bucket_id: str = Field(description="Bucket ID to upload to")
|
|
122
|
+
key: str = Field(description="Object key (filename/path)")
|
|
123
|
+
content: str = Field(description="Content to upload (text)")
|
|
124
|
+
|
|
125
|
+
class EUStoreDownloadInput(BaseModel):
|
|
126
|
+
bucket_id: str = Field(description="Bucket ID to download from")
|
|
127
|
+
key: str = Field(description="Object key (filename/path)")
|
|
128
|
+
|
|
129
|
+
class EUStoreCreateBucketTool(BaseTool):
|
|
130
|
+
"""Create a GDPR-compliant storage bucket in the EU (Germany/Finland)."""
|
|
131
|
+
name: str = "eustore_create_bucket"
|
|
132
|
+
description: str = (
|
|
133
|
+
"Create an S3-compatible storage bucket in the European Union. "
|
|
134
|
+
"Data is stored in Germany or Finland. GDPR-compliant. "
|
|
135
|
+
"Use this when you need to persist data in Europe."
|
|
136
|
+
)
|
|
137
|
+
args_schema: Type[BaseModel] = EUStoreCreateBucketInput
|
|
138
|
+
client: EUStoreClient = None
|
|
139
|
+
|
|
140
|
+
def __init__(self, api_key: str, **kwargs):
|
|
141
|
+
super().__init__(**kwargs)
|
|
142
|
+
self.client = EUStoreClient(api_key)
|
|
143
|
+
|
|
144
|
+
def _run(self, name: str, region: str = "eu-central-fsn1") -> str:
|
|
145
|
+
result = self.client.create_bucket(name, region)
|
|
146
|
+
return json.dumps(result, indent=2)
|
|
147
|
+
|
|
148
|
+
class EUStoreUploadTool(BaseTool):
|
|
149
|
+
"""Upload data to a eustore.dev bucket in the EU."""
|
|
150
|
+
name: str = "eustore_upload"
|
|
151
|
+
description: str = (
|
|
152
|
+
"Upload text/data to a European storage bucket. "
|
|
153
|
+
"Data stays in the EU (Germany/Finland). GDPR-compliant."
|
|
154
|
+
)
|
|
155
|
+
args_schema: Type[BaseModel] = EUStoreUploadInput
|
|
156
|
+
client: EUStoreClient = None
|
|
157
|
+
|
|
158
|
+
def __init__(self, api_key: str, **kwargs):
|
|
159
|
+
super().__init__(**kwargs)
|
|
160
|
+
self.client = EUStoreClient(api_key)
|
|
161
|
+
|
|
162
|
+
def _run(self, bucket_id: str, key: str, content: str) -> str:
|
|
163
|
+
result = self.client.upload(bucket_id, key, content.encode())
|
|
164
|
+
return json.dumps(result)
|
|
165
|
+
|
|
166
|
+
class EUStoreDownloadTool(BaseTool):
|
|
167
|
+
"""Download data from a eustore.dev bucket."""
|
|
168
|
+
name: str = "eustore_download"
|
|
169
|
+
description: str = "Download data from a European storage bucket."
|
|
170
|
+
args_schema: Type[BaseModel] = EUStoreDownloadInput
|
|
171
|
+
client: EUStoreClient = None
|
|
172
|
+
|
|
173
|
+
def __init__(self, api_key: str, **kwargs):
|
|
174
|
+
super().__init__(**kwargs)
|
|
175
|
+
self.client = EUStoreClient(api_key)
|
|
176
|
+
|
|
177
|
+
def _run(self, bucket_id: str, key: str) -> str:
|
|
178
|
+
data = self.client.download(bucket_id, key)
|
|
179
|
+
return data.decode("utf-8", errors="replace")
|
|
180
|
+
|
|
181
|
+
def get_eustore_tools(api_key: str) -> list:
|
|
182
|
+
"""Get all eustore LangChain tools. Use with any LangChain agent."""
|
|
183
|
+
return [
|
|
184
|
+
EUStoreCreateBucketTool(api_key=api_key),
|
|
185
|
+
EUStoreUploadTool(api_key=api_key),
|
|
186
|
+
EUStoreDownloadTool(api_key=api_key),
|
|
187
|
+
]
|
|
188
|
+
|
|
189
|
+
except ImportError:
|
|
190
|
+
# LangChain not installed — client-only mode
|
|
191
|
+
pass
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: langchain-eustore
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: LangChain tools for eustore.dev — European S3 storage for AI agents
|
|
5
|
+
Author-email: AI BOLLINGMO <hello@eustore.dev>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://eustore.dev
|
|
8
|
+
Project-URL: Documentation, https://api.eustore.dev/docs
|
|
9
|
+
Project-URL: Repository, https://github.com/AIBOLLINGMO/eustore
|
|
10
|
+
Keywords: langchain,s3,storage,europe,gdpr,ai-agent,eustore
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
Requires-Dist: requests>=2.28
|
|
19
|
+
Provides-Extra: langchain
|
|
20
|
+
Requires-Dist: langchain-core>=0.1; extra == "langchain"
|
|
21
|
+
|
|
22
|
+
# langchain-eustore
|
|
23
|
+
|
|
24
|
+
LangChain tools for [eustore.dev](https://eustore.dev) — European S3 storage for AI agents.
|
|
25
|
+
|
|
26
|
+
**50 free credits on signup. No card required.**
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install langchain-eustore
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
from langchain_eustore import EUStoreClient
|
|
38
|
+
|
|
39
|
+
# Register (once)
|
|
40
|
+
result = EUStoreClient.register("my-agent", "agent@example.com")
|
|
41
|
+
api_key = result["api_key"] # Save this!
|
|
42
|
+
|
|
43
|
+
# Use
|
|
44
|
+
client = EUStoreClient(api_key=api_key)
|
|
45
|
+
bucket = client.create_bucket("my-data")
|
|
46
|
+
client.upload(bucket["id"], "test.txt", b"hello from EU!")
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## With LangChain Agent
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from langchain_eustore import get_eustore_tools
|
|
53
|
+
|
|
54
|
+
tools = get_eustore_tools(api_key="eust_YOUR_KEY")
|
|
55
|
+
|
|
56
|
+
# Add to any LangChain agent
|
|
57
|
+
from langchain.agents import AgentExecutor, create_openai_tools_agent
|
|
58
|
+
agent = create_openai_tools_agent(llm, tools, prompt)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
|
|
63
|
+
- S3-compatible European storage (Germany & Finland)
|
|
64
|
+
- GDPR-compliant (Norwegian company)
|
|
65
|
+
- 50 free credits on signup
|
|
66
|
+
- Crypto payments (USDC, ETH)
|
|
67
|
+
- Works with any LangChain agent
|
|
68
|
+
|
|
69
|
+
## Links
|
|
70
|
+
|
|
71
|
+
- [eustore.dev](https://eustore.dev)
|
|
72
|
+
- [API Docs](https://api.eustore.dev/docs)
|
|
73
|
+
- [GitHub](https://github.com/AIBOLLINGMO/eustore)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
langchain_eustore/__init__.py
|
|
4
|
+
langchain_eustore.egg-info/PKG-INFO
|
|
5
|
+
langchain_eustore.egg-info/SOURCES.txt
|
|
6
|
+
langchain_eustore.egg-info/dependency_links.txt
|
|
7
|
+
langchain_eustore.egg-info/requires.txt
|
|
8
|
+
langchain_eustore.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
langchain_eustore
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "langchain-eustore"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "LangChain tools for eustore.dev — European S3 storage for AI agents"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
authors = [{name = "AI BOLLINGMO", email = "hello@eustore.dev"}]
|
|
13
|
+
keywords = ["langchain", "s3", "storage", "europe", "gdpr", "ai-agent", "eustore"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 4 - Beta",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Topic :: Software Development :: Libraries",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"requests>=2.28",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.optional-dependencies]
|
|
26
|
+
langchain = ["langchain-core>=0.1"]
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://eustore.dev"
|
|
30
|
+
Documentation = "https://api.eustore.dev/docs"
|
|
31
|
+
Repository = "https://github.com/AIBOLLINGMO/eustore"
|