{ "info": { "author": "eb-pypi", "author_email": "eb-pypi@eventbrite.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "Transifex Python Library\n========================\n\nThis library is a wrapper around the Transifex API, built to provide a\nsimpler interface to users of the API.\n\nAt this moment, it supports only a subset of the endpoints of the API.\nIn particular, it allows certain operations on Projects, Resources and\nTranslations.\n\nUsage\n-----\n\nInitialization\n~~~~~~~~~~~~~~\n\nBefore making any requests, you need to setup the HTTP handler, which\nwill be used for all subsequent requests.\n\nAuthentication works both with username/password or with an API token.\n\n.. code:: python\n\n from txlib_too.http.auth import BasicAuth\n from txlib_too.http.http_requests import HttpRequest\n from txlib_too.registry import registry\n\n credentials = BasicAuth(username='api', password='')\n\n host = 'https:/www.transifex.com/'\n conn = HttpRequest(host, auth=credentials)\n registry.setup({'http_handler': conn})\n\n\nProjects\n~~~~~~~~\n\nTODO\n\nResources\n~~~~~~~~~\n\nGet resource\n^^^^^^^^^^^^\n\n.. code:: python\n\n from txlib_too.api.resources import Resource\n from txlib_too.http.exceptions import NotFoundError, ServerError\n\n try:\n r = Resource.get(project_slug='project_slug', slug='resource_slug')\n print(r.slug) # 'resource_slug'\n except NotFoundError:\n print('Resource not found')\n except ServerError as e:\n print('Exception while retrieving resource: {}'.format(e))\n\n\nCreate/update resource\n^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n from txlib_too.api.resources import Resource\n from txlib_too.http.exceptions import NotFoundError, ServerError\n\n try:\n r = Resource.get(project_slug='project_slug', slug='resource_slug')\n # Resource exists, update it\n # Not all fields are allowed here. For example, if i18n_type\n # is provided, the request will fail with a 400 error\n try:\n r.save(content='{\"key1\": \"text1\"}')\n except ServerError as e:\n print('Exception while updating resource: {}'.format(e))\n\n except NotFoundError:\n # Resource does not exist, create one now\n try:\n r = Resource(project_slug='project_slug', slug='resource_slug')\n r.save(name='R1', i18n_type='KEYVALUEJSON', content='{\"key1\": \"text1\"}')\n except ServerError as e:\n print('Exception while creating resource: {}'.format(e))\n\n except ServerError as e:\n print('Exception while retrieving resource: {}'.format(e))\n\nAlternatively, instead of passing all parameters to :code:`save()`, you can\ndo the following:\n\n.. code:: python\n\n r = Resource.get(...)\n r.name = '...'\n r.i18n_type = '...'\n r.content = '...'\n r.save()\n\n\nTranslations\n~~~~~~~~~~~~\n\nGet translation\n^^^^^^^^^^^^^^^\n.. code:: python\n\n from txlib_too.api.translations import Translation\n from txlib_too.http.exceptions import NotFoundError, ServerError\n\n try:\n t = Translation.get(project_slug='project_slug', slug='resource_slug', lang='translation_language')\n print(t.lang) # 'translation_language'\n except NotFoundError:\n print('Translation not found')\n except ServerError as e:\n print('Exception while retrieving translation: {}'.format(e))\n\n\nCreate/update translation\n^^^^^^^^^^^^^^^^^^^^^^^^^\n.. code:: python\n\n from txlib_too.api.translations import Translation\n from txlib_too.http.exceptions import NotFoundError, ServerError\n\n try:\n t = Translation(\n project_slug=project_slug, slug=resource_slug, lang=language_code\n )\n t.save(content=content)\n except ServerError as e:\n print('Exception while retrieving translation: {}'.format(e))\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/transifex/transifex-python-library", "keywords": "translation,localization,internationalization", "license": "LGPL3", "maintainer": "", "maintainer_email": "", "name": "txlib-too", "package_url": "https://pypi.org/project/txlib-too/", "platform": "", "project_url": "https://pypi.org/project/txlib-too/", "project_urls": { "Homepage": "https://github.com/transifex/transifex-python-library" }, "release_url": "https://pypi.org/project/txlib-too/0.1.8/", "requires_dist": [ "requests", "six" ], "requires_python": "", "summary": "A python library for Transifex", "version": "0.1.8" }, "last_serial": 5309204, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "fe6cbefe4f570c28a47467a48dff8863", "sha256": "eabf8165711ebda813f110aeec5a261a5efd661851a7f5ec180ca3627cf93d18" }, "downloads": -1, "filename": "txlib_too-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fe6cbefe4f570c28a47467a48dff8863", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 39684, "upload_time": "2019-05-07T19:39:40", "url": "https://files.pythonhosted.org/packages/4b/3a/fc78378201cb5129116042cc53f4089c1d6d72049e4f122abaedb70b6e4c/txlib_too-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a38a22aa40a061079aacc29e90b52794", "sha256": "684f022ead1b368e0327c4aba68dfb232f96155de7ac228b0059bbd0019022ba" }, "downloads": -1, "filename": "txlib_too-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a38a22aa40a061079aacc29e90b52794", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32605, "upload_time": "2019-05-07T19:39:42", "url": "https://files.pythonhosted.org/packages/c8/a8/9f9feb79f49ed60e37b0936e773e0f192601f34305da4188f678d1bff67b/txlib_too-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "8694fd000a2de0ce91fd14ce4d976ca4", "sha256": "f342fd3cadfc75e0cde5febdf9488470aa53943495a3c39cb465db7af72a5caf" }, "downloads": -1, "filename": "txlib_too-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8694fd000a2de0ce91fd14ce4d976ca4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 40789, "upload_time": "2019-05-23T18:46:39", "url": "https://files.pythonhosted.org/packages/03/32/56be941130fcaa83dc16801fff30b2fa5400067101b69c94e5526b160500/txlib_too-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ede7d6c280808890ce99543b33ecc73", "sha256": "8deab4c5b3804a34332e2ee11515c038df70ee456b07437baebb6da3d3d9edfc" }, "downloads": -1, "filename": "txlib_too-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7ede7d6c280808890ce99543b33ecc73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38204, "upload_time": "2019-05-08T16:14:41", "url": "https://files.pythonhosted.org/packages/ab/a5/93371c407c5a65db862d512dbe9c852dd735a3f255ba156b30b7f3739c9c/txlib_too-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "1237043083aa1d24c9a2b05cec883385", "sha256": "3d21cb3ee55f7afbe280fb4f2cb880af152f64d6a1103a05cb76ed31ebb32f3e" }, "downloads": -1, "filename": "txlib_too-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1237043083aa1d24c9a2b05cec883385", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38197, "upload_time": "2019-05-08T16:18:52", "url": "https://files.pythonhosted.org/packages/a0/3f/a37917aa2b30f0c84377c1eb63ca8ab4b415973b21488ee9d4fcb0a2a4fe/txlib_too-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "1507efe8abff1ff0fe6e7b879791872f", "sha256": "9114253c190fccd969782bf112e9bad5705d2b7e629e4b1ea9ad94cfc139ba60" }, "downloads": -1, "filename": "txlib_too-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1507efe8abff1ff0fe6e7b879791872f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 40788, "upload_time": "2019-05-23T18:46:40", "url": "https://files.pythonhosted.org/packages/fc/3d/7d6e2c638350fb0da4853aee4b0cbfe0659be2f028f21a99e94b4a6dfb31/txlib_too-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9bfe871a82d5f2a07e0e25da6b828edf", "sha256": "90c378554a5df595dfe296bf4cc29fcf0431de77c7275a4f033f628e87e08685" }, "downloads": -1, "filename": "txlib_too-0.1.5.tar.gz", "has_sig": false, "md5_digest": "9bfe871a82d5f2a07e0e25da6b828edf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33107, "upload_time": "2019-05-23T16:28:51", "url": "https://files.pythonhosted.org/packages/93/6c/326122c28c9a52ea410c538e21f1b7544576d3270735e6365cefc76fae02/txlib_too-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "37547e49e548e718508937143f66ff2d", "sha256": "517a5680518b30ab47a20802ecd3e3e10c73674f8786480082b2519306562068" }, "downloads": -1, "filename": "txlib_too-0.1.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "37547e49e548e718508937143f66ff2d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 40791, "upload_time": "2019-05-23T18:46:42", "url": "https://files.pythonhosted.org/packages/f2/10/b2d513b61cea29c6fa49147743a25585ed85fd9ba3168bf1e47373e28970/txlib_too-0.1.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1d0ff4f36011dc2411da7d2392198c8a", "sha256": "2d217836e629a97566d089a6a99a6ade0eedcbc78b3ed62936342a348f933cd2" }, "downloads": -1, "filename": "txlib_too-0.1.6.tar.gz", "has_sig": false, "md5_digest": "1d0ff4f36011dc2411da7d2392198c8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33048, "upload_time": "2019-05-23T18:46:44", "url": "https://files.pythonhosted.org/packages/d3/a4/645d31eda2ed25815dd92a053c61d4137cdbebd0e2e999fc0b60c5f694bf/txlib_too-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "90e885cf48e9b3be2c8b138f9754ae8a", "sha256": "412616686a16cb7ee2762a32f40a0b27d2bf6c2e70c9d05f9bed6f935ff57b53" }, "downloads": -1, "filename": "txlib_too-0.1.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "90e885cf48e9b3be2c8b138f9754ae8a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 40788, "upload_time": "2019-05-23T18:49:14", "url": "https://files.pythonhosted.org/packages/a4/f2/7f62085a82387e7a702b591575cf4737f16606f636889e945d7cf77b417b/txlib_too-0.1.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "90edbf60f2263c24d2db78f9f54ab50f", "sha256": "b2760546ae0af169e51e02b65e10b1319bde4416af62395f92f03cff2effb503" }, "downloads": -1, "filename": "txlib_too-0.1.7.tar.gz", "has_sig": false, "md5_digest": "90edbf60f2263c24d2db78f9f54ab50f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33055, "upload_time": "2019-05-23T18:49:16", "url": "https://files.pythonhosted.org/packages/49/20/ecdb6c3ef65588af3029d764e213d44a4fa33b62be5a5ab1e92b718750c8/txlib_too-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "2b2810e96e8e16e0ea2016da401ea103", "sha256": "45931c380cc415a369daf2d99555c08648530966edb5a8ffb33970dab20f7f6b" }, "downloads": -1, "filename": "txlib_too-0.1.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2b2810e96e8e16e0ea2016da401ea103", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 40792, "upload_time": "2019-05-23T19:55:21", "url": "https://files.pythonhosted.org/packages/27/47/f383742fc5ec57521f2f898756749a62632fafd68380f3ab60e6051d1ca0/txlib_too-0.1.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2ab869cc86f3d6dfd72e51a58796b152", "sha256": "a799c36d05273429864a76414f644fb591c31b4188839b8e09f8e4796d2dc5d7" }, "downloads": -1, "filename": "txlib_too-0.1.8.tar.gz", "has_sig": false, "md5_digest": "2ab869cc86f3d6dfd72e51a58796b152", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38172, "upload_time": "2019-05-23T19:55:23", "url": "https://files.pythonhosted.org/packages/40/1e/9c9893554a4d2a1412d589d0c1fc4fef3ac2c35b2d0287f5f5d3687879d6/txlib_too-0.1.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2b2810e96e8e16e0ea2016da401ea103", "sha256": "45931c380cc415a369daf2d99555c08648530966edb5a8ffb33970dab20f7f6b" }, "downloads": -1, "filename": "txlib_too-0.1.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2b2810e96e8e16e0ea2016da401ea103", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 40792, "upload_time": "2019-05-23T19:55:21", "url": "https://files.pythonhosted.org/packages/27/47/f383742fc5ec57521f2f898756749a62632fafd68380f3ab60e6051d1ca0/txlib_too-0.1.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2ab869cc86f3d6dfd72e51a58796b152", "sha256": "a799c36d05273429864a76414f644fb591c31b4188839b8e09f8e4796d2dc5d7" }, "downloads": -1, "filename": "txlib_too-0.1.8.tar.gz", "has_sig": false, "md5_digest": "2ab869cc86f3d6dfd72e51a58796b152", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38172, "upload_time": "2019-05-23T19:55:23", "url": "https://files.pythonhosted.org/packages/40/1e/9c9893554a4d2a1412d589d0c1fc4fef3ac2c35b2d0287f5f5d3687879d6/txlib_too-0.1.8.tar.gz" } ] }