{"id":23109006,"url":"https://github.com/sindercube/skindentity","last_synced_at":"2025-10-17T02:44:54.210Z","repository":{"id":46131105,"uuid":"389188245","full_name":"Sindercube/Skindentity","owner":"Sindercube","description":"Python FastAPI with a collection of Minecraft Skin rendering APIs.","archived":false,"fork":false,"pushed_at":"2021-11-12T11:43:37.000Z","size":86,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-25T13:00:35.222Z","etag":null,"topics":["fastapi","minecraft"],"latest_commit_sha":null,"homepage":"https://skindentity.deta.dev/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sindercube.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-07-24T19:50:25.000Z","updated_at":"2022-07-31T09:49:18.000Z","dependencies_parsed_at":"2022-09-03T23:42:03.893Z","dependency_job_id":null,"html_url":"https://github.com/Sindercube/Skindentity","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sindercube%2FSkindentity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sindercube%2FSkindentity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sindercube%2FSkindentity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sindercube%2FSkindentity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sindercube","download_url":"https://codeload.github.com/Sindercube/Skindentity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230048478,"owners_count":18164745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["fastapi","minecraft"],"created_at":"2024-12-17T01:32:15.878Z","updated_at":"2025-10-17T02:44:49.171Z","avatar_url":"https://github.com/Sindercube.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\r\n  \u003cp align=\"center\"\u003e\r\n    \u003cimg alt=\"Skindentity\" src=\"icon.png\"\u003eSkindentity\r\n  \u003c/p\u003e\r\n\r\n  \u003cp align=\"center\"\u003e\r\n    \u003ca href=\"https://discord.gg/dmKMAMf\"\u003e\r\n      \u003cimg alt=\"Chat on Discord\" src=\"https://img.shields.io/badge/Chat%20on-Discord-%237289da\"\u003e\r\n    \u003c/a\u003e\r\n    \u003ca href=\"https://go.deta.dev/deploy\"\u003e\r\n      \u003cimg alt=\"Deploy to DETA\" src=\"https://img.shields.io/badge/Deploy%20to-DETA-%23D53AA2\"\u003e\r\n    \u003c/a\u003e\r\n    \u003ca href=\"https://heroku.com/deploy\"\u003e\r\n      \u003cimg alt=\"Deploy to Heroku\" src=\"https://img.shields.io/badge/Deploy%20to-Heroku-%237056BF\" /\u003e\r\n    \u003c/a\u003e\r\n  \u003c/p\u003e\r\n\u003c/h1\u003e\r\n\r\n**Skindentity** is a python library for rendering Minecraft skins. Works as a Rest API using the [FastAPI](https://fastapi.tiangolo.com/) library.\r\n\r\nMainly meant for server admins who want to display their players outside of the game.\r\n\r\n## Current APIs\r\n\r\n\u003e #### For an interactive version of the API, [click here](https://skindentity.deta.dev/).\r\n\r\n### skindentity.deta.dev/portrait/\r\n![preview](previews/portrait.png)\r\n\r\n### skindentity.deta.dev/face/\r\n![preview](previews/face.png)\r\n\r\n### skindentity.deta.dev/skin/\r\n![preview](previews/skin.png)\r\n\r\n\u003e #### You can set `MHF_Steve` as the name to use the default Steve skin.\r\n\r\n### Arguments\r\n\r\n|Value|Type|Description|Default|\r\n|-|-|-|-|\r\n|`player_name`|`str`|What player's skin to use|\r\n|`skin_url`|`str`|Link to get an image|\r\n|`skin_base64`|`str`|Base64 encoded image|\r\n|`slim`|`bool`|Whether or not to render skins with slim arms|`false`\r\n|`overlay`|`bool`|Whether or not to display the skin's overlay|`false`\r\n|`margin`|`int`|How many pixels around the image to make transparent. (1 to 8)|`0`\r\n|`upscale`|`int`|How many times to increase the size of a pixel. (2 to 8)|`1`\r\n\r\n## How To Contribute\r\n\r\nWant to render a skin another way? You can do that by adding your own rendering API.\r\n\r\nTo do this, create a new function inside of [renders.py](renders.py), with `skin` and `slim` as the arguments.\r\n\r\n- The `skin` argument is an `Image` object provided by Pillow, which you can manipulate into your own render.\r\n\r\n- The `slim` argument is a Boolean that determines whether the skin image has a slim model type or not.\r\n\r\nInside of the function, add your own code for turning the image into your own render, then `return` the render.\r\n\r\n\u003e #### I'd recommend using the Pillow library (`pip install pil -user`), it allows you to edit images programmatically, and it is already included in the [requirements.txt](requirements.txt) file of the repository.\r\n\r\n```py\r\nfrom PIL import Image\r\n\r\ndef new_render(skin: Image, slim: bool) -\u003e Image:\r\n    final_image = Image.new()\r\n    # your code for rendering\r\n    return final_image\r\n```\r\n\r\nThen, add a new definition inside of [main.py](main.py), with an `app.get('/api_name/')` decorator, and `args: template_args = Depends()` as the only argument.\r\n\r\n- The `app.get('/api_name/')` decorator tells the website which path needs to be entered to use your render.\r\n\r\n- The `args: template_args = Depends()` argument tells the API to use the same arguments as the other APIs. This is so each API is easy to switch around.\r\n\r\nInside of the function, return the results of the `api_template()` function with `args`, `render_function` and `'cached_renders_path/'` as the arguments.\r\n\r\n- `args` passes the default arguments to the template.\r\n- the `render_function` argument is the function defined in [renders.py](renders.py), which gets called to process the image.\r\n- the `'cached_renders_path/'` argument is the path to cache images in. (After `'/tmp/'`)\r\n- The `api_template()` function sends all of the data for processing, and returns the rendered image.\r\n\r\n```py\r\n@app.get('/api_name/')\r\nasync def render_name(args: template_args = Depends()):\r\n    return api_template(args, render_function, 'cached_renders_path/')\r\n```\r\n\r\nAnyone with any web design knowledge can also contribute by redesigning the interactive website.\r\n\r\n###### Psst, looking for a place to host your API for free? Check out [DETA](https://www.deta.sh/), they're pretty cool.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindercube%2Fskindentity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindercube%2Fskindentity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindercube%2Fskindentity/lists"}