{"id":30593370,"url":"https://github.com/techwithty/creatify","last_synced_at":"2025-10-18T01:11:29.391Z","repository":{"id":309972570,"uuid":"1038241883","full_name":"TechWithTy/creatify","owner":"TechWithTy","description":"Creatify Python SDK: async HTTPX client and APIs (Videos, Links, Lipsync v1/v2) with FastAPI-ready integration and full pytest suite.","archived":false,"fork":false,"pushed_at":"2025-08-14T21:17:03.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-29T19:03:14.845Z","etag":null,"topics":["ai","api","async","automation","content","creatify","ecommerce","fastapi","httpx","links","lipsync","marketing","pytest","python","sdk","testing","video"],"latest_commit_sha":null,"homepage":"https://www.cybershoptech.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TechWithTy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-14T21:16:52.000Z","updated_at":"2025-08-14T21:17:07.000Z","dependencies_parsed_at":"2025-08-14T23:21:27.773Z","dependency_job_id":"4e0291ee-7367-4580-876b-d827cd054656","html_url":"https://github.com/TechWithTy/creatify","commit_stats":null,"previous_names":["techwithty/creatify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TechWithTy/creatify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Fcreatify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Fcreatify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Fcreatify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Fcreatify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TechWithTy","download_url":"https://codeload.github.com/TechWithTy/creatify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Fcreatify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279446649,"owners_count":26171780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","api","async","automation","content","creatify","ecommerce","fastapi","httpx","links","lipsync","marketing","pytest","python","sdk","testing","video"],"created_at":"2025-08-29T18:13:41.563Z","updated_at":"2025-10-18T01:11:29.359Z","avatar_url":"https://github.com/TechWithTy.png","language":"Python","readme":"# Creatify Python SDK (Internal)\n\nAsynchronous, minimal SDK for the Creatify API used by this backend. Provides typed configuration, an async HTTP client, and resource-specific API wrappers.\n\n- Package root: `app/core/third_party_integrations/creatify/`\n- Implemented APIs: `links`, `videos`, `lipsyncs` (v1), `lipsyncs_v2`\n- Test suite: `app/core/third_party_integrations/creatify/_tests/` (15 tests)\n\n## Quick Start\n\n1) Install dependencies (from `backend/`):\n```bash\nuv run python -V  # ensures venv\nuv run pytest -q  # optional: verify\n```\n\n2) Configure environment:\n- Set `CREATIFY_API_KEY` (required when you actually make API calls).\n- Optional `.env` file in `app/core/third_party_integrations/creatify/` or project root.\n\nExample `.env`:\n```\nCREATIFY_API_KEY=your-api-key\nCREATIFY_API_BASE=https://api.creatify.ai/v1\n```\n\nNote: The settings loader ignores unrelated env vars and is lazy-loaded to avoid import-time failures during tests.\n\n## Configuration\n- File: `creatify/config.py`\n- Model: `CreatifyConfig(BaseSettings)`\n- Important fields:\n  - `CREATIFY_API_KEY: str` (required for real requests)\n  - `CREATIFY_API_BASE: str = \"https://api.creatify.ai/v1\"`\n- Use `get_settings()` for lazy, cached settings construction.\n\n## Client\n- File: `creatify/client.py`\n- Class: `CreatifyClient`\n- Factory: `get_creatify_client()` lazily builds with `CreatifyConfig`.\n- Under the hood: `httpx.AsyncClient` with `Authorization: Bearer \u003ckey\u003e`.\n\n## APIs\nAll APIs are async and require a `CreatifyClient` instance.\n\n### Links API\n- File: `creatify/api/links.py`\n- Class: `LinkAPI`\n- Methods:\n  - `get_existing_links(params: dict | None = None)` → list\n  - `create_link(url: str)` → created link JSON\n  - `update_link(link_id: str, options: dict)` → updated link JSON\n  - `get_link_by_id(link_id: str)` → link JSON\n\nUsage:\n```python\nfrom app.core.third_party_integrations.creatify.client import CreatifyClient\nfrom app.core.third_party_integrations.creatify.config import get_settings\nfrom app.core.third_party_integrations.creatify.api.links import LinkAPI\n\nsettings = get_settings()\nclient = CreatifyClient(config=settings)\nlinks = LinkAPI(client)\n# await links.get_existing_links()\n```\n\n### Videos API\n- File: `creatify/api/videos.py`\n- Class: `VideoAPI`\n- Methods:\n  - `create_video_from_link(link: str, options: dict | None = None)`\n  - `get_video_result(video_id: str)`\n  - `get_video_history(params: dict | None = None)`\n  - `generate_preview_video_from_link(link: str, options: dict | None = None)`\n  - `render_video_from_preview(video_id: str, media_job_id: str)`\n\n### Lipsync API (v1)\n- File: `creatify/api/lipsyncs.py`\n- Class: `LipsyncAPI`\n- Methods:\n  - `get_lipsync_jobs(params: dict | None = None)`\n  - `create_lipsync_job(options: dict)`\n  - `get_lipsync_job(job_id: str)`\n\n### Lipsync API (v2)\n- File: `creatify/api/lipsyncs_v2.py`\n- Class: `LipsyncV2API`\n- Methods:\n  - `get_lipsync_v2_jobs(params: dict | None = None)`\n  - `create_lipsync_v2_job(options: dict)`\n  - `get_lipsync_v2_job(job_id: str)`\n\n## Testing\n- Suite path: `app/core/third_party_integrations/creatify/_tests/`\n- Run from `backend/`:\n```bash\nuv run pytest app/core/third_party_integrations/creatify/_tests/\n```\n- Tests mock `httpx.AsyncClient` calls; no real network or API key required. Absolute imports are used for reliable discovery.\n\n## Patterns \u0026 Notes\n- Async everywhere. Use `await` and `async with` for client context.\n- `response.raise_for_status()` used before returning `.json()`.\n- Keep options payloads as simple dicts; the SDK is a thin transport layer.\n- Additional API modules exist as placeholders; implement similarly to current modules and add tests.\n\n## Extending the SDK\n1) Create a new module under `creatify/api/` with a class similar to `LinkAPI`.\n2) Add async methods that call the Creatify endpoint(s) using the shared client.\n3) Write tests in `_tests/` mirroring the mocking pattern used in existing tests.\n4) Run `uv run pytest` and ensure all pass.\n\n## Troubleshooting\n- Import errors during pytest collection: ensure tests use absolute imports (done in repo).\n- Env validation errors: the settings are lazy and ignore extra env vars; set `CREATIFY_API_KEY` only when making real requests.\n- Windows shell env var:\n  - PowerShell: `$env:CREATIFY_API_KEY = 'dummy'`\n  - CMD: `set CREATIFY_API_KEY=dummy`\n  - Bash/Git Bash: `export CREATIFY_API_KEY=dummy`\n\n---\nMaintained by the backend team. PRs welcome for new endpoints and tests.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechwithty%2Fcreatify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechwithty%2Fcreatify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechwithty%2Fcreatify/lists"}