Skip to main content

No project description provided

Project description

('Build Status\n\n# PyLeo Lingualeo API python library\n\n## Installation\n\nbash\npip install pyleo\n\n\n## Example usage\n\npython\nimport json\nfrom pyleo.api import LeoApi\n\napi_instance = LeoApi(\'your@ema.il\', \'password\')\n\nif api_instance.need_auth:\n api_instance.auth() # Authorize user\n\ntranslation = json.loads(api_instance.get_translations(\'fake\').decode(\'utf-8\'))\n\nprint(json.dumps(translation, indent=4, sort_keys=True, ensure_ascii=False))\n\n\n## sample API response\n\njson\n\n{\n "_hash": "0000.0",\n "error_msg": "",\n "experienceSkills": null,\n "meatballs": 55,\n "notify_count": 2,\n "questData": {\n "leoClothing": 0,\n "meatballs": 55,\n "task_actions_finished": [\n [\n 1,\n 1\n ]\n ],\n "task_num": 1,\n "task_num_prev": 0,\n "task_state": 2\n },\n "userdict3": {\n "is_user": false,\n "lang": {\n "current": "ru",\n "target": "en"\n },\n "lemmas": [\n {\n "lemma_id": 15421,\n "lemma_value": "FAKE",\n "speech_part": {\n "code": "Noun",\n "name": "\xd1\x81\xd1\x83\xd1\x89\xd0\xb5\xd1\x81\xd1\x82\xd0\xb2\xd0\xb8\xd1\x82\xd0\xb5\xd0\xbb\xd1\x8c\xd0\xbd\xd0\xbe\xd0\xb5",\n "short_name": "\xd1\x81\xd1\x83\xd1\x89."\n },\n "speech_part_id": 7\n },\n {\n "lemma_id": 15421,\n "lemma_value": "FAKE",\n "speech_part": {\n "code": "Verb",\n "name": "\xd0\xb3\xd0\xbb\xd0\xb0\xd0\xb3\xd0\xbe\xd0\xbb",\n "short_name": "\xd0\xb3\xd0\xbb\xd0\xb0\xd0\xb3."\n },\n "speech_part_id": 12\n }\n ],\n "sound_url": "https://audiocdn.lingualeo.com/v2/1/15421-631152008.mp3",\n "transcription": "fe\xc9\xaak",\n "translations": [\n {\n "is_blame": 0,\n "is_owner": false,\n "is_user": 0,\n "rating": 1,\n "rating_avg": 0.206543,\n "rating_user_vote": 0,\n "source": "",\n "speech_part_id": 0,\n "star": 1,\n "translate_id": 29600,\n "translate_value": "\xd0\xbf\xd0\xbe\xd0\xb4\xd0\xb4\xd0\xb5\xd0\xbb\xd0\xba\xd0\xb0",\n "translate_votes": 56991\n },\n {\n "is_blame": 0,\n "is_owner": false,\n "is_user": 0,\n "rating": 0,\n "rating_avg": 0.2,\n "rating_user_vote": 0,\n "source": "",\n "speech_part_id": 0,\n "star": 3,\n "translate_id": 29604,\n "translate_value": "\xd0\xbf\xd1\x80\xd0\xb8\xd0\xba\xd0\xb8\xd0\xb4\xd1\x8b\xd0\xb2\xd0\xb0\xd1\x82\xd1\x8c\xd1\x81\xd1\x8f",\n "translate_votes": 14627\n },\n {\n "is_blame": 0,\n "is_owner": false,\n "is_user": 0,\n "rating": 0,\n "rating_avg": 0.2,\n "rating_user_vote": 0,\n "source": "",\n "speech_part_id": 0,\n "star": 3,\n "translate_id": 2630670,\n "translate_value": "\xd0\xbc\xd0\xbe\xd1\x88\xd0\xb5\xd0\xbd\xd0\xbd\xd0\xb8\xd1\x87\xd0\xb0\xd1\x82\xd1\x8c",\n "translate_votes": 9581\n },\n {\n "is_blame": 0,\n "is_owner": false,\n "is_user": 0,\n "rating": 0,\n "rating_avg": 0.2,\n "rating_user_vote": 0,\n "source": "",\n "speech_part_id": 0,\n "star": 3,\n "translate_id": 135960,\n "translate_value": "\xd1\x84\xd0\xb0\xd0\xbb\xd1\x8c\xd1\x88\xd0\xb8\xd0\xb2\xd1\x8b\xd0\xb9",\n "translate_votes": 4921\n },\n {\n "is_blame": 0,\n "is_owner": false,\n "is_user": 0,\n "rating": 0,\n "rating_avg": 0.2,\n "rating_user_vote": 0,\n "source": "",\n "speech_part_id": 7,\n "star": 3,\n "translate_id": 4021671,\n "translate_value": "\xd0\xbf\xd0\xbe\xd0\xb4\xd0\xb4\xd0\xb5\xd0\xbb\xd0\xba\xd0\xb0",\n "translate_votes": 3951\n }\n ],\n "word_count": 44926,\n "word_id": 15421,\n "word_speech_parts": {\n "12": {\n "code": "Verb",\n "name": "\xd0\xb3\xd0\xbb\xd0\xb0\xd0\xb3\xd0\xbe\xd0\xbb",\n "short_name": "\xd0\xb3\xd0\xbb\xd0\xb0\xd0\xb3."\n },\n "7": {\n "code": "Noun",\n "name": "\xd1\x81\xd1\x83\xd1\x89\xd0\xb5\xd1\x81\xd1\x82\xd0\xb2\xd0\xb8\xd1\x82\xd0\xb5\xd0\xbb\xd1\x8c\xd0\xbd\xd0\xbe\xd0\xb5",\n "short_name": "\xd1\x81\xd1\x83\xd1\x89."\n }\n },\n "word_top": 3,\n "word_type": 1,\n "word_value": "fake"\n },\n "utcServerTime": 1551600000\n}\n\n',)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyleo, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size pyleo-0.0.5.tar.gz (4.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page