Skip to main content

README.md

malody

Python wrapper for Malody game API

pip install malody

Quick Start

import malody

key = "your_api_key_here"
uid = 1000  # Player ID

info = malody.player.info(uid, key)
print(info["username"])  # "chonicle"

All Functions

info(touid, key)

malody.player.info(1000, "your_key")

Returns:

{
  "username": "chonicle",
  "uid": 2,
  "avatar": "2.png",
  "gender": 2,
  "playTime": 88,
  "gold": 21494,
  "regtime": 1406271800,
  "area": 9,
  "active": 2,
  "banner": "/banner/2.jpg!banner"
}

activity(touid, key)

malody.player.activity(1000, "your_key")

Returns:

{
  "code": 0,
  "data": [
    {
      "time": 1533644730,
      "msg": "chonicle's chart has been unstabled by xipigu",
      "link": "/chart/11359"
    },
    {
      "time": 1495596563,
      "msg": "chonicle has unlocked First ring",
      "link": "/accounts/user/achieve/2"
    }
  ],
  "hasMore": false,
  "next": 1458861740
}

chart(touid, key)

malody.player.chart(1000, "your_key")

Returns:

{
  "code": 0,
  "data": [
    {
      "sid": 611,
      "cid": 1480,
      "title": "Hana wa Odore ya Irohaniho",
      "artist": "Team \"Hanayamata\"",
      "version": "7K easy voice",
      "level": 0,
      "length": 84,
      "mode": 0
    },
    {
      "sid": 511,
      "cid": 1206,
      "title": "Soutaisei VISION",
      "artist": "nao",
      "version": "Extreme Lv.22",
      "level": 22,
      "length": 99,
      "mode": 4
    }
  ],
  "hasMore": false,
  "next": 1436969618
}

rank(touid, key)

malody.player.rank(1000, "your_key")

Returns:

{
  "code": 0,
  "data": [
    {
      "mode": 0,
      "rank": 329338,
      "level": 6,
      "pc": 19,
      "acc": 95.7246376811594,
      "combo": 728
    },
    {
      "mode": 4,
      "rank": 2976,
      "level": 6,
      "pc": 14,
      "acc": 96.5382484115106,
      "combo": 554
    }
  ],
  "hasMore": false,
  "next": 0
}

wiki(touid, key, lang=0, raw=1)

malody.player.wiki(1000, "your_key", lang=1)

Returns:

{
  "code": 0,
  "wiki": "=Samplitude教程=\n\n[http://m.mugzone.net/page/444 tutorial]",
  "raw": true
}

Full Example

import malody

key = "L-IOzHDc4Ug8OWJsAwD89Y..."
uid = 1000

# Get all data
info = malody.player.info(uid, key)
activity = malody.player.activity(uid, key)
charts = malody.player.chart(uid, key)
rank = malody.player.rank(uid, key)
wiki = malody.player.wiki(uid, key)

print(f"Player: {info['username']}")
print(f"Created {len(charts['data'])} charts")
print(f"Key mode rank: {rank['data'][0]['rank']}")
print(f"Recent activity: {activity['data'][0]['msg']}")

Notes

  • touid = player ID to lookup
  • key = your API key
  • Returns dict on success
  • Returns None on error

todo

  • add functions for skins/maps
  • add skin/map downloader?
  • write up on how to get api key

Metadata

Release files for malody 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for malody 0.1.1
File Size Uploaded Provenance Actions
malody-0.1.1.tar.gz 4.1 kB Without provenance Details for malody-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for malody 0.1.1
File Interpreter ABI Platform Actions
malody-0.1.1-py3-none-any.whl Python 3 none any Details for malody-0.1.1-py3-none-any.whl

Total release size: 8.5 kB

Release files / malody-0.1.1.tar.gz

Download URL malody-0.1.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d5383ef006cc36ae84b4a92e79eaa52d2fe8bc8de8d577af02b2e09f684ad413
BLAKE2b-256 checksum
How to use checksums
05d866e329278c355681214d75961943f5e0cc9ceadaf5a6cd06b4a4409c460d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Release files / malody-0.1.1-py3-none-any.whl

Download URL malody-0.1.1-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d306685beae013574a6ff916f3b03e6c2d5ab88634e5125e71844953a2c408cf
BLAKE2b-256 checksum
How to use checksums
ba689eec7e723304716173a083db473607c3a346566e7e27ebd68c402a24c574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Security for malody 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page