Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

erkghlerngm44/malaffinity

Repository files navigation

THIS PACKAGE HAS BEEN RETIRED AND ARCHIVED. Refer to erkghlerngm44/aniffinity for the new package.


forthebadge1 forthebadge2 forthebadge3

malaffinity

pypi travis codecov rtd

Calculate affinity between MyAnimeList users

What is this?

Calculate the affinity (Pearson's Correlation * 100) between a "base" user and another user. Refer to the docs for more info.

Install

pip install malaffinity

Dependencies

  • BeautifulSoup4
  • lxml
  • Requests

Examples

from malaffinity import MALAffinity

ma = MALAffinity("YOUR_USERNAME")

affinity, shared = ma.calculate_affinity("OTHER_USERNAME")

print(affinity)
# 79.00545465639877
print(shared)
# 82

or

import malaffinity

affinity, shared = malaffinity.calculate_affinity("YOUR_USERNAME", "OTHER_USERNAME")

# ...

Documentation

Documentation at https://malaffinity.readthedocs.io

Legal Stuff

Licensed under MIT. See LICENSE for more info.

Cat Gif