promptary-cli 1.2.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.
File without changes
@@ -0,0 +1,4 @@
1
+ from promptary_cli.cli import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
promptary_cli/cli.py ADDED
@@ -0,0 +1,48 @@
1
+ import argparse
2
+ import sys
3
+ import urllib.request
4
+ import urllib.error
5
+
6
+ from promptary_cli.config import get_api_url
7
+
8
+ VERSION = "1.2.0"
9
+
10
+
11
+ def pull(prompt_id: str) -> str:
12
+ url = f"{get_api_url()}/api/prompts/{prompt_id}/raw"
13
+ try:
14
+ with urllib.request.urlopen(url, timeout=15) as resp:
15
+ return resp.read().decode("utf-8")
16
+ except urllib.error.HTTPError as e:
17
+ print(f"Error: server returned {e.code} for prompt '{prompt_id}'", file=sys.stderr)
18
+ sys.exit(1)
19
+ except urllib.error.URLError as e:
20
+ print(f"Error: could not reach server – {e.reason}", file=sys.stderr)
21
+ sys.exit(1)
22
+
23
+
24
+ def main() -> None:
25
+ parser = argparse.ArgumentParser(
26
+ prog="promptary",
27
+ description="Retrieve prompt blueprints from Promptary.",
28
+ )
29
+ parser.add_argument(
30
+ "--version", action="store_true", help="show version and exit"
31
+ )
32
+ sub = parser.add_subparsers(dest="command")
33
+
34
+ pull_parser = sub.add_parser("pull", help="pull a blueprint by id")
35
+ pull_parser.add_argument("prompt_id", help="blueprint identifier (e.g. p_1)")
36
+
37
+ args = parser.parse_args()
38
+
39
+ if args.version:
40
+ print(f"promptary v{VERSION}")
41
+ return
42
+
43
+ if args.command == "pull":
44
+ text = pull(args.prompt_id)
45
+ print(text)
46
+ return
47
+
48
+ parser.print_help()
@@ -0,0 +1,6 @@
1
+ import os
2
+
3
+ DEFAULT_API_URL = "https://promptary-cli-cr.xyz"
4
+
5
+ def get_api_url() -> str:
6
+ return os.environ.get("PROMPTARY_API_URL", DEFAULT_API_URL)
@@ -0,0 +1,327 @@
1
+ Metadata-Version: 2.4
2
+ Name: promptary-cli
3
+ Version: 1.2.0
4
+ Summary: CLI to retrieve prompt blueprints from the Promptary API
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown
7
+
8
+ <p align="center">
9
+ <img src="./src/promptary-banner.png" alt="Promptary Banner">
10
+ </p>
11
+
12
+ ---
13
+
14
+ # Promptary
15
+
16
+ ## AI Prompt Knowledge Library for Data Science & Machine Learning
17
+
18
+ Promptary is a collaborative platform and premium prompt blueprint library built specifically for Data Scientists, Machine Learning Engineers, and AI practitioners.
19
+
20
+ It works as a prompt engineering workspace where professionals can discover, optimize, organize, reuse, and share high-quality AI workflows for real-world data projects.
21
+
22
+ From exploratory analysis to model development and debugging, Promptary helps teams transform scattered AI interactions into reusable engineering assets.
23
+
24
+ ---
25
+
26
+ # 🛠️ Installation & Usage
27
+
28
+ Promptary provides multiple ways to access and integrate prompt blueprints into your AI workflows.
29
+
30
+ ---
31
+
32
+ ## 📦 Install Promptary CLI
33
+
34
+ Install the official Python CLI tool:
35
+
36
+ ```bash
37
+ pip install promptary-cli
38
+ ```
39
+
40
+ Or install directly from the repository:
41
+
42
+ ```bash
43
+ git clone https://github.com/promptary/promptary.git
44
+ cd promptary
45
+ pip install .
46
+ ```
47
+
48
+ Verify the installation:
49
+
50
+ ```bash
51
+ promptary --version
52
+ ```
53
+
54
+ The CLI uses `https://promptary-cli-cr.xyz` as the default API endpoint.
55
+ Override it at runtime with the `PROMPTARY_API_URL` environment variable:
56
+
57
+ ```bash
58
+ PROMPTARY_API_URL=https://custom-domain.com promptary pull p_1
59
+ ```
60
+
61
+ ---
62
+
63
+ # 🚀 Retrieve a Prompt Blueprint
64
+
65
+ Each Promptary blueprint has a unique identifier.
66
+
67
+ Example:
68
+
69
+ ```
70
+ p_1
71
+ ```
72
+
73
+ You can retrieve any blueprint dynamically using the Promptary CLI or API.
74
+
75
+ ---
76
+
77
+ # 💻 Using Promptary CLI
78
+
79
+ Pull a blueprint directly from Promptary:
80
+
81
+ ```bash
82
+ promptary pull p_1
83
+ ```
84
+
85
+ This retrieves the latest version of the prompt template.
86
+
87
+ ---
88
+
89
+ # 🐍 Using Python
90
+
91
+ Blueprints can be loaded directly into Python workflows:
92
+
93
+ ```python
94
+ import requests
95
+
96
+ prompt_id = "p_1"
97
+
98
+ url = f"https://promptary-cli-cr.xyz/api/prompts/{prompt_id}/raw"
99
+
100
+ response = requests.get(url)
101
+ response.raise_for_status()
102
+
103
+ prompt_template = response.text
104
+
105
+ print("Loaded blueprint prompt successfully!")
106
+ print(prompt_template[:120] + "...")
107
+ ```
108
+
109
+ Example output:
110
+
111
+ ```
112
+ Loaded blueprint prompt successfully!
113
+
114
+ You are an expert Data Scientist specialized in...
115
+ ```
116
+
117
+ Useful for:
118
+
119
+ - Jupyter Notebooks
120
+ - AI agents
121
+ - automation scripts
122
+ - ML workflows
123
+
124
+ ---
125
+
126
+ # 🌐 Using cURL
127
+
128
+ Retrieve the raw prompt directly from the API:
129
+
130
+ ```bash
131
+ curl -s "https://promptary-cli-cr.xyz/api/prompts/p_1/raw"
132
+ ```
133
+
134
+ The API returns the blueprint as plain text.
135
+
136
+ ---
137
+
138
+ # 🔌 Integration Workflow
139
+
140
+ Promptary blueprints can be integrated into:
141
+
142
+ - Python applications
143
+ - Data Science pipelines
144
+ - AI agents
145
+ - LLM automation workflows
146
+ - Internal developer tools
147
+
148
+ The goal of Promptary is to make AI workflows:
149
+
150
+ - reusable
151
+ - versioned
152
+ - shareable
153
+ - easy to integrate
154
+
155
+ ---
156
+
157
+ # 📚 Example Use Case
158
+
159
+ A Data Scientist can:
160
+
161
+ 1. Discover a blueprint in Promptary.
162
+ 2. Pull it using the CLI or API.
163
+ 3. Customize the workflow.
164
+ 4. Integrate it into a notebook or production pipeline.
165
+ 5. Share improvements back with the community.
166
+
167
+ Promptary turns AI prompts into reusable engineering assets.
168
+
169
+ ---
170
+
171
+ # 🎨 Design Philosophy
172
+
173
+ Promptary is designed for long technical sessions, combining a professional developer experience with a modern AI-native interface.
174
+
175
+ ### Premium Dark Interface
176
+ A focused dark environment built with deep grayscale and slate tones, enhanced with subtle purple and emerald accents.
177
+
178
+ ### Developer-Focused Typography
179
+ A refined typography system combining:
180
+
181
+ - Sans-serif fonts for readability and navigation.
182
+ - Mono fonts (JetBrains Mono) for:
183
+ - code snippets
184
+ - commands
185
+ - technical metadata
186
+ - development indicators
187
+
188
+ ### Smooth Interaction
189
+ Polished animations, transitions, and responsive components create a fluid experience optimized for productivity.
190
+
191
+ ---
192
+
193
+ # 🚀 Core Features
194
+
195
+ ## 1. Prompt Blueprint Library
196
+
197
+ A structured catalog of high-quality AI workflows organized around key Data Science domains.
198
+
199
+ ### Exploratory Data Analysis (EDA)
200
+ Prompts designed to accelerate:
201
+ - dataset understanding
202
+ - pattern discovery
203
+ - statistical exploration
204
+ - visualization workflows
205
+
206
+ ### Data Cleaning
207
+ Reusable workflows for:
208
+ - missing value handling
209
+ - anomaly detection
210
+ - outlier analysis
211
+ - data normalization
212
+
213
+ ### Machine Learning & Modeling
214
+ Prompt architectures for:
215
+ - model experimentation
216
+ - hyperparameter optimization
217
+ - pipeline design
218
+ - evaluation strategies
219
+
220
+ ### Debugging & Development
221
+ AI-assisted troubleshooting for:
222
+ - Python
223
+ - SQL
224
+ - PyTorch
225
+ - ML pipelines
226
+ - complex errors
227
+
228
+ ---
229
+
230
+ # 2. Collaborative Prompt Ecosystem
231
+
232
+ Inspired by modern software development workflows.
233
+
234
+ ## Fork System
235
+
236
+ Users can clone existing prompt blueprints and customize them for their own projects.
237
+
238
+ Each fork maintains:
239
+ - original structure
240
+ - modifications
241
+ - contributor ownership
242
+ - evolution history
243
+
244
+ Turning prompts into reusable community-driven assets.
245
+
246
+ ## Community Publishing
247
+
248
+ Professionals can publish their own workflows with:
249
+
250
+ - author information
251
+ - role
252
+ - tags
253
+ - professional links
254
+ - technical context
255
+
256
+ ---
257
+
258
+ # 3. Cloud Architecture & Data Persistence
259
+
260
+ Promptary combines cloud synchronization with local performance.
261
+
262
+ ## Authentication
263
+
264
+ Secure developer authentication powered by Firebase Google Auth.
265
+
266
+ Ensures:
267
+ - personalized libraries
268
+ - user profiles
269
+ - contribution ownership
270
+
271
+ ## Cloud Database
272
+
273
+ Real-time synchronization using Cloud Firestore.
274
+
275
+ Features:
276
+ - persistent prompt storage
277
+ - community contributions
278
+ - scalable data structure
279
+ - secure access rules
280
+
281
+ ## Personal Library
282
+
283
+ Users can save favorite prompts locally for fast access through a personalized collection.
284
+
285
+ ---
286
+
287
+ # 4. AI Development Utilities
288
+
289
+ Each prompt blueprint includes a detailed inspection environment.
290
+
291
+ ## Code Integration Snippets
292
+
293
+ Generate ready-to-use examples for:
294
+
295
+ - Python API calls
296
+ - modern AI SDKs
297
+ - pip installation commands
298
+ - curl requests
299
+
300
+ Designed for direct integration into:
301
+
302
+ - Jupyter Notebooks
303
+ - development environments
304
+ - terminal workflows
305
+
306
+ ---
307
+
308
+ # 5. Community Ranking System
309
+
310
+ Promptary uses interaction signals to surface valuable workflows.
311
+
312
+ Users can provide feedback through:
313
+
314
+ - 👍 Likes
315
+ - 👎 Dislikes
316
+
317
+ Helping identify:
318
+
319
+ - trending prompts
320
+ - high-performing workflows
321
+ - community favorites
322
+
323
+ ---
324
+
325
+ # Vision
326
+
327
+ Promptary aims to become the GitHub for AI prompts in Data Science: a place where professionals build, share, improve, and reuse AI knowledge instead of starting from zero every time.
@@ -0,0 +1,9 @@
1
+ promptary_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ promptary_cli/__main__.py,sha256=DXf4-6uhSY_MLcCls-nqZXJPJ6r79eyf-8NHRTA_gqM,74
3
+ promptary_cli/cli.py,sha256=MmjYdKD7mHrvhToJgLZWwYSKjmo3JpNarwe9If9oNTY,1334
4
+ promptary_cli/config.py,sha256=I26XBoNYw0nWRL8y4NVLer_zxfHsAWgbPyxTKFIZJX8,151
5
+ promptary_cli-1.2.0.dist-info/METADATA,sha256=kYx7pN1CSIa7AMa43JoFzT5gkxn7nMt3ObJTCOfdDn8,6899
6
+ promptary_cli-1.2.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
7
+ promptary_cli-1.2.0.dist-info/entry_points.txt,sha256=6b8-WiQmI4TzLa3xWN4TJZyzyvtWJeTDTKYOeWHhmvI,53
8
+ promptary_cli-1.2.0.dist-info/top_level.txt,sha256=qx1cQ8zk6nvIGHjIB7wkxO76mZWRaQZP3ecb9NM9DTw,14
9
+ promptary_cli-1.2.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ promptary = promptary_cli.cli:main
@@ -0,0 +1 @@
1
+ promptary_cli