Metadata-Version: 2.1
Name: PirateBayAPI
Version: 1.0.0
Summary: A PirateBay API wrapper
Author-email: x93bd0 <x93bd0@gmail.com>
License: Copyright (c) 2022 Boris (x93)        
        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.        
Project-URL: Homepage, https://github.com/x93bd0/PirateBay.py
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests

# PirateBay.py
This project is intended to be an API wrapper for [apibay](https://apibay.org/q.php?q=Example) & [ThePirateBay(only main.js for the trackers)](https://thepiratebay.org/static/main.js)

# How it works
It's own functionality is very easy to understand, its composed by a set of function's that points directly to the PirateBay API ([apibay](https://apibay.org/q.php?q=Example)) and parses the response for the programmer.

## A very simple example that search's "The Tomorrow War" in the Video.Movies category and prints result's
```python
import PirateBay
import typing

# Static Typing isn't required (but recomended)
results: typing.List[PirateBay.SearchElement] = PirateBay.Search(
    "The Tomorrow War", PirateBay.VideoType.Movies)

for result in results:
    print("File: {} {}.Mb (id:{})".format(
        result.name, round(result.size/1024/1024, 2), result.id))
```

## Another example, in this case, we get the download magnet link from the first result of the search
```python
import PirateBay
import typing

# Static Typing isn't required (but recomended)
results: typing.List[PirateBay.SearchElement] = PirateBay.Search(
    "The Tomorrow War", PirateBay.VideoType.Movies)

print("Download Link: {} (size:{}.Mb)".format(
    PirateBay.Download(results[0].id), round(results[0].size/1024/1024, 2)))
```
