{"id":29087943,"url":"https://github.com/synmetrix/synmetrix-python-client","last_synced_at":"2025-07-18T10:04:40.440Z","repository":{"id":301336354,"uuid":"889970544","full_name":"synmetrix/synmetrix-python-client","owner":"synmetrix","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-17T16:36:40.000Z","size":364,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-26T10:56:20.718Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/synmetrix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-11-17T17:41:35.000Z","updated_at":"2025-06-19T15:12:40.000Z","dependencies_parsed_at":"2025-06-26T10:56:23.310Z","dependency_job_id":"36953d24-5c59-4e68-95f3-f36d55e459b2","html_url":"https://github.com/synmetrix/synmetrix-python-client","commit_stats":null,"previous_names":["synmetrix/synmetrix-python-client"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/synmetrix/synmetrix-python-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synmetrix%2Fsynmetrix-python-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synmetrix%2Fsynmetrix-python-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synmetrix%2Fsynmetrix-python-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synmetrix%2Fsynmetrix-python-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synmetrix","download_url":"https://codeload.github.com/synmetrix/synmetrix-python-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synmetrix%2Fsynmetrix-python-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262362144,"owners_count":23299130,"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","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":[],"created_at":"2025-06-28T02:08:08.771Z","updated_at":"2025-06-28T02:08:25.129Z","avatar_url":"https://github.com/synmetrix.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Synmetrix Python Client\n\nA Python client library for interacting with the Synmetrix API.\n\n### Key Components\n\n1. **GraphQL Client**\n   - Fully typed async client for GraphQL operations\n   - WebSocket subscription support\n   - Automatic query generation\n   - Error handling and response validation\n\n2. **Authentication Client**\n   - JWT token management\n   - User authentication flows\n   - Session handling\n   - Password management\n\n## Installation\n\n### Using pip\n\n```bash\npip install synmetrix-python-client\n```\n\n### Using poetry\n\n```bash\npoetry add synmetrix-python-client\n```\n\n## Quick Start\n\n```python\nimport asyncio\nfrom synmetrix_python_client.graphql_client import Client\nfrom synmetrix_python_client.auth import AuthClient\n\n# Decode JWT token to get user_id\naccess_token = \"your_access_token\"\njwt_payload = AuthClient.parse_access_token(access_token)\nuser_id = jwt_payload[\"user_id\"]\n\n# Initialize client\nclient = Client(\n    url=\"https://app.synmetrix.org/v1/graphql\",\n    headers={\"Authorization\": f\"Bearer {access_token}\"},\n)\n\nasync def get_current_user():\n    # Query current user\n    current_user = await client.current_user(id=user_id)\n    print(f\"User: {current_user.users_by_pk.display_name}\")\n\n    # Subscribe to user updates\n    async for update in client.sub_current_user(id=user_id):\n        print(f\"Update received: {update.users_by_pk.display_name}\")\n\n# Run the example\nasyncio.run(get_current_user())\n```\n\n## Documentation\n\n### API Reference\n\nThe library provides comprehensive API documentation in the following formats:\n\n- **HTML Documentation**: Browse the full API reference at [docs/src/synmetrix_python_client/](docs/src/synmetrix_python_client/)\n  - GraphQL Client API: [docs/src/synmetrix_python_client/graphql_client/client.html](docs/src/synmetrix_python_client/graphql_client/client.html)\n  - Authentication API: [docs/src/synmetrix_python_client/auth.html](docs/src/synmetrix_python_client/auth.html)\n\n## Development\n\n### Prerequisites\n\n- Python 3.9+\n- Poetry (Python package manager)\n\n### Setting up the development environment\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/ifokeev/synmetrix-python-client.git\ncd synmetrix-python-client\n```\n\n2. Install dependencies:\n```bash\npoetry install\n```\n\n3. Activate the virtual environment:\n```bash\npoetry shell\n```\n\n### Running Tests\n\n```bash\npoetry run pytest\n```\n\n### Generating Documentation\n\nTo regenerate the documentation:\n\n```bash\n./scripts/generate_graphql_api_docs.sh # GraphQL documentation\n./scripts/generate_auth_api_docs.sh    # Auth documentation\n```\n\n### Generating GraphQL Client\n\nTo generate the GraphQL client:\n\n```bash\npoetry run generate-client\n```\n\nNote: please check `remote_schema_url` and `remote_schema_headers` in `pyproject.toml` to ensure the correct schema is used.\n\n### Publishing to PyPI\n\n1. Test PyPI release:\n```bash\n./scripts/push_to_testpypi.sh YOUR_PYPI_TOKEN\n```\n\n2. Production PyPI release:\n```bash\n./scripts/push_to_pypi.sh YOUR_PYPI_TOKEN\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nFor support, please:\n- Open an issue in the GitHub repository\n- Contact us at support@synmetrix.org\n- Visit our documentation at https://docs.synmetrix.org\n\n## Examples\n\nFor complete working examples of client usage, check the [`use_cases/`](src/synmetrix_python_client/use_cases/) directory in the repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynmetrix%2Fsynmetrix-python-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynmetrix%2Fsynmetrix-python-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynmetrix%2Fsynmetrix-python-client/lists"}