redgifs


Nameredgifs JSON
Version 1.9.5 PyPI version JSON
download
home_pageNone
SummaryAsync and Sync Python Wrapper for the RedGIFs API.
upload_time2024-09-05 21:34:16
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/4d/06/0b74898033db09b54e5a322e785432ec887828fc3f05c3f64a5bd5c708e7/redgifs-1.9.5.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": "1.9.5",
    "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": "9d106e2613a8425b92dd73a8af961b8b948e0632e368e5ef2a79f745d5c7876e",
                "md5": "2818fcf3c1131f33ebe1da031d992d09",
                "sha256": "d6d5836cd089f2714a66f02abc078a8a8e49d84b52020940e10da9c02ec07f4c"
            },
            "downloads": -1,
            "filename": "redgifs-1.9.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2818fcf3c1131f33ebe1da031d992d09",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 118875,
            "upload_time": "2024-09-05T21:34:14",
            "upload_time_iso_8601": "2024-09-05T21:34:14.929749Z",
            "url": "https://files.pythonhosted.org/packages/9d/10/6e2613a8425b92dd73a8af961b8b948e0632e368e5ef2a79f745d5c7876e/redgifs-1.9.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4d060b74898033db09b54e5a322e785432ec887828fc3f05c3f64a5bd5c708e7",
                "md5": "68fa0143bccd94761e873582c6c6d2a4",
                "sha256": "08d9e9506356ab65ee8a6306f581b16cb55953e5953ee5c21b1a866dc723c849"
            },
            "downloads": -1,
            "filename": "redgifs-1.9.5.tar.gz",
            "has_sig": false,
            "md5_digest": "68fa0143bccd94761e873582c6c6d2a4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 106498,
            "upload_time": "2024-09-05T21:34:16",
            "upload_time_iso_8601": "2024-09-05T21:34:16.229971Z",
            "url": "https://files.pythonhosted.org/packages/4d/06/0b74898033db09b54e5a322e785432ec887828fc3f05c3f64a5bd5c708e7/redgifs-1.9.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-05 21:34:16",
    "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.33128s