{"id":18465818,"url":"https://github.com/tcgdex/python-sdk","last_synced_at":"2025-07-06T20:33:29.831Z","repository":{"id":255419718,"uuid":"849414549","full_name":"tcgdex/python-sdk","owner":"tcgdex","description":"⚡️ TCGdex Python SDK for Pokémon TCG data | Async • Zero config • Multi-language","archived":false,"fork":false,"pushed_at":"2025-03-03T20:31:47.000Z","size":590,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T09:48:28.842Z","etag":null,"topics":["api","async","card","pdm","pokemon","pokemon-api","pokemon-cards","python","sdk","tcg","tcgdex","trading"],"latest_commit_sha":null,"homepage":"https://tcgdex.dev/sdks/python","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/tcgdex.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}},"created_at":"2024-08-29T14:53:01.000Z","updated_at":"2025-03-06T01:35:16.000Z","dependencies_parsed_at":"2024-11-19T10:33:43.938Z","dependency_job_id":"9cae363c-a507-4000-b217-9fc2155b7634","html_url":"https://github.com/tcgdex/python-sdk","commit_stats":null,"previous_names":["tcgdex/python-sdk"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcgdex%2Fpython-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcgdex%2Fpython-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcgdex%2Fpython-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcgdex%2Fpython-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tcgdex","download_url":"https://codeload.github.com/tcgdex/python-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247804613,"owners_count":20999021,"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":["api","async","card","pdm","pokemon","pokemon-api","pokemon-cards","python","sdk","tcg","tcgdex","trading"],"created_at":"2024-11-06T09:14:14.952Z","updated_at":"2025-07-06T20:33:29.825Z","avatar_url":"https://github.com/tcgdex.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://www.tcgdex.net\"\u003e\n\t\t\u003cimg src=\"https://www.tcgdex.net/assets/og.png\" width=\"90%\" alt=\"TCGdex Main Image\"\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"http://pypi.org/project/tcgdex-sdk\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/pypi/v/tcgdex-sdk?style=flat-square\" alt=\"Pypi Version\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"http://pypi.org/project/tcgdex-sdk\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/pypi/dm/tcgdex-sdk?style=flat-square\" alt=\"Pypi Downloads\"\u003e\n\t\u003c/a\u003e\n\t\t\u003ca href=\"https://github.com/tcgdex/python-sdk/stargazers\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/github/stars/tcgdex/python-sdk?style=flat-square\" alt=\"Github stars\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://github.com/tcgdex/python-sdk/actions/workflows/build.yml\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/tcgdex/python-sdk/build.yml?style=flat-square\" alt=\"Build Status\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://discord.gg/peACSRMZ7V\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/discord/857231041261076491?color=%235865F2\u0026label=Discord\u0026style=flat-square\" alt=\"Discord Link\"\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n# TCGdex Python SDK\n\nA fast, type-safe Python SDK for the TCGdex API. Query Pokémon Trading Card Game data easily. 🚀\n\n```python\nfrom tcgdexsdk import TCGdex\n\n# Fetch a card in one line\ncard = await TCGdex().card.get(\"swsh3-136\")\ncard = TCGdex().card.getSync(\"swsh3-136\")\nprint(f\"Found: {card.name} ({card.localId}/{card.set.cardCount.total})\")\n```\n\n## ⚡️ Quick Install\n\n```bash\npip install tcgdex-sdk\n```\n\n## 🚀 Features\n\n- **Type-Safe**: Full typing support for better IDE integration\n- **Async/Await**: Built for modern Python applications and compatible with synchronous operations\n- **Zero Config**: Works out of the box\n- **Multi-Language**: Support for English, French, German, Japanese, Chinese, [and more](https://github.com/tcgdex/cards-database/blob/master/interfaces.d.ts#L1-L5)\n- **Rich Data**: Access cards, sets, series, rarities, and more\n- **Lightweight**: Minimal dependencies (only [dacite](https://github.com/konradhalas/dacite))\n\n## 🎯 Quick Examples\n\n### Find Cards by Various Criteria\n\n```python\nsdk = TCGdex(\"en\")\n\n# Get the cards made by the illustrator\ncards = await sdk.illustrator.get(\"5ban Graphics\")\ncards = sdk.illustrator.getSync(\"5ban Graphics\")\n\n# Get the data about the Sword \u0026 Shield serie by ID\nseries = await sdk.serie.get(\"swsh\")\nseries = sdk.serie.getSync(\"swsh\")\n\n# Get all cards with 110 HP\nhp_cards = await sdk.hp.get(\"110\")\nhp_cards = sdk.hp.getSync(\"110\")\n\n# List all available rarities\nrarities = await sdk.rarity.list()\nrarities = sdk.rarity.listSync()\n\n# List all cards with the name being \"Furret\"\nrarities = await sdk.card.list(Query().equal(\"name\", \"Furret\"))\nrarities = sdk.card.listSync(Query().equal(\"name\", \"Furret\"))\n```\n\n### Working with Sets and Series\n\n```python\n# Get set details\ndarkness_ablaze = await sdk.set.get(\"Darkness Ablaze\")\n# darkness_ablaze = sdk.set.getSync(\"Darkness Ablaze\")\nprint(f\"Set: {darkness_ablaze.name} ({darkness_ablaze.cardCount.total} cards)\")\n\n# Get series info\nswsh = await sdk.serie.get(\"swsh\")\n# swsh = sdk.serie.getSync(\"swsh\")\nprint(f\"Series: {swsh.name} ({len(swsh.sets)} sets)\")\n```\n\n## 🛠 Available Endpoints\n\n### Card Data\n```python\nsdk.card         # Core card data\nsdk.rarity       # Card rarities\nsdk.hp           # HP values\nsdk.illustrator  # Card illustrators\n```\n\n### Game Mechanics\n```python\nsdk.type         # Pokémon types\nsdk.energyType   # Energy types\nsdk.retreat      # Retreat costs\nsdk.stage        # Evolution stages\n```\n\n### Card Details\n```python\nsdk.variant        # Card variants\nsdk.suffix         # Card suffixes\nsdk.regulationMark # Regulation marks\nsdk.dexId         # Pokédex IDs\n```\n\n### Collections\n```python\nsdk.set           # Card sets\nsdk.serie         # Card series\n```\n\n## 🌐 Language Support\n\n```python\nfrom tcgdexsdk import TCGdex, Language\n\n# Using string\nsdk = TCGdex(\"en\")  # English\nsdk = TCGdex(\"fr\")  # French\n\n# Using enum (type-safe)\nsdk = TCGdex(Language.EN)\nsdk = TCGdex(Language.FR)\n\n# After creating the instance you can change at any time the language\nsdk.setLanguage(Language.FR)\n# or\nsdk.setLanguage(\"fr\")\n```\n\n_[full list of languages available here](https://github.com/tcgdex/cards-database/blob/master/interfaces.d.ts#L1-L5)_\n\n__\n\n## 🤝 Contributing\n\nWe love contributions! Here's how:\n\n1. 🍴 Fork it\n2. 🌿 Create your feature branch (`git checkout -b feature/amazing`)\n3. 🔧 Make your changes\n4. 🚀 Push to the branch (`git push origin feature/amazing`)\n5. 🎉 Open a PR\n\n## 📘 Documentation\n\n- [Full API Documentation](https://www.tcgdex.dev)\n- [Python SDK Guide](https://www.tcgdex.dev/sdks/python)\n\n## 💬 Community \u0026 Support\n\n- [Discord Server](https://discord.gg/peACSRMZ7V) - Get help and discuss features\n- [GitHub Issues](https://github.com/tcgdex/python-sdk/issues) - Bug reports and feature requests\n\n## 📜 License\n\nMIT © [TCGdex](https://github.com/tcgdex)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcgdex%2Fpython-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftcgdex%2Fpython-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcgdex%2Fpython-sdk/lists"}