Skip to main content

HibiAPI

一个实现了多种常用站点的易用化 API 的程序.

A program that implements easy-to-use APIs for a variety of commonly used sites.

Demo Version

Lint Test Coverage

PyPI PyPI - Downloads PyPI - Python Version PyPI - License

GitHub last commit GitHub commit activity Lines of code GitHub stars GitHub forks GitHub issues


前言

  • HibiAPI提供多种网站公开内容的 API 集合, 它们包括:

    • Pixiv 的图片和小说相关信息获取和搜索
    • Bilibili 的视频/番剧等信息获取和搜索
    • 网易云音乐的音乐/MV 等信息获取和搜索
    • 百度贴吧的帖子内容的获取
    • 爱壁纸的横版和竖版壁纸获取
    • 哔咔漫画的漫画信息获取和搜索
    • …
  • 该项目的前身是 Imjad API1

    • 由于它的使用人数过多, 致使调用超出限制, 所以本人希望提供一个开源替代来供社区进行自由地部署和使用, 从而减轻一部分该 API 的使用压力

优势

开源

高效

  • 使用 Python 的异步机制, 由FastAPI驱动, 带来高效的使用体验 虽然性能瓶颈压根不在这

稳定

  • 在代码中广泛使用了 Python 的类型提示支持, 使代码可读性更高且更加易于维护和调试

  • 在开发初期起就一直使用多种现代 Python 开发工具辅助开发, 包括:

    • 使用 PyLance 进行静态类型推断
    • 使用 Flake8 对代码格式进行检查
    • 使用 Black 格式化代码以提升代码可读性
  • 不直接使用第三方开发的 API 调用库, 而是全部用更加适合 Web 应用的逻辑重写第三方 API 请求, 更加可控 疯狂造轮子

已实现 API2

  • Pixiv
  • 网易云音乐
  • 一言 (其代替方案https://hitokoto.cn提供的方案已足够好, 暂不考虑支持)
  • Bilibili
  • 二维码
  • 企鹅 FM (似乎用的人不是很多)
  • 百度贴吧
  • 爱壁纸
  • 哔咔漫画

部署指南

Deploy to Heroku

应用实例

我有更多的应用实例? 立即 PR!

特别鸣谢

@journey-ad 大佬的 Imjad API, 它是本项目的起源

参考项目

正是因为有了你们, 这个项目才得以存在

贡献者们

感谢这些为这个项目作出贡献的各位大佬:

Kyomotoi
Kyomotoi

📖 ⚠️
城倉奏
城倉奏

💡
SkipM4
SkipM4

📖
Nook
Nook

💻
Jocky Chiang
Jocky Chiang

💻
midori
midori

📖
Pretty9
Pretty9

💻
Jad
Jad

🐛 🤔
Yumine Sakura
Yumine Sakura

💻
yeyang
yeyang

💻

本段符合 all-contributors 规范

开源许可

Copyright 2020-2021 Mix Technology

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
  1. 什么是 Imjad API ↩

  2. 请查看 #1 ↩

  3. 为了减轻服务器负担, Demo 服务器已开启了 Cloudflare 全站缓存, 如果有实时获取更新的需求, 请自行搭建或使用其他部署实例 ↩

Metadata

Release files for HibiAPI 0.8.0

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

Source distribution (sdist)

Source distribution for HibiAPI 0.8.0
File Size Uploaded
HibiAPI-0.8.0.tar.gz 232.8 kB Details

Built distribution (wheel)

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

Total release size: 486.2 kB

Release files / HibiAPI-0.8.0.tar.gz

Download URL HibiAPI-0.8.0.tar.gz
Size 232.8 kB
Tags Source
SHA-256 checksum
How to use checksums
afc5eeeb70cc5ea38d550b427706c09cbf85257f074762bcf9b6089dca489b18
BLAKE2b-256 checksum
How to use checksums
9cf11c3bab1b29d7ad5b92898659c026726cf207e363b0d757520585015da38d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.8.0 CPython/3.10.6

Release files / HibiAPI-0.8.0-py3-none-any.whl

Download URL HibiAPI-0.8.0-py3-none-any.whl
Size 253.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad0ff398f71c492aef7d6cdf0cb0ad096ad4da8dd0581151aee342bba8cc64bc
BLAKE2b-256 checksum
How to use checksums
db03ed5a829005afb19fe83cfddd9265b6c89596cdad5f71201feb6e3eae8a35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.8.0 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.7

3 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

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