Package: pynindo
The Youtuberrezocreate a social media charts and statistics page. I developed
this small Python API for it. It also includes a small CLI so you can write your
own bash script or review the new media charts from the command line.Why?Nindo.deis very pretty, but I find the raw data much more exciting. I looked
through the http traffic and catches the most important API calls. Pynindo bind
everything together and make it easy to get the different raw data.How to install?It is Python, so uses pip:pip install pynindoMaybe it’s not on PyPi yet. Shame on me. But then you can try that:pip install git+https://github.com/axju/pynindo.gitAnyway do not forget to use a virtual environment ;-)How to use?It is really simple. Import the api from the pynindo package and then play with
it. There is a list with all Endpoints below:>>> from pynindo import api
>>> api.charts.youtube
 1    1365880 UnsympathischTV
 2    1288557 KMNGang
 3    1228038 BangerMusik
 4    1122593 Kontra K
 5    1063852 Rezo
 6     997038 MontanaBlack
 7     991567 Mert
 8     961703 BibisBeautyPalace
 9     936666 Julien Bam
10     864054 Varion
>>> api.viral.tiktok
platform:tiktok |      type:likes |  2500000 Anna Ix
platform:tiktok | type:kommentare |   141100 Mido
platform:tiktok |      type:views | 60400000 Anna IxThis are only the string representation of the data. Call.json()on any
endpoint to get the raw data.:>>> api.search['rezo'].json()
[{'id': '18ed6dae1cf050a2b3bc65f72ef1db0d', 'name': 'Rezo', '_channels': [{'name': 'Rezo ja lol ey', 'platform': 'youtube', 'avatar': 'https://yt3.ggpht.com/a/AGF-l7-Z43wxXREipZAy2eFGe3msWo7slqem6sfQtQ=s800-c-k-c0xffffffff-no-rj-mo', 'userID': 'UCvU1c8D5n1Rue3NFRu0pJSw'}, {'name': 'Rezo', 'platform': 'instagram', 'avatar': 'https://scontent-iad3-1.cdninstagram.com/v/t51.2885-19/s320x320/82444457_181735326360382_1854627991502454784_n.jpg?_nc_ht=scontent-iad3-1.cdninstagram.com&_nc_ohc=2mcqiSZbzjsAX_0Heqf&oh=4c5411c7ba7c37b6ff4af746022f8988&oe=5F413D49', 'userID': '2200749531'}, {'name': 'Rezo', 'platform': 'tiktok', 'avatar': 'https://p16-va-tiktok.ibyteimg.com/img/musically-maliva-obj/1643642074164230~c5_720x720.jpeg', 'userID': '6651546051420913670'}, {'name': 'Rezo', 'platform': 'twitter', 'avatar': 'https://pbs.twimg.com/profile_images/1074977137730510849/OGFUOGl7_400x400.jpg', 'userID': 'rezomusik'}, {'name': 'rezo', 'platform': 'youtube', 'avatar': 'https://yt3.ggpht.com/a/AGF-l78WgdiaSU879chSmplIenQ5qRAzXkdNGqyPVQ=s800-c-k-c0xffffffff-no-rj-mo', 'userID': 'UCLCb_YDL9XfSYsWpS5xrO5Q'}], 'avatar': 'https://yt3.ggpht.com/a/AGF-l7-Z43wxXREipZAy2eFGe3msWo7slqem6sfQtQ=s800-c-k-c0xffffffff-no-rj-mo'}]As a scriptNow we can write a small script, to display more information to the top
Youtuber:frompynindoimportapiforiteminapi.charts.youtube.small.json():print(api.artist[item['artistID']])See theexamplesfolder for more funny stuff.Many ways to callThere are many ways to call the API. All endpoints have the__getitem__attribute. That means:>>> api.milestones.newis the same as:>>> api['milestones'].newor:>>> api['milestones']['new']or:>>> api.milestones['new']Same thing for everyone, but watch out a bit withsearchandartist.Callable rootThe second important part is the callable root api. You
can enter the endpoints, by calling the api itself:>>> api('charts', 'youtube', 'rank')is the same as:>>> api.charts.youtube.rankThe api classFor some advanced use, you can create the api object yourself:from pynindo.nindo import Api
api = ApiCommand line interfaceYes there is one, try it:$ pynindo -h
$ pynindo charts -h
$ pynindo viral -hEndpointsLike nindo.de, the api has multiple sections. The placeholdersplatformandtypehave the following content:platform = {youtube|instagram|twitter|tiktok|twitch}
type = {likes|kommentare|views|retweets|max. zuschauer|längster stream}Chartsapi.charts.{platform}.{type|small|rank}The current charts to each platform. Each platform has several individual
subcategories. Examples:api.charts.youtube
api.charts.twitter.likes
api.charts.instagram.small
api.charts.tiktok.rankViralapi.viral.{platform}.{type}Lists all posts that were viral last month. The data are also grouped by the
platform and the type. Examples:api.viral
api.viral.youtube
api.viral.twitter.likesMilestonesapi.milestones.{new|past}.{platform}Any artist who has or will soon reach a particular number of followers.
Examples:api.milestones
api.milestones.new
api.milestones.new.tiktok
api.milestones.pastSearchapi.search['artist'].{first|last|count()|[n]}The entry point to find a artist. Examples:api.search['rezo']
api.search['rezo'].count()
api.search['rezo'].first
api.search['rezo'].last
api.search['rezo'][0]Artistapi.artist['id']All data belonging to an artist. Examples:api.artist['18ed6dae1cf050a2b3bc65f72ef1db0d']DevelopmentVirtual environment windows:python -m venv venv
venv\Scripts\activateVirtual environment linux:python3 -m venv venv
source venv/bin/activateSetup project:python -m pip install --upgrade pip wheel setuptools coverage flake8 pylint tox
python -m pip install -e .Create test data:python .\tests\utils.pyRun some test:tox -p autoRun single test with code coverage:coverage run --source=pynindo -m unittest discover -v
coverage report -mCheck syntax:flake8 pynindo
pylint --rcfile=setup.cfg pynindoCreate package:python -m pip install --upgrade twine
python setup.py sdist bdist_wheel
twine check dist/*
twine upload dist/*