{"id":15584019,"url":"https://github.com/david-lor/thispersondoesnotexistapi","last_synced_at":"2025-08-21T04:30:40.762Z","repository":{"id":104270310,"uuid":"171178270","full_name":"David-Lor/ThisPersonDoesNotExistAPI","owner":"David-Lor","description":"Unofficial \"API\" for the ThisPersonDoesNotExist webpage, that returns a random fictional person picture generated by AI","archived":false,"fork":false,"pushed_at":"2024-02-25T18:08:01.000Z","size":10,"stargazers_count":129,"open_issues_count":0,"forks_count":22,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-10T05:42:47.781Z","etag":null,"topics":["ai","human","people","person","python","python-requests","python3","requests","thispersondoesnotexist"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/David-Lor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-17T22:10:11.000Z","updated_at":"2024-12-09T02:14:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"dedd0628-c21b-4b74-bd2b-a4f006956d36","html_url":"https://github.com/David-Lor/ThisPersonDoesNotExistAPI","commit_stats":{"total_commits":4,"total_committers":3,"mean_commits":"1.3333333333333333","dds":0.5,"last_synced_commit":"e49f8106ba1c3bb3a5e0f0aa1c4fd2943a2029f4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FThisPersonDoesNotExistAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FThisPersonDoesNotExistAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FThisPersonDoesNotExistAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FThisPersonDoesNotExistAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/David-Lor","download_url":"https://codeload.github.com/David-Lor/ThisPersonDoesNotExistAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230487844,"owners_count":18233865,"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":["ai","human","people","person","python","python-requests","python3","requests","thispersondoesnotexist"],"created_at":"2024-10-02T20:22:27.408Z","updated_at":"2024-12-19T19:08:24.992Z","avatar_url":"https://github.com/David-Lor.png","language":"Python","readme":"# ThisPersonDoesNotExistAPI\n\nUnofficial \"API\" for the [ThisPersonDoesNotExist](https://thispersondoesnotexist.com/) website.\n\n## What is ThisPersonDoesNotExist?\n\nA page that returns a JPEG picture of a person that does not exist, because it has been generated using an AI.\nWhen opening the webpage, a image is returned directly, and refreshing the page will return a new image (although they can be repeated because the repository is limited and images are not generated on real time).\n\nSome articles about it:\n- [This Person Does Not Exist - Computer generated people Refresh to get a new one | Product Hunt](https://www.producthunt.com/posts/this-person-does-not-exist)\n- [Thispersondoesnotexist.com is face-generating AI at its creepiest](https://thenextweb.com/artificial-intelligence/2019/02/13/thispersondoesnotexist-com-is-face-generating-ai-at-its-creepiest/)\n\n## Why creating/using an \"API\"?\n\nWhy not? Use your imagination!\n\n## Requirements\n\n* Python 3.6\n* requests library\n* free time\n\n## Install it with pip\n```bash\npip install git+https://github.com/David-Lor/ThisPersonDoesNotExistAPI\n```\n\n## Usage\n\n### Get a person using function\n\n```python\nfrom thispersondoesnotexist import get_online_person\npicture = get_online_person()  # bytes representation of the image\n\n# Save to a file\nfrom thispersondoesnotexist import save_picture\nsave_picture(picture, \"a_beautiful_person.jpeg\")\n# If no filename is provided, one will be generated using the checksum of the picture\nsave_picture(picture)\n\n```\n\n### Get a person using class\n\n```python\nfrom thispersondoesnotexist import Person\n# Initialize with True to automatically get a person from the webpage\nperson = Person(fetch_online=True)\n\n# Save to a file\nperson.save(\"a_beautiful_person.jpeg\")\n# If no filename is provided, one will be generated using the checksum of the picture\nperson.save()\n\n```\n\n### Generate checksums\n\nThis can be useful if you want to create a scraper of fictional persons. You would be calling the methods to get random pictures, and to avoid repeating them, you can use their checksum - or just save with the auto-generated filename.\n\n```python\nfrom thispersondoesnotexist import get_online_person, get_checksum_from_picture, Person\n\n# Using object\nperson = Person(fetch_online=True)\nchecksum = person.get_checksum(\"md5\")\n\n# Using function\npicture = get_online_person()\nchecksum2 = get_checksum_from_picture(picture)  # Method is optional, defaults to \"md5\"\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-lor%2Fthispersondoesnotexistapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavid-lor%2Fthispersondoesnotexistapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-lor%2Fthispersondoesnotexistapi/lists"}