{"id":29783742,"url":"https://github.com/pure-peace/pp-server","last_synced_at":"2026-03-07T00:01:59.001Z","repository":{"id":52869904,"uuid":"354105256","full_name":"Pure-Peace/pp-server","owner":"Pure-Peace","description":"A Fast osu! pp calculator web api written in Rust. It is also the PP server of Peace.","archived":false,"fork":false,"pushed_at":"2022-12-16T20:51:22.000Z","size":486,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T19:57:06.136Z","etag":null,"topics":["actix-web","bancho","ntex","osu","osu-pp","peace","pp","rosu-pp","tokio"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pure-Peace.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-02T18:44:45.000Z","updated_at":"2023-04-09T02:51:53.000Z","dependencies_parsed_at":"2023-01-29T16:01:47.840Z","dependency_job_id":null,"html_url":"https://github.com/Pure-Peace/pp-server","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Pure-Peace/pp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pure-Peace%2Fpp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pure-Peace%2Fpp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pure-Peace%2Fpp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pure-Peace%2Fpp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pure-Peace","download_url":"https://codeload.github.com/Pure-Peace/pp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pure-Peace%2Fpp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30204109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actix-web","bancho","ntex","osu","osu-pp","peace","pp","rosu-pp","tokio"],"created_at":"2025-07-27T15:45:14.826Z","updated_at":"2026-03-07T00:01:58.991Z","avatar_url":"https://github.com/Pure-Peace.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## A Fast osu! pp calculator web api written in Rust\n\nIt is also the PP server of **[Peace](https://github.com/Pure-Peace/peace)**.\n\n**Pure-Rust** pp calculator based on [peace-performance](https://github.com/Pure-Peace/peace-performance) and [rosu-pp](https://github.com/MaxOhn/rosu-pp).\n\n### Features\n\n- **Common**:\n  - **request with you like: beatmap md5, beatmap id, beatmapset id + file name**\n  - **beatmap cache**\n  - **preload beatmaps** (WARING: May cause insufficient memory, if the number of maps is large enough)\n  - **calculate beatmap MD5**\n  - **auto request, download beatmap from osu!api**\n  - **raw pp info: aim, spd, acc, str.**\n  - **acc list: 95, 98, 99, 100 (request with \u0026acc_list=1)**\n  - **Oppai? Or a custom algorithm**\n  - **auto-pp-recalculate (peace)**\n    - If pp calculation fails (such as restarting pp-server), just save task to redis in the format of \"`calc:{table(mode)}:{score_id}:{player_id}`\":\"`md5=xxx\u0026mods=xx\u0026mode=xx\u0026n300=xx`\". pp-server will auto recalculate these tasks, and notify peace to update the stats of these players.\n.\n  - **pp calculate**:\n    - osu!Standard\n    - Catch the beat\n    - Taiko\n    - Mainia\n- (**Default Enabled**) feature **with_peace**:\n  - beatmap database (needs setup with [Peace](https://github.com/Pure-Peace/Peace/tree/main/sql))\n  - auto pp recalculate\n  - How to **enable**?\n    - `Cargo.toml` features Set `default = [\"with_peace\"]`\n    - **Will run as a pp server of Peace**\n  - How to **disable**?\n    - Set features `default = [\"peace-objects/no_database\"]`\n    - **Not use peace database, run pp-server independently.**\n\n## Examples\n\n**with md5**\n\n*Common*\n\n```\n/api/calc?md5=ccb1f31b5eeaf26d40f8c905293efc03\n```\n\n```json\n{\n  \"acc_list\": null,\n  \"message\": \"done\",\n  \"mode\": 0,\n  \"mods\": 0,\n  \"pp\": 522.0230712890625,\n  \"raw\": {\n    \"acc\": 128.93072509765625,\n    \"aim\": 255.26805114746094,\n    \"spd\": 127.87066650390625,\n    \"str\": 0,\n    \"total\": 522.0230712890625\n  },\n  \"stars\": 7.084656715393066,\n  \"status\": 1\n}\n```\n\n*Simple*\n\n```\n/api/calc?md5=ccb1f31b5eeaf26d40f8c905293efc03\u0026simple=1\n```\n\n```json\n{\n  \"acc_list\": null,\n  \"message\": \"done\",\n  \"mode\": 0,\n  \"mods\": 0,\n  \"pp\": 522.0230712890625,\n  \"stars\": 7.084656715393066,\n  \"status\": 1\n}\n```\n\n*Acc list*\n\n```\n/api/calc?md5=ccb1f31b5eeaf26d40f8c905293efc03\u0026acc_list=1\n```\n\n```json\n{\n  \"acc_list\": {\n    \"95\": 311.07989501953125,\n    \"98\": 389.848388671875,\n    \"99\": 452.67974853515625,\n    \"100\": 522.0230712890625\n  },\n  \"message\": \"done\",\n  \"mode\": 0,\n  \"mods\": 0,\n  \"pp\": 522.0230712890625,\n  \"raw\": {\n    \"acc\": 128.93072509765625,\n    \"aim\": 255.26805114746094,\n    \"spd\": 127.87066650390625,\n    \"str\": 0,\n    \"total\": 522.0230712890625\n  },\n  \"stars\": 7.084656715393066,\n  \"status\": 1\n}\n```\n\n**with bid (Can use without add osu!api keys)**\n\n```\n/api/calc?bid=2848898\n```\n\n```json\n{\n  \"acc_list\": null,\n  \"message\": \"done\",\n  \"mode\": 0,\n  \"mods\": 0,\n  \"pp\": 366.8739013671875,\n  \"raw\": {\n    \"acc\": 118.15778350830078,\n    \"aim\": 122.00947570800781,\n    \"spd\": 121.79961395263672,\n    \"str\": 0,\n    \"total\": 366.8739013671875\n  },\n  \"stars\": 5.856814384460449,\n  \"status\": 1\n}\n```\n\n**with sid + file name (need osu!api keys)**\n\n```\n/api/calc?sid=1378720\u0026file_name=Tanchiky%20-%20Bridge%20(NyarkoO)%20[Extension].osu\n```\n\nThis method is currently cannot use cache.\n\n```json\n{\n  \"acc_list\": null,\n  \"message\": \"done\",\n  \"mode\": 0,\n  \"mods\": 0,\n  \"pp\": 366.8739013671875,\n  \"raw\": {\n    \"acc\": 118.15778350830078,\n    \"aim\": 122.00947570800781,\n    \"spd\": 121.79961395263672,\n    \"str\": 0,\n    \"total\": 366.8739013671875\n  },\n  \"stars\": 5.856814384460449,\n  \"status\": 1\n}\n```\n\n### Best performance (Fastest, but lower accuracy)\n\nSet Cargo.toml\n\n```rust\npeace-performance = { ... }\n```\n\nto\n\n```rust\npeace-performance = { ..., feature = \"no_sliders_no_leniency\" }\n```\n\n## Note\n\n**This pp-server requires all `.osu` files use file MD5 as the name.**\n\n- **Rename .osu files to file md5:**\n\n  - If you want **pp server** auto recalculate all `.osu` files MD5 name before started, set `recalculate_osu_file_md5 = true` in `config/pp-server/default.toml`\n  - Or manual run this python script `rename_osu_files.py` in project (python3.8+).\n  - If its Debug compile, python will more faster than Rust.\n\n- **Effect**\n  - Calculating\n  - ![p](screenshot/ef1.png)\n  - After\n  - ![p](screenshot/ef2.png)\n\n### Setup\n\n1. Set your `.osu` files dir path in `config/pp-server/default.toml`\n2. Will let the `.osu` files name be the `md5` of the file\n3. Set your osu!api keys in *.toml (if enabled feature `peace`, set it on your database)\n\n### Debug\n\n```\ncargo run\n```\n\n### Release\n\n```\ncargo run --release\n```\n\n**Cross compile (Win to Linux)**\n\n```\ncargo cross_linux_x86\n```\n\n## MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpure-peace%2Fpp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpure-peace%2Fpp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpure-peace%2Fpp-server/lists"}