{ "info": { "author": "kyb3r", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Communications :: Chat", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "
\n\n### Discord Embeds:\n\nYou can easily format and send embeds using this library.\n\n
\n\nNote: `Embed` objects from `discord.py` are also compatible with this library.\n\n```py\nfrom dhooks import Webhook, Embed\n\nhook = Webhook('url')\n\nembed = Embed(\n description='This is the **description** of the embed! :smiley:',\n color=0x1e0f3,\n timestamp=True # sets the timestamp to current time\n )\n\nimage1 = 'https://i.imgur.com/rdm3W9t.png'\nimage2 = 'https://i.imgur.com/f1LOr4q.png'\n\nembed.set_author(name='Author Goes Here', icon_url=image1)\nembed.add_field(name='Test Field', value='Value of the field :open_mouth:')\nembed.add_field(name='Another Field', value='1234 :smile:')\nembed.set_footer(text='Here is my footer text', icon_url=image1)\n\nembed.set_thumbnail(image1)\nembed.set_image(image2)\n\nhook.send(embeds=embed)\n```\n\n### Sending Files:\n\nYou can easily send files as shown.\n\n```py\nfrom dhooks import Webhook, File\nfrom io import BytesIO\nimport requests\n\nhook = Webhook('url')\n\nfile = File('path/to/file.png', name='cat.png') # optional name for discord\n\nhook.send('Look at this:', file=file)\n```\n\nYou can also pass a file-like object:\n\n```py\nresponse = requests.get('https://i.imgur.com/rdm3W9t.png')\nfile = File(BytesIO(response.content), name='wow.png')\n\nhook.send('Another one:', file=file)\n```\n\n### Get Webhook Info:\n\nYou can get some basic information related to the webhook through Discord's API.\n\n```py\nhook.get_info()\n```\n\nThe following attributes will be populated with data from discord:\n\n - `hook.guild_id`\n - `hook.channel_id`\n - `hook.default_name`\n - `hook.default_avatar_url`\n\n\n### Modify and Delete Webhooks:\nYou can change the default name and avatar of a webhook easily.\n\n```py\nwith open('img.png', rb) as f:\n img = f.read() # bytes\n\nhook.modify(name='Bob', avatar=img)\n\nhook.delete() # webhook deleted permanently\n```\n\n### Asynchronous Usage:\n\nTo asynchronously make requests using `aiohttp`, simply use `Webhook.Async` to create the object. An example is as follows. Simply use the `await` keyword when calling API methods.\n\n```py\nfrom dhooks import Webhook\n\nasync def main():\n hook = Webhook.Async('url')\n\n await hook.send('hello')\n await hook.modify('bob')\n await hook.get_info()\n await hook.delete()\n\n await hook.close() # close the client session\n```\n\nAlternatively you can use an `async with` block (asynchronous context manager) to automatically close the session once finished.\n```py\nasync def main():\n async with Webhook.Async('url') as hook:\n await hook.send('hello')\n```\n\n## Documentation\nYou can find the full API reference [here](https://dhooks.readthedocs.io).\n\n## License\nThis project is licensed under MIT.\n\n## Contributing\nFeel free to contribute to this project, a helping hand is always appreciated.\n\n[Join our discord server](https://discord.gg/etJNHCQ).",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/4rqm/dhooks/",
"keywords": "discord,webhooks,discordwebhooks,discordhooks",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "dhooks",
"package_url": "https://pypi.org/project/dhooks/",
"platform": "",
"project_url": "https://pypi.org/project/dhooks/",
"project_urls": {
"Documentation": "https://dhooks.readthedocs.io/",
"Homepage": "https://github.com/4rqm/dhooks/",
"Issue Tracker": "https://github.com/4rqm/dhooks/issues"
},
"release_url": "https://pypi.org/project/dhooks/1.1.0/",
"requires_dist": null,
"requires_python": ">=3.5",
"summary": "An (a)sync wrapper for discord webhooks",
"version": "1.1.0"
},
"last_serial": 4552142,
"releases": {
"0.0.1": [
{
"comment_text": "",
"digests": {
"md5": "aa27f82d78716dbfcfcf55bde698bb7f",
"sha256": "b5baf9f4e51b9e62ad1873dce6268273da4105063815de621190540475a4f304"
},
"downloads": -1,
"filename": "dhooks-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "aa27f82d78716dbfcfcf55bde698bb7f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 2000,
"upload_time": "2018-11-11T13:13:47",
"url": "https://files.pythonhosted.org/packages/b5/af/079a4807b841be6fc80d3909578dd58c5fa9bf612584ceb894471730b5c8/dhooks-0.0.1.tar.gz"
}
],
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "99af8b90fefa90e7e7c7407e0ba843b8",
"sha256": "e82f1677070a3e42c22ec4f1c91f1007c19ace6554fced62973672e32561f06c"
},
"downloads": -1,
"filename": "dhooks-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "99af8b90fefa90e7e7c7407e0ba843b8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 3522,
"upload_time": "2018-11-16T10:11:50",
"url": "https://files.pythonhosted.org/packages/f4/a2/e5e8e94814cedbedf7f7ebd71c716f84cde69e20e99dc0752dce4053588b/dhooks-1.0.0.tar.gz"
}
],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "6bd252eae302def098dfa0f56b7efea3",
"sha256": "b932ba8555fb0aa812f4197ba1e2c9f5c4257a7b2a24f6d7ef642a1e423db7ef"
},
"downloads": -1,
"filename": "dhooks-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "6bd252eae302def098dfa0f56b7efea3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6646,
"upload_time": "2018-11-17T04:30:51",
"url": "https://files.pythonhosted.org/packages/ab/93/5b8b1f940a7199b1d3482c04a48f501be601662e5f3047b3b4da1affe5a2/dhooks-1.0.1.tar.gz"
}
],
"1.0.2": [
{
"comment_text": "",
"digests": {
"md5": "e80431e370bdf968209d01d297e4faad",
"sha256": "124830d89ce0154a8ac94f5687986508615f337a40ebf0b4f565b22c8cfa5e9f"
},
"downloads": -1,
"filename": "dhooks-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "e80431e370bdf968209d01d297e4faad",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6866,
"upload_time": "2018-11-17T06:33:41",
"url": "https://files.pythonhosted.org/packages/b4/7e/10a61403720ce7c793c88b8f1068ad11f00849b88fb9cd31fa9e6fe2fb30/dhooks-1.0.2.tar.gz"
}
],
"1.0.3": [
{
"comment_text": "",
"digests": {
"md5": "b62e19de3056f12c9b8e88f9a172fe5a",
"sha256": "d80832af7a5f2800af33f335d32d5007ee91334e67417a0e86c2c9ace8416868"
},
"downloads": -1,
"filename": "dhooks-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "b62e19de3056f12c9b8e88f9a172fe5a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7331,
"upload_time": "2018-11-17T12:42:19",
"url": "https://files.pythonhosted.org/packages/3d/f1/2232a1e987b33baf042d9a2681e40a7386f98c4d8a50b84b706ca4ebda99/dhooks-1.0.3.tar.gz"
}
],
"1.0.4": [
{
"comment_text": "",
"digests": {
"md5": "3feca68c3120a571cb590417fa101172",
"sha256": "c6e38ed5692c1084a6a42333e581c240b074ed3a7d7c7c0a3b7ea810bcf707d9"
},
"downloads": -1,
"filename": "dhooks-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "3feca68c3120a571cb590417fa101172",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 7045,
"upload_time": "2018-11-17T12:55:21",
"url": "https://files.pythonhosted.org/packages/d3/53/8601300eba1b47106d57dd4268b3fd34562f5fefb2d93785530b8c40cbd4/dhooks-1.0.4.tar.gz"
}
],
"1.0.5": [
{
"comment_text": "",
"digests": {
"md5": "4f12fc209abc3242f60956683a31572f",
"sha256": "1db727001d41863773379886c009cdfdf03021a1a4a08586cd675a6d796d5f5e"
},
"downloads": -1,
"filename": "dhooks-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "4f12fc209abc3242f60956683a31572f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 7042,
"upload_time": "2018-11-17T22:47:48",
"url": "https://files.pythonhosted.org/packages/0c/ab/6336189b1e9877f1746561e6b28affb63803764ebf29b672ad65b9eecc53/dhooks-1.0.5.tar.gz"
}
],
"1.0.6": [
{
"comment_text": "",
"digests": {
"md5": "c655e335715372b9dad643b19b54f69f",
"sha256": "ca54f844600263ff20b9c266c391a874208a2561f4736058a70fb7049c8876cf"
},
"downloads": -1,
"filename": "dhooks-1.0.6.tar.gz",
"has_sig": false,
"md5_digest": "c655e335715372b9dad643b19b54f69f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 7134,
"upload_time": "2018-11-18T07:25:08",
"url": "https://files.pythonhosted.org/packages/bf/d9/a7a79faa9a40c49d9858d97baf5cf34ddc3a0b8494102fd60fd3e9dd0b46/dhooks-1.0.6.tar.gz"
}
],
"1.0.7": [
{
"comment_text": "",
"digests": {
"md5": "ce7f4555a65fd1fa8dbac4625b4f3238",
"sha256": "c6a041fcc83e9c979c5fb4dc2f7981e3b396ad3385054f5657066c76096224dc"
},
"downloads": -1,
"filename": "dhooks-1.0.7.tar.gz",
"has_sig": false,
"md5_digest": "ce7f4555a65fd1fa8dbac4625b4f3238",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 7140,
"upload_time": "2018-11-18T09:30:18",
"url": "https://files.pythonhosted.org/packages/8b/54/1bc9675c2d349c461b4d1a0a65e37d210eb96ab9ed30225f0adc52c64140/dhooks-1.0.7.tar.gz"
}
],
"1.0.8": [
{
"comment_text": "",
"digests": {
"md5": "9bc70cf78c472c2bc4b8cef9e9bf28aa",
"sha256": "4d071c6075e79cf8d5d27c259f5171f4a222473148f5f51f5f7a991fc77a96ca"
},
"downloads": -1,
"filename": "dhooks-1.0.8.tar.gz",
"has_sig": false,
"md5_digest": "9bc70cf78c472c2bc4b8cef9e9bf28aa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 7227,
"upload_time": "2018-11-18T11:01:31",
"url": "https://files.pythonhosted.org/packages/15/c3/74e3ba7cc4de39cbab8b7e4d5d72027b55b15ba63663d087e239e214867e/dhooks-1.0.8.tar.gz"
}
],
"1.0.9": [
{
"comment_text": "",
"digests": {
"md5": "563dd4f76bb7f02fbf5c8892119bd690",
"sha256": "4c94c5225da77e267eadd6d76609d9e6484be11951193dca4b3a1d7ef50ecc7b"
},
"downloads": -1,
"filename": "dhooks-1.0.9.tar.gz",
"has_sig": false,
"md5_digest": "563dd4f76bb7f02fbf5c8892119bd690",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 8676,
"upload_time": "2018-11-28T03:24:31",
"url": "https://files.pythonhosted.org/packages/82/fb/20ab22a1ab4725c242b24796de001554d6cad272fa2ac3122be1f8e8832b/dhooks-1.0.9.tar.gz"
}
],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "e293122336ff92fdb4386f14a95cfbba",
"sha256": "acd341198ecfc6b7c4a96f5c264a3ded83d542e567c05b524f7c0147cf5edc9c"
},
"downloads": -1,
"filename": "dhooks-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "e293122336ff92fdb4386f14a95cfbba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 11254,
"upload_time": "2018-12-02T10:19:16",
"url": "https://files.pythonhosted.org/packages/da/59/b337b07dd6ef8dd9af53def6f67283809a5d0292863c229045aaf06c4c56/dhooks-1.1.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "e293122336ff92fdb4386f14a95cfbba",
"sha256": "acd341198ecfc6b7c4a96f5c264a3ded83d542e567c05b524f7c0147cf5edc9c"
},
"downloads": -1,
"filename": "dhooks-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "e293122336ff92fdb4386f14a95cfbba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 11254,
"upload_time": "2018-12-02T10:19:16",
"url": "https://files.pythonhosted.org/packages/da/59/b337b07dd6ef8dd9af53def6f67283809a5d0292863c229045aaf06c4c56/dhooks-1.1.0.tar.gz"
}
]
}