{"id":37064859,"url":"https://github.com/fraqtory/clockify-sdk","last_synced_at":"2026-01-14T07:35:15.938Z","repository":{"id":282759237,"uuid":"949561788","full_name":"Fraqtory/clockify-sdk","owner":"Fraqtory","description":"Python SDK for Clockify API","archived":false,"fork":false,"pushed_at":"2025-10-20T09:34:34.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-27T13:22:14.325Z","etag":null,"topics":["api","clockify","sdk"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fraqtory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-16T18:20:36.000Z","updated_at":"2025-10-20T09:34:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1d49a13-8acb-443f-afb3-7473ef079689","html_url":"https://github.com/Fraqtory/clockify-sdk","commit_stats":null,"previous_names":["fraqtory/clockify-sdk"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Fraqtory/clockify-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fraqtory%2Fclockify-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fraqtory%2Fclockify-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fraqtory%2Fclockify-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fraqtory%2Fclockify-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fraqtory","download_url":"https://codeload.github.com/Fraqtory/clockify-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fraqtory%2Fclockify-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","clockify","sdk"],"created_at":"2026-01-14T07:35:15.149Z","updated_at":"2026-01-14T07:35:15.926Z","avatar_url":"https://github.com/Fraqtory.png","language":"Python","readme":"# Clockify SDK\n\nA Python SDK for interacting with the Clockify API. This SDK provides a simple and intuitive interface to manage your Clockify workspace, including time entries, projects, tasks, and reports.\n\n## Features\n\n- 🔑 Simple authentication with API key\n- 📊 Manage time entries\n- 📁 Handle projects and tasks\n- 👥 Manage clients and users\n- 🔄 Workspace management\n- 📈 Advanced reporting with minimum hours tracking\n- 🔴 Visual alerts for developers not meeting minimum hours\n- ✨ Type hints for better IDE support\n\n## Installation\n\n```bash\npip install clockify-sdk\n```\n\n## Quick Start\n\nFirst, create a `.env` file in your project root:\n\n```env\nCLOCKIFY_API_KEY=your-api-key\nCLOCKIFY_WORKSPACE_ID=your-workspace-id  # Optional, defaults to first workspace\n```\n\nThen use the SDK:\n\n```python\nfrom dotenv import load_dotenv\nimport os\nfrom clockify_sdk import Clockify\nfrom datetime import datetime\n\n# Load environment variables from .env file\nload_dotenv()\n\n# Initialize the client\nclient = Clockify(\n    api_key=os.getenv(\"CLOCKIFY_API_KEY\"),\n    workspace_id=os.getenv(\"CLOCKIFY_WORKSPACE_ID\")  # Optional\n)\n\n# Get all your workspaces\nworkspaces = client.get_workspaces()\n\n# Create a new time entry\nstart_time = datetime.now(timezone.utc)\nend_time = datetime.fromisoformat(\"2024-03-17T11:00:00+00:00\")\ntime_entry = client.time_entries.add_time_entry(\n    start=start_time,\n    end=end_time,\n    description=\"Working on feature X\",\n    project_id=\"project-id\"\n)\n\n# Get all projects\nprojects = client.projects.get_all()\n\n# Create a new project\nproject = client.projects.create({\n    \"name\": \"New Project\",\n    \"clientId\": \"client-id\",\n    \"isPublic\": True\n})\n\n# Get time entries for a specific date range\ntime_entries = client.time_entries.get_all(\n    user_id=client.user_id,\n    start_date=\"2024-03-01\",\n    end_date=\"2024-03-17\"\n)\n\n# Generate a detailed report\nreport = client.reports.generate(\n    start_date=\"2024-03-01\",\n    end_date=\"2024-03-17\",\n    project_ids=[\"project-id-1\", \"project-id-2\"]\n)\n```\n\n## Advanced Usage\n\n### Working with Tasks\n\n```python\n# Create a new task\ntask = client.tasks.create({\n    \"name\": \"Implement new feature\",\n    \"assigneeId\": \"user-id\"\n}, project_id=\"project-id\")\n\n# Get all tasks for a project\ntasks = client.tasks.get_all(project_id=\"project-id\")\n```\n\n### Managing Clients\n\n```python\n# Create a new client\nnew_client = client.clients.create({\n    \"name\": \"New Client\",\n    \"note\": \"Important client\"\n})\n\n# Get all clients\nclients = client.clients.get_all()\n```\n\n### User Management\n\n```python\n# Get current user information\ncurrent_user = client.users.get_current_user()\n\n# Get all users in workspace\nusers = client.users.get_all()\n```\n\n### Minimum Hours Tracking\n\nThe SDK includes advanced reporting features with minimum hours tracking:\n\n```python\n# Create a developer_minimums.json file with your team's requirements\n{\n  \"user_id_1\": {\n    \"name\": \"John Doe\",\n    \"minimum_weekly_hours\": 40\n  },\n  \"user_id_2\": {\n    \"name\": \"Jane Smith\",\n    \"minimum_weekly_hours\": 35\n  }\n}\n\n# Use the project detail reporter with minimum hours tracking\nfrom examples.project_detail import ProjectDetailReporter\n\nreporter = ProjectDetailReporter(api_key, workspace_id)\nreporter.run()  # Interactive interface with 🔴 alerts for non-compliant developers\n```\n\n**Getting User IDs for Configuration:**\n\n```bash\n# List all users in your Clockify workspace to get their IDs\npython examples/minimum_hours_example.py --list-users\n\n# Or run the interactive example\npython examples/minimum_hours_example.py\n```\n\nThe system automatically:\n\n- Shows 🔴 emoji prefix for developers not meeting their minimum hours\n- Calculates expected minimums for monthly reports based on number of weeks\n- Pro-rates minimums for partial periods (current week, this month)\n\n## Error Handling\n\nThe SDK provides clear error messages and exceptions:\n\n```python\nfrom clockify_sdk.exceptions import ClockifyError\n\ntry:\n    client.time_entries.create({\n        \"projectId\": \"invalid-id\",\n        \"description\": \"Test entry\"\n    })\nexcept ClockifyError as e:\n    print(f\"Error: {e.message}\")\n```\n\n## Development\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/fraqtory/clockify-sdk.git\ncd clockify-sdk\n```\n\n2. Create and activate a virtual environment:\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate  # On Windows, use `.venv\\Scripts\\activate`\n```\n\n3. Install development dependencies:\n\n```bash\npip install -e \".[dev]\"\n```\n\n4. Run tests:\n\n```bash\npytest\n```\n\n5. Run type checking:\n\n```bash\nmypy clockify_sdk\n```\n\n6. Run linting:\n\n```bash\nruff check .\nblack .\nisort .\n```\n\n## Documentation\n\nFor detailed documentation, visit [https://clockify-sdk.readthedocs.io](https://clockify-sdk.readthedocs.io)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffraqtory%2Fclockify-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffraqtory%2Fclockify-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffraqtory%2Fclockify-sdk/lists"}