Skip to content

Commit

Permalink
mini refactor + added description to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
D4n13l3k00 committed Aug 11, 2021
1 parent fbe35bc commit ae437a4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion anipics/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get(query: str) -> Union[Models.Result, Coroutine[None, None, Models.Result]
url=requests.get(
f"https://nekos.life/api/v2/img/{query}").json()['url']
)

class AnimeApiHisoka:
class types:
class SFW:
Expand All @@ -40,6 +40,7 @@ class SFW:
cuddle = "cuddle"
punch = "punch"
waifu = "waifu"

class NSFW:
hentai = "hentai"
boobs = "boobs"
Expand Down
5 changes: 3 additions & 2 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import asyncio

from anipics import Parser
from anipics import asyncParser
from anipics import Parser, asyncParser


def sync_example():
nk = Parser.NekosLife
Expand All @@ -14,6 +14,7 @@ def sync_example():
aah = Parser.AnimeApiHisoka
print(aah.get(aah.types.SFW.slap).url)


async def async_example():
nk = asyncParser.NekosLife
print((await nk.get(nk.types.neko)).url)
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@

from setuptools import setup

with open("README.md", "r") as fh:
long_description = fh.read()

setup(name='anipics',
version='1.1',
version='1.2',
description='Simple module for getting anime pictures',
long_description=long_description,
long_description_content_type="text/markdown",
packages=['anipics'],
author_email='[email protected]',
url="https://github.com/D4n13l3k00/anipics",
Expand Down

0 comments on commit ae437a4

Please sign in to comment.