{"id":22120395,"url":"https://github.com/znitche/piscan","last_synced_at":"2026-05-04T06:34:48.308Z","repository":{"id":219464706,"uuid":"748810716","full_name":"zNitche/piScan","owner":"zNitche","description":"backend for SANE operations","archived":false,"fork":false,"pushed_at":"2024-05-19T10:03:44.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T12:15:28.309Z","etag":null,"topics":["alembic","background-jobs","file-server","file-storage","flask","marshmallow","rest-api","scanner","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","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/zNitche.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-26T19:47:29.000Z","updated_at":"2024-05-19T10:03:47.000Z","dependencies_parsed_at":"2024-03-01T18:28:42.553Z","dependency_job_id":"b9251312-fc84-443c-8f86-8e3747f9e42b","html_url":"https://github.com/zNitche/piScan","commit_stats":null,"previous_names":["znitche/piscan-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zNitche%2FpiScan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zNitche%2FpiScan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zNitche%2FpiScan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zNitche%2FpiScan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zNitche","download_url":"https://codeload.github.com/zNitche/piScan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245220463,"owners_count":20579785,"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":["alembic","background-jobs","file-server","file-storage","flask","marshmallow","rest-api","scanner","sqlalchemy"],"created_at":"2024-12-01T14:23:13.123Z","updated_at":"2026-05-04T06:34:48.261Z","avatar_url":"https://github.com/zNitche.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# piScan\nFlask based wrapper for SANE (in this case scan-image tool)\n\n---\n\n### Features:\n- Getting connected devices + supported devices scanning options.\n- Performing scans (with tracking operation progress).\n- Scanned files management (download, preview, update, etc.).\n- Easy setup via docker compose.\n- Minimalist Flask application without usage of 3rd party plugins (adapters).\n- Swagger documentation.\n- Gunicorn errors/access logging.\n- Cron based gunicorn logs clearing.\n\n### How to use it:\n1. Setup project according to `Production Setup`.\n2. Connect scanner / printer with scanner to host device USB port.\n3. Use bare API requests (api docs accessible at `/docs` if `HOST_DOCS` set to `1`) or [web app](https://github.com/zNitche/piScanUI) to interact with connected devices.\n\n### Project Goals:\nThe main goals of the project was to: \n- setup complete Flask app without 3rd party plugins (like `Flask-SQLAlchemy` or `Flask-Migrate`).\n- add some core features like data serialization and swagger docs.\n- test my own approach to flask project structure.\n- setup background process using `cron`.\n\nIn the end, getting a working and functional app was a nice bonus.\n\n\n### Dev Setup\n1. Clone this repo.\n2. Create `.env` and set needed variables.\n```\ncp .env.template .env\n```\n\n3. Start app services\n```\ndocker compose -f docker-compose-dev.yml up\n```\n\n##### Extra Steps (needed during development)\n- Generate swagger docs.\n```\npython3 generate_swagger_docs.py\n```\n\n- Run database migration.\n```\npython3 migrate.py\n```\n\n### Production Setup\n1. Clone this repo.\n2. Create `.env` and set needed variables.\n```\ncp .env.template .env\n```\n\n3. Run docker container.\n```\nsudo docker compose up -d\n```\n\n### Tests\nApp contains basic tests suit. To run them:\n```\npytest -v tests/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznitche%2Fpiscan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fznitche%2Fpiscan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznitche%2Fpiscan/lists"}