{ "info": { "author": "thegamerbr1", "author_email": "xthegamerbr1x@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "tgcode\n======\n\n| *tgcode* is a simple library that let's you convert binary data into a\n string and vice-versa.\n| This could be useful for sharing files via an IRC channel, send files\n via pastebin like services, make you own protocol that uses this\n library or anything like that.\n\nInstallation\n============\n\nYou can install using the ``pip`` command line utility.\n\n::\n\n pip install tgcode\n\nUsage\n=====\n\nIt's simple, just use the ``encode()`` and ``decode()`` functions, just\nlike that:\n\n.. code:: python\n\n import tgcode\n\n data = b'Hello, World!'\n\n encoded = tgcode.encode(data)\n\n decoded = tgcode.decode(encoded)\n\n print('Are they equals: {}'.format(decoded==data))\n\nComplex Usage\n=============\n\n| Okay, okay, you want more information that a snippet? Here we go:\n\nencode()\n--------\n \n| The ``encode()`` encodes a binary value into a decodable\n string. It receives as argument the ``bytes()`` that will be encoded\n and returns the encoded ``str()``\n| Example:\n\n.. code:: python\n\n import tgcode\n\n data = b'Hello, World!' #bytes data to be encoded\n\n encoded_data = tgcode.encode(data) #encodes the data\n\n print('Encoded bytes: {}'.format(encoded_data)) #prints the encoded data\n\ndecode()\n--------\n\n| The ``decode()`` function accepts as argument a string returned by\n ``decode()`` or ``fast_decode()``. It receives as argument the\n ``str()`` that will be decoded and returns the decoded ``bytes()``.\n| Example:\n\n.. code:: python\n\n import tgcode\n\n encoded_data = '_=}o\u00a7}v\u00a7}v\u00a7}y=SG}=}y\u00a7}B\u00a7}v\u00a7}n=H' #the encoded string\n\n data = tgcode.decode(encoded_data) #decodes the string\n\n file = open('tgcode.test', 'wb') #opens a file with \"write binary\" flag\n\n file.write(data) #writes the decoded data into the file\n\n file.close() #saves the file\n\nfast\\_encode()\n--------------\n\n| This function splits the data and encodes him in different threads.\n The arguments are exactly equals to the ``encode()``'s arguments,\n except for the extra ``thread_quantity`` argument, that are an integer\n (``int()``) with the amount of threads that will be used. **JUST** use\n this function for binaries biggest than the number of threads, like\n files or big messages. The default ``thread_quantity`` value are 35.\n| Example:\n\n.. code:: python\n\n import tgcode\n\n file = open('tgcode.test', 'rb') #opens the file with \"read binary\" flag\n\n data = file.read() #reads the data\n\n fast_encoded = tgcode.fast_encode(data) #fastly encodes the data\n\n file.close() #closes the file\n\n print('Fastly encoded data: {}'.format(fast_encoded)) #prints the encoded data\n\nLicense\n=======\n\nMIT license \n\n.. code::\n\n Copyright (c) 2016\n\n Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the\n \"Software\"), to deal in the Software without restriction, including\n without limitation the rights to use, copy, modify, merge, publish,\n distribute, sublicense, and/or sell copies of the Software, and to\n permit persons to whom the Software is furnished to do so, subject to\n the following conditions:\n\n The above copyright notice and this permission notice shall be included\n in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \\`\\`\\`notice and\n this permission notice shall be included in all copies or substantial\n portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nAuthor\n======\n| The author of this tool wants to be called as \"thegamerbr1\". In\n case of bugs, ideas or help, contact: \n| - Skype: xthegamerbr1x\n| Telegram: @thegamerbr1 \n| - Email (slow response): xthegamerbr1x@gmail.com", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "encoding binary bytes string data irc file bin convert", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "TGCode", "package_url": "https://pypi.org/project/TGCode/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/TGCode/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/TGCode/0.3.0.post2/", "requires_dist": null, "requires_python": null, "summary": "TGCode is a simple library that let's you convert binary data into a string and vice-versa.", "version": "0.3.0.post2" }, "last_serial": 2323426, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "40d80df9b223042a676c574340f8bb75", "sha256": "a76f8bf0d829e34092fab80675c3d7edc8c817e5931a803d97f7c41e266e8def" }, "downloads": -1, "filename": "TGCode-0.1.zip", "has_sig": false, "md5_digest": "40d80df9b223042a676c574340f8bb75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6614, "upload_time": "2016-09-03T02:07:01", "url": "https://files.pythonhosted.org/packages/33/a0/787e09b91c62188b4c29c0266a7cde4a01bef29d9688382f5d6dc7b4217d/TGCode-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "a698f96245e8cc1b5b683b4e14b169ed", "sha256": "cec878c8bfb8cc95b8a438f7836efb39a8c168b7560fcb8b3c5ac065fe81c691" }, "downloads": -1, "filename": "TGCode-0.2.zip", "has_sig": false, "md5_digest": "a698f96245e8cc1b5b683b4e14b169ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8317, "upload_time": "2016-09-03T02:20:20", "url": "https://files.pythonhosted.org/packages/a7/d3/125114ab5c3bae5b7ca8ac754e54405dce6cf9e4bd4c11889b623902174f/TGCode-0.2.zip" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "291183de5627f5ba200f9bbc53b828bf", "sha256": "af2705b7d7a235a0075862765c41ee26dd9782aab6094784c905c7a66f14be7c" }, "downloads": -1, "filename": "TGCode-0.3.zip", "has_sig": false, "md5_digest": "291183de5627f5ba200f9bbc53b828bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8479, "upload_time": "2016-09-03T22:13:14", "url": "https://files.pythonhosted.org/packages/10/9a/6bfd8877b2597815ecb3934564305933f7feea970773a1cfaff8d1bf27ca/TGCode-0.3.zip" } ], "0.3.0.post1": [ { "comment_text": "", "digests": { "md5": "ca85ede63833b219569f3d95601ae3b8", "sha256": "371a31b72e19e9d85fa414aec097b0f513868d014041710b61cb0f8e835a3a42" }, "downloads": -1, "filename": "TGCode-0.3.0.post1.zip", "has_sig": false, "md5_digest": "ca85ede63833b219569f3d95601ae3b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8676, "upload_time": "2016-09-03T22:22:52", "url": "https://files.pythonhosted.org/packages/00/71/eec9917251a06395372a25d8fced9c6cae2c21f16e9760b9fa01ddfb171e/TGCode-0.3.0.post1.zip" } ], "0.3.0.post2": [ { "comment_text": "", "digests": { "md5": "d7ac304eafa88bf3fe45d103c81fbc5d", "sha256": "af37577a24c570d7d34a8e9e2ca628751947abcb918a241d672334536e92cdca" }, "downloads": -1, "filename": "TGCode-0.3.0.post2.zip", "has_sig": false, "md5_digest": "d7ac304eafa88bf3fe45d103c81fbc5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8682, "upload_time": "2016-09-03T22:25:49", "url": "https://files.pythonhosted.org/packages/6c/88/dea0a710fff68c9c9aec32982682018c0795eefb590f553a8ef0dbf2efdf/TGCode-0.3.0.post2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d7ac304eafa88bf3fe45d103c81fbc5d", "sha256": "af37577a24c570d7d34a8e9e2ca628751947abcb918a241d672334536e92cdca" }, "downloads": -1, "filename": "TGCode-0.3.0.post2.zip", "has_sig": false, "md5_digest": "d7ac304eafa88bf3fe45d103c81fbc5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8682, "upload_time": "2016-09-03T22:25:49", "url": "https://files.pythonhosted.org/packages/6c/88/dea0a710fff68c9c9aec32982682018c0795eefb590f553a8ef0dbf2efdf/TGCode-0.3.0.post2.zip" } ] }