forked from SecureAgentTools/AgentVault
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_dev.py
More file actions
37 lines (31 loc) · 1.62 KB
/
create_dev.py
File metadata and controls
37 lines (31 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import httpx
import json
REGISTRY_URL = "http://localhost:8000" # Adjust if your server runs elsewhere
DEV_NAME = "TestDevForEdit" # Choose a unique name
try:
# NOTE: This endpoint doesn't actually exist yet!
# We need to manually add a developer for testing for now.
# This highlights a missing piece for full workflow testing.
# For now, SKIP this step and assume you have a developer key
# from previous manual setup or testing. If not, we'd need to
# add a developer creation endpoint or use direct DB access.
# Placeholder for if/when an endpoint exists:
# response = httpx.post(f"{REGISTRY_URL}/api/v1/developers/", json={"name": DEV_NAME}) # Fictional endpoint
# response.raise_for_status()
# data = response.json()
# print("Developer Created Successfully!")
# print(f"Developer ID: {data.get('id')}")
# print(f"Developer Name: {data.get('name')}")
# print(f"!!! IMPORTANT: Store this API Key securely !!!")
# print(f"API Key: {data.get('api_key')}")
print("Developer creation via API not implemented yet.")
print("Please ensure you have a developer API key from previous setup.")
print("If not, manual database insertion or a dedicated creation script/endpoint is needed.")
# Set a placeholder key here for the rest of the steps
API_KEY = "avreg_manualtestkey123" # <--- !!! REPLACE THIS !!!
print(f"\nACTION: Copy this API Key for the next steps: {API_KEY}")
except httpx.HTTPStatusError as e:
print(f"Error creating developer: {e.response.status_code}")
print(f"Response: {e.response.text}")
except Exception as e:
print(f"An error occurred: {e}")