{"id":16786493,"url":"https://github.com/db0/pictrs-safety","last_synced_at":"2025-06-18T15:39:39.977Z","repository":{"id":195641868,"uuid":"693344305","full_name":"db0/pictrs-safety","owner":"db0","description":"Provides an API which can be used by pict-rs `external_validation` option","archived":false,"fork":false,"pushed_at":"2023-09-24T20:51:02.000Z","size":60,"stargazers_count":9,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-10T23:03:54.082Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/db0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"db0","liberapay":"db0","patreon":"db0"}},"created_at":"2023-09-18T20:58:11.000Z","updated_at":"2025-02-03T14:41:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdbcfbcd-6722-4f28-b5eb-ad5bb346647c","html_url":"https://github.com/db0/pictrs-safety","commit_stats":null,"previous_names":["db0/pictrs-safety"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db0%2Fpictrs-safety","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db0%2Fpictrs-safety/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db0%2Fpictrs-safety/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db0%2Fpictrs-safety/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/db0","download_url":"https://codeload.github.com/db0/pictrs-safety/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248312140,"owners_count":21082638,"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":[],"created_at":"2024-10-13T08:12:23.881Z","updated_at":"2025-04-10T23:04:01.356Z","avatar_url":"https://github.com/db0.png","language":"Python","funding_links":["https://github.com/sponsors/db0","https://liberapay.com/db0","https://patreon.com/db0"],"categories":[],"sub_categories":[],"readme":"# pictrs-safety\nProvides an API which can be used by pict-rs `external_validation` option\n\n# Setup\nYou need to copy .env_template into .env and then edit in your variables, or pass them as env variable\n\nAfterwards you need to set up your pict-rs configuration to send the image valiation to this service's\n\n`PICTRS__MEDIA__EXTERNAL_VALIDATION=http://127.0.0.1:14051/api/v1/scan/IPADDR`\n\nThe above assumes this services is running in the same host pict-rs is running. This will allow pict-rs to connect to it with minimum authentication\n\n## Connecting remotely\n\nIf your service is running in a different IP, change the `127.0.0.1` above to be your address, and then use either `KNOWN_PICTRS_IDS` or `KNOWN_PICTRS_IPS` in your .env to specify the authentication for pict-rs (or else anyone in the internet can upload images to your checker)\n\n## Serving via http\n\nIf you're going to consume this service only from your local pict-rs in localhost, you can just run this as a simply http service. \n\nStart it with\n```python\npython -i api_server.py\n```\n\n`-i` is insecure and will listen to all IPs by default. You can use `-l` to specify a different listen address\n\n## Serving via https\n\nIf you want to run service on https, you will need need to deploy a reverse proxy in front of it\n\nStart it with\n```python\npython api_server.py\n```\n\nThis will only listen to 127.0.0.1\n\n# Docker setup\n\nAdd the docker-compose.yml contents into your docker compose. As this service is very lightweight, you can add it to the same docker-compose as your pict-rs.\n\n# fedi-safety\n\nThis tool has been also designed to be used along with [fedi-safety](https://github.com/db0/fedi-safety). [Check the relevant instructions](https://github.com/db0/fedi-safety#pictrs-safety) on how to setup this connection.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdb0%2Fpictrs-safety","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdb0%2Fpictrs-safety","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdb0%2Fpictrs-safety/lists"}