semvec/pypi-packages huggingface dataset:
mdex 0.0.14
Mangadex CLI
Requires Python: >=3.8

# Unofficial MangaDex API and CLI

Full documentation can be found at
https://mdapi.readthedocs.io/en/latest/py-modindex/. There are no examples
currently, but they will be coming soon.

## Basic API usage

In absence of full examples, here's a brief example snippet:

```py
from mdapi import MdAPI

md = MdAPI()

user = md.user.get_self()
if user is None:
    print("Please login using `mdex login`")
    quit()
print(f"Logged in as {user.username}")

results = md.manga.search("Murenase")
manga = next(results)
print(f"Found {manga.title}")

read_chapters = md.manga.get_read(manga)

chapters = md.manga.get_chapters(manga, order=ChapterSortOrder(chapter="asc"))
chapter = next(chapters)

print(f"First chapter: {chapter.title}")
print("Already read:", chapter.id in read_chapters)

urls = md.chapter.page_urls_for(chapter)
print("First page:")
print(next(urls))

md.chapter.mark_read(chapter)
```

## CLI Commands

To read a chapter, the three commands needed are, in order:

- `mdex search [query here]`
- `mdex chapters [manga uuid]`
- `mdex read [chapter uuid]`

Additionally, `mdex login`, `mdex logout`, and `mdex whoami` are provided.
These can be used to generate a `.mdauth` file without requiring a call to
`md.auth.login()` from code with a plaintext password. They will also be used
in future when additional functionality is added to the CLI.
django-bunny-storage-willmeyers 0.0.2
Provides Bunny.net file storage in Django.
Requires Python: >=3.7

# django-bunny-storage

Provides Bunny.net file storage in Django.

## Installation

`django-bunny-storage` requires Python >= 3.7.

```bash
pip install django-bunny-storage
```

## Configuration

Everything is configured in your `settings.py` file.

To use:

1. Add `django_bunny_storage` to your `INSTALLED_APPS`.

```python
INSTALLED_APPS = [
    ...
    'django_bunny_storage'
]
```

2. Add `BUNNY_USERNAME` and `BUNNY_PASSWORD` to your settings.

```python
BUNNY_USERNAME = 'myzone'

BUNNY_PASSWORD = 'myzone-random-password-string'

# Optional
BUNNY_REGION = 'de'
```

These settings correspond to your storage zone's *Username* and *Password* found under FTP & API Access in your Bunny.net Storage dashboard.

You must include `BUNNY_REGION` if the default region, **NY**, does not match the region you set yourself. 

3. Change your media url and default file storage backend.

```python
DEFAULT_FILE_STORAGE = 'django_bunny_storage.storage.BunnyStorage'

MEDIA_URL = 'https://myzone.b-cdn.net/' # The Pull Zone hostname.
```

The `MEDIA_URL` is set based on a linked Pull Zone that you setup in the Bunny.net dashboard.

#### In Templates

In order to display your media properly in templates, refer to Django's [docs on the MEDIA_URL attribute](https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-MEDIA_URL) to ensure you're not getting 404s when trying to load media.

Whenever referencing media, do

```html
<img src="{{ MEDIA_URL }}{{ mymodel.file }}" />
```