{"id":21982646,"url":"https://github.com/patrickpei/pycccedict","last_synced_at":"2025-04-30T05:23:00.156Z","repository":{"id":200929133,"uuid":"706554237","full_name":"patrickpei/pycccedict","owner":"patrickpei","description":"CC-CEDICT in Python","archived":false,"fork":false,"pushed_at":"2023-11-07T16:45:40.000Z","size":7466,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T21:02:55.811Z","etag":null,"topics":["cc-cedict","chinese"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pycccedict/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patrickpei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2023-10-18T07:18:30.000Z","updated_at":"2024-12-15T17:02:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"29811eb1-a54e-422f-a2c1-b42f9b12a9a7","html_url":"https://github.com/patrickpei/pycccedict","commit_stats":null,"previous_names":["patrickpei/pycccedict"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickpei%2Fpycccedict","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickpei%2Fpycccedict/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickpei%2Fpycccedict/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickpei%2Fpycccedict/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickpei","download_url":"https://codeload.github.com/patrickpei/pycccedict/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251396848,"owners_count":21582949,"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":["cc-cedict","chinese"],"created_at":"2024-11-29T17:30:14.966Z","updated_at":"2025-04-30T05:23:00.128Z","avatar_url":"https://github.com/patrickpei.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/pycccedict.svg)](https://badge.fury.io/py/pycccedict)\n[![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC_BY--SA_4.0-lightgrey.svg)](https://creativecommons.org/licenses/by-sa/4.0/)\n\n# CC-CEDICT in Python\nTo use the [CC-CEDICT](https://www.mdbg.net/chinese/dictionary?page=cc-cedict) Chinese to English dictionary in Python.\n\n## Installation\n```bash\npip install pycccedict\n```\n\n## Example\n1. Get an entry\n```python\nfrom pycccedict.cccedict import CcCedict\n\ncccedict = CcCedict()\ncccedict.get_entry('猫')\n```\n```json\n{\n    \"traditional\": \"貓\",\n    \"simplified\": \"猫\",\n    \"pinyin\": \"mao1\",\n    \"definitions\": [\n        \"cat\",\n        \"CL:隻|只[zhi1]\",\n        \"(dialect) to hide oneself\",\n        \"(coll.) modem\"\n    ]\n}\n```\n\n## API\n### get_entry\n```python\n\u003e\u003e\u003e cccedict.get_entry('猫')\n{\n    \"traditional\": \"貓\",\n    \"simplified\": \"猫\",\n    \"pinyin\": \"mao1\",\n    \"definitions\": [\n        \"cat\",\n        \"CL:隻|只[zhi1]\",\n        \"(dialect) to hide oneself\",\n        \"(coll.) modem\"\n    ]\n}\n```\n### get_entries\n```python\n\u003e\u003e\u003e cccedict.get_entries()[:2]\n[{'traditional': '%', 'simplified': '%', 'pinyin': 'pa1', 'definitions': ['percent (Tw)']}, {'traditional': '2019冠狀病毒病', 'simplified': '2019冠状病毒病', 'pinyin': 'er4 ling2 yi1 jiu3 guan1 zhuang4 bing4 du2 bing4', 'definitions': ['COVID-19, the coronavirus disease identified in 2019']}]\n```\n### get_traditional\n```python\n\u003e\u003e\u003e cccedict.get_traditional('猫')\n'貓'\n```\n### get_simplified\n```python\n\u003e\u003e\u003e cccedict.get_simplified('貓')\n'猫'\n```\n### get_pinyin\n```python\n\u003e\u003e\u003e cccedict.get_pinyin('猫')\n'mao1'\n```\n### get_definitions\n```python\n\u003e\u003e\u003e cccedict.get_definitions('猫')\n['cat', 'CL:隻|只[zhi1]', '(dialect) to hide oneself', '(coll.) modem']\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickpei%2Fpycccedict","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickpei%2Fpycccedict","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickpei%2Fpycccedict/lists"}