redgifs


Nameredgifs JSON
Version 2.0.0 PyPI version JSON
download
home_pageNone
SummaryAsync and Sync Python Wrapper for the RedGIFs API.
upload_time2024-12-28 04:28:35
maintainerNone
docs_urlNone
authorscrazzz
requires_python>=3.8
licenseThe MIT License (MIT) Copyright (c) 2022-present scrazzz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords redgifs api python cli async sync aiohttp requests
VCS
bugtrack_url
requirements requests aiohttp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center"> <code>redgifs</code> </h1>

<div align="center">
    <a href="https://pypi.org/project/redgifs">
        <img src="https://img.shields.io/pypi/v/redgifs.svg" alt="pypi">
    </a>
    <a href="https://github.com/scrazzz/redgifs/actions/workflows/test.yml">
        <img src="https://github.com/scrazzz/redgifs/actions/workflows/test.yml/badge.svg" alt="pytest">
    </a>
    <a href='https://redgifs.readthedocs.io/en/latest/?badge=latest'>
        <img src='https://readthedocs.org/projects/redgifs/badge/?version=latest' alt='Documentation Status' />
    </a>
</div>

<p align="center"> Async and Sync Python Wrapper for the RedGIFs API. </p>

-----

> ⭐ _Please star this repo to support the developer and to encourage the development of this project!_

-----

### Installation
```
pip install -U redgifs
```

#### Development version
```
pip install -U git+https://github.com/scrazzz/redgifs
```

`redgifs` works on Python versions 3.8 and above.

-----

### Quickstart
#### 1. Command Line:
Install: `pip install redgifs[cli]`
```console
$ redgifs --help
Usage: redgifs [OPTIONS] [URLS]...

Options:
  -q, --quality [sd|hd]  Video quality of GIF to download.  [default: hd]
  -d, --dir FOLDER_NAME  The folder/directory to save the downloads to.
  -i, --input PATH       Download URLs from a newline seperated txt file.
  --help                 Show this message and exit.
```

Examples:
```console
$ # Download files to a folder
$ ls
Home    Downloads  Homework  Music
Backup  Documents  Videos    Games
$ redgifs https://redgifs.com/watch/xyz --q sd --dir Homework
Downloading xyz...
Download complete
$ ls Homework
xyz.mp4
```

```console
$ # Download GIFs from a file that contains a list of URLs
$
$ # urls.txt:
$ # https://redigfs.com/watch/xyz
$ # https://redigfs.com/watch/qwe
$ # https://redigfs.com/watch/abc
$ # https://redigfs.com/watch/rst

$ redgifs -i urls.txt
Downloading xyz...
Download complete
Downloading qwe...
```

```console
$ # Download all GIFs from a user's profile
$ mkdir rg_vids
$ redgifs https://redgifs.com/users/usernamethatexists -d rg_vids
Downloaded 1/3 GIFs
Downloaded 2/3 GIFs
Downloaded 3/3 GIFs

Downloaded 3/3 videos of "usernamethatexists" to rg_vids folder sucessfully
```

#### 2. Synchronous usage:
```py
import redgifs

api = redgifs.API()
api.login() # Login with temporary token
response = api.search('3D')
print(response)
api.close()
```

#### 3. Asynchronous usage:
```py
import asyncio
from redgifs.aio import API # note this

async def main():
    api = API()
    await api.login() # Login with temporary token
    response = await api.search('3D')
    print(response)
    await api.close()

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```

More examples can be found in the examples directory.

-----

### Links
- [Documentation](https://redgifs.readthedocs.io)
- [Discord](https://discord.gg/NtAJMCcTd4)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "redgifs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "redgifs, api, python, cli, async, sync, aiohttp, requests",
    "author": "scrazzz",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/eb/c3/cf57338945d1c3bf18cfd070bbe8dc3f178fb9c143ca1fb01ce60d9b1721/redgifs-2.0.0.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\"> <code>redgifs</code> </h1>\n\n<div align=\"center\">\n    <a href=\"https://pypi.org/project/redgifs\">\n        <img src=\"https://img.shields.io/pypi/v/redgifs.svg\" alt=\"pypi\">\n    </a>\n    <a href=\"https://github.com/scrazzz/redgifs/actions/workflows/test.yml\">\n        <img src=\"https://github.com/scrazzz/redgifs/actions/workflows/test.yml/badge.svg\" alt=\"pytest\">\n    </a>\n    <a href='https://redgifs.readthedocs.io/en/latest/?badge=latest'>\n        <img src='https://readthedocs.org/projects/redgifs/badge/?version=latest' alt='Documentation Status' />\n    </a>\n</div>\n\n<p align=\"center\"> Async and Sync Python Wrapper for the RedGIFs API. </p>\n\n-----\n\n> \u2b50 _Please star this repo to support the developer and to encourage the development of this project!_\n\n-----\n\n### Installation\n```\npip install -U redgifs\n```\n\n#### Development version\n```\npip install -U git+https://github.com/scrazzz/redgifs\n```\n\n`redgifs` works on Python versions 3.8 and above.\n\n-----\n\n### Quickstart\n#### 1. Command Line:\nInstall: `pip install redgifs[cli]`\n```console\n$ redgifs --help\nUsage: redgifs [OPTIONS] [URLS]...\n\nOptions:\n  -q, --quality [sd|hd]  Video quality of GIF to download.  [default: hd]\n  -d, --dir FOLDER_NAME  The folder/directory to save the downloads to.\n  -i, --input PATH       Download URLs from a newline seperated txt file.\n  --help                 Show this message and exit.\n```\n\nExamples:\n```console\n$ # Download files to a folder\n$ ls\nHome    Downloads  Homework  Music\nBackup  Documents  Videos    Games\n$ redgifs https://redgifs.com/watch/xyz --q sd --dir Homework\nDownloading xyz...\nDownload complete\n$ ls Homework\nxyz.mp4\n```\n\n```console\n$ # Download GIFs from a file that contains a list of URLs\n$\n$ # urls.txt:\n$ # https://redigfs.com/watch/xyz\n$ # https://redigfs.com/watch/qwe\n$ # https://redigfs.com/watch/abc\n$ # https://redigfs.com/watch/rst\n\n$ redgifs -i urls.txt\nDownloading xyz...\nDownload complete\nDownloading qwe...\n```\n\n```console\n$ # Download all GIFs from a user's profile\n$ mkdir rg_vids\n$ redgifs https://redgifs.com/users/usernamethatexists -d rg_vids\nDownloaded 1/3 GIFs\nDownloaded 2/3 GIFs\nDownloaded 3/3 GIFs\n\nDownloaded 3/3 videos of \"usernamethatexists\" to rg_vids folder sucessfully\n```\n\n#### 2. Synchronous usage:\n```py\nimport redgifs\n\napi = redgifs.API()\napi.login() # Login with temporary token\nresponse = api.search('3D')\nprint(response)\napi.close()\n```\n\n#### 3. Asynchronous usage:\n```py\nimport asyncio\nfrom redgifs.aio import API # note this\n\nasync def main():\n    api = API()\n    await api.login() # Login with temporary token\n    response = await api.search('3D')\n    print(response)\n    await api.close()\n\nloop = asyncio.get_event_loop()\nloop.run_until_complete(main())\n```\n\nMore examples can be found in the examples directory.\n\n-----\n\n### Links\n- [Documentation](https://redgifs.readthedocs.io)\n- [Discord](https://discord.gg/NtAJMCcTd4)\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT)  Copyright (c) 2022-present scrazzz  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Async and Sync Python Wrapper for the RedGIFs API.",
    "version": "2.0.0",
    "project_urls": {
        "Changelogs": "https://redgifs.rtfd.io/en/stable/changelogs.html",
        "Documentation": "https://redgifs.rtfd.io/en/stable/",
        "Issues": "https://github.com/scrazzz/redgifs/issues",
        "Repository": "https://github.com/scrazzz/redgifs"
    },
    "split_keywords": [
        "redgifs",
        " api",
        " python",
        " cli",
        " async",
        " sync",
        " aiohttp",
        " requests"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb69616ef326a0ff22614d4928ed0cddaf58b2392f66444fd98a3e5bbd8e61cc",
                "md5": "a77e1d24c5f5fb65c6390e0296f8f7df",
                "sha256": "dbc57e060652947988b68644de685901d278a5855d2830d441684edf0782ebea"
            },
            "downloads": -1,
            "filename": "redgifs-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a77e1d24c5f5fb65c6390e0296f8f7df",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 118376,
            "upload_time": "2024-12-28T04:28:32",
            "upload_time_iso_8601": "2024-12-28T04:28:32.495567Z",
            "url": "https://files.pythonhosted.org/packages/cb/69/616ef326a0ff22614d4928ed0cddaf58b2392f66444fd98a3e5bbd8e61cc/redgifs-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebc3cf57338945d1c3bf18cfd070bbe8dc3f178fb9c143ca1fb01ce60d9b1721",
                "md5": "03bebdaf0f33dfc484b03aa90b012eaa",
                "sha256": "3815138b8967e4a00d6923ff847eeebce111e28f631b928305fec1bc4a8fec8e"
            },
            "downloads": -1,
            "filename": "redgifs-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "03bebdaf0f33dfc484b03aa90b012eaa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 106389,
            "upload_time": "2024-12-28T04:28:35",
            "upload_time_iso_8601": "2024-12-28T04:28:35.086356Z",
            "url": "https://files.pythonhosted.org/packages/eb/c3/cf57338945d1c3bf18cfd070bbe8dc3f178fb9c143ca1fb01ce60d9b1721/redgifs-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-28 04:28:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "scrazzz",
    "github_project": "redgifs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.25.0"
                ]
            ]
        },
        {
            "name": "aiohttp",
            "specs": [
                [
                    ">=",
                    "3.6.0"
                ],
                [
                    "<",
                    "4"
                ]
            ]
        }
    ],
    "lcname": "redgifs"
}
        
Elapsed time: 0.47706s