Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devzery/api testing sdk #136

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions backend/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ COMPOSIO_APPS=["HACKERNEWS"]

# Web Search Agent
SERP_API_KEY=

# Devzery API Test
DEVZERY_API_KEY=
DEVZERY_SOURCE_NAME=
2 changes: 1 addition & 1 deletion backend/director/agents/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"description": "Collection ID to upload the content",
},
},
"required": ["url", "media_type", "collection_id"],
"required": ["source", "media_type", "collection_id"],
}


Expand Down
9 changes: 9 additions & 0 deletions backend/director/entrypoint/api/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ class ProductionAppConfig(BaseAppConfig):
# By default, the server is configured to run in development mode. To run in production mode, set the `SERVER_ENV` environment variable to `production`.
app = create_app(app_config=configs[os.getenv("SERVER_ENV", "local")])

if os.getenv("DEVZERY_API_KEY") and os.getenv("DEVZERY_SOURCE_NAME"):
from devzery import Devzery
devzery = Devzery(
api_key=os.getenv("DEVZERY_API_KEY"),
source_name=os.getenv("DEVZERY_SOURCE_NAME")
)

devzery.flask_middleware(app)

if __name__ == "__main__":
app.run(
host=os.getenv("SERVER_HOST", app.config["HOST"]),
Expand Down
1 change: 1 addition & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ yt-dlp==2024.10.7
videodb==0.2.8
slack_sdk==3.33.2
psycopg2-binary==2.9.10
devzery==0.0.7
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please move this dependency to requirements-dev.txt