Metadata-Version: 2.1
Name: nekosama
Version: 4.1
Summary: API Wrapper for neko-sama.fr
Author-email: Egsagon <egsagon12@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Egsagon
        
        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: Repository, https://github.com/Egsagon/nekosama
Keywords: nekosama,anime,downloader,french
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx
Requires-Dist: yt_dlp
Requires-Dist: rich[progress]

# Nekosama

This is a python package for using with the [NekoSama](https://neko-sama.fr/) anime website.
```shell
pip install nekosama
```

## CLI Usage

This package can be used as a CLI tool.

```shell
$ python -m nekosama -h
usage: nekosama [-h] -i INPUT [-e EPISODES] [-o OUTPUT] [-q {1080p,720p,480p}]

options:
  --input INPUT               An anime URL
  --episodes EPISODES         List or range or episodes indexes (e.g. 0-5 or 1,2,3)
  --output OUTPUT             Output directory
  --quality {1080p,720p,480p} Video quality
```

Examples:
```shell
$ nekosama -i <url>          # Download a whole anime
$ nekosama -i <url> -q 480p  # Download in worst quality
$ nekosama -i <url> -e 1     # Download the first episode of an anime
$ nekosama -i <url> -e 1-8   # Download episodes 1 to 8 (included)
$ nekosama -i <url> -e 1,4,9 # Download specific episodes
```

## Package quickstart

```python
import nekosama

# Initialise a core
core = nekosama.Core()

# Search for animes
for anime in core.database.search(query = 'slime'):
    print(anime.title)

# Get an anime from a URL
anime = core.get('https://neko-sama.fr/anime/info/9520-tensei-shitara-slime-datta-ken_vostfr')

# List episodes
for episode in anime.episodes:
    print(episode.index, ':', episode.url)

# Download an episode
anime.episodes[0].download(
    path = 'ep1.mp4',
    quality = 1080
)
```

For more documentation, have a look at the source code and the docstrings.

## License

This project uses the `MIT` license. See the `LICENSE` file for more informations.
