Skip to main content

NetEase Cloud Music ApiClient extracted from NetEase-MusicBox

Project description

NetEase Cloud Music ApiClient

python-version pypi-version Documentation Status github-issues license downloads

网易云音乐核心 API 客户端。

这个项目的目的是抽离一个干净的 API Client,便于二次开发和维护。

主要代码来自NetEase-MusicBox,非常感谢每一位该项目的贡献者。

警告,目前 API 尚未稳定,不保证兼容性。万一有新点子说不定就会改。

此外欢迎 code review 和 pull request。

使用方法

quickstart

from nemcore.api import NetEaseApi

netease = NetEaseApi(cookie_path='./cookies')
netease.login('cloudmusic@163.com', 'password')

# 获取我的歌单
playlists = netease.get_user_playlist()

# 获取日推
recommend = netease.get_recommend_songs()

# 签到
netease.daily_task()

详细的 api 文档和快速开始请参考这里

v1.0 开发计划

  • 添加测试用例
  • 规范命名和返回值结构
  • 提供可配置的缓存(是否持久化,缓存有效时间等)
  • 提供文档,挂在readthedocs.io上。
  • 重构简化 api 和实现。
  • 提供助手函数,实现一些常用操作
  • 移除 python2 支持(__future__等),迁移到 python3.6+
  • 支持异步(考虑aiohttp)

changelog

0.1.4

本版本主要是对代码进行重构,将核心 Api 类清晰化,解耦无关逻辑,简化了使用。

此外,提供了比较详细的入门文档,帮助使用者快速了解使用方式和 api 的响应内容。

不过 api 文档不是很好,需要改进。

  • nemcore.netease 模块重命名成 nemcore.api
  • nemcore.netease.NetEase 重命名成 nemcore.api.NetEaseApi
  • 删除 nemcore.conf 模块
  • 删除 nemcore.storage 模块
  • 删除 nemcore.parser 模块
  • 删除 nemcore.pdict 模块
  • 添加 sphinx 文档和快速开始指引,文档已经挂到了 readthedocs.io

0.1.3

  • 支持缓存。基于picklecachetools实现,可配置缓存时间和是否持久化

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nemcore-0.1.4.tar.gz (13.8 kB view hashes)

Uploaded Source

Built Distribution

nemcore-0.1.4-py3-none-any.whl (14.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page