{"id":47906629,"url":"https://github.com/spoo-me/qr","last_synced_at":"2026-04-04T04:53:53.581Z","repository":{"id":211275108,"uuid":"728531350","full_name":"spoo-me/qr","owner":"spoo-me","description":"Open-source qrcode sub-service for spoo.me","archived":false,"fork":false,"pushed_at":"2026-03-27T19:33:33.000Z","size":2180,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-04T04:53:48.040Z","etag":null,"topics":["fastapi","python","qrcode","qrcode-api"],"latest_commit_sha":null,"homepage":"https://qr.spoo.me","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/spoo-me.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"spoo-me","open_collective":"spoome","buy_me_a_coffee":"spoo.me","ko_fi":"spoome","patreon":"spoome","liberapay":"spoo.me"}},"created_at":"2023-12-07T06:19:01.000Z","updated_at":"2026-03-27T19:33:29.000Z","dependencies_parsed_at":"2023-12-13T09:29:39.783Z","dependency_job_id":"3b5186b0-6952-43d6-baa8-8589223272b3","html_url":"https://github.com/spoo-me/qr","commit_stats":null,"previous_names":["zingzy/qrcode-api","spoo-me/qr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spoo-me/qr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoo-me%2Fqr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoo-me%2Fqr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoo-me%2Fqr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoo-me%2Fqr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spoo-me","download_url":"https://codeload.github.com/spoo-me/qr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoo-me%2Fqr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31388169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: 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":["fastapi","python","qrcode","qrcode-api"],"created_at":"2026-04-04T04:53:51.658Z","updated_at":"2026-04-04T04:53:53.576Z","avatar_url":"https://github.com/spoo-me.png","language":"Python","funding_links":["https://github.com/sponsors/spoo-me","https://opencollective.com/spoome","https://buymeacoffee.com/spoo.me","https://ko-fi.com/spoome","https://patreon.com/spoome","https://liberapay.com/spoo.me"],"categories":[],"sub_categories":[],"readme":"\u003ch3 align=\"center\"\u003eqr.spoo.me\u003c/h3\u003e\n\u003cp align=\"center\"\u003eOpen-Source QR Code API\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"#-features\"\u003e\u003ckbd\u003eFeatures\u003c/kbd\u003e\u003c/a\u003e\n    \u003ca href=\"#-endpoints\"\u003e\u003ckbd\u003eEndpoints\u003c/kbd\u003e\u003c/a\u003e\n    \u003ca href=\"https://qr.spoo.me/docs\" target=\"_blank\"\u003e\u003ckbd\u003eAPI Docs\u003c/kbd\u003e\u003c/a\u003e\n    \u003ca href=\"#-getting-started\"\u003e\u003ckbd\u003eGetting Started\u003c/kbd\u003e\u003c/a\u003e\n    \u003ca href=\"#-contributing\"\u003e\u003ckbd\u003eContributing\u003c/kbd\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/spoo-me/qr\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/spoo-me/qr?style=flat\u0026color=6a5cf4\" alt=\"Stars\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/spoo-me/qr\"\u003e\u003cimg src=\"https://codecov.io/gh/spoo-me/qr/graph/badge.svg?token=nUKz07qV2h\" alt=\"codecov\"\u003e\u003c/a\u003e\n\u003ca href=\"https://spoo.me/discord\"\u003e\u003cimg src=\"https://img.shields.io/discord/1192388005206433892?logo=discord\" alt=\"Discord\"\u003e\u003c/a\u003e\n\u003ca href=\"https://twitter.com/spoo_me\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/spoo_me?logo=x\u0026label=%40spoo_me\u0026color=0bf\" alt=\"X (formerly Twitter) Follow\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Introduction\n\n**qr.spoo.me** is the QR code generation sub-service of [spoo.me](https://spoo.me). It provides a fast, free, open-source API for generating styled QR codes with support for multiple output formats, gradient coloring, logo embedding, and batch generation.\n\n# Features\n\n- `Classic QR Codes` - Solid fill and background colors with customizable module styles\n- `Gradient QR Codes` - Vertical, horizontal, radial, and square gradient coloring\n- `6 Module Styles` - Rounded, square, circle, gapped, horizontal bars, vertical bars\n- `SVG \u0026 PNG Output` - Choose between raster and vector formats\n- `Logo Embedding` - Embed a logo image in the center of any QR code\n- `Batch Generation` - Generate up to 20 QR codes in a single request (ZIP archive)\n- `Fully Async` - Non-blocking I/O with CPU-bound work offloaded to thread pool\n- `Open Source` - Free to use and self-host\n\n# Endpoints\n\nAll API endpoints are under `/api/v1`.\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET/POST` | `/api/v1/classic` | Generate a classic QR code |\n| `POST` | `/api/v1/classic/logo` | Classic QR code with embedded logo |\n| `GET/POST` | `/api/v1/gradient` | Generate a gradient QR code |\n| `POST` | `/api/v1/gradient/logo` | Gradient QR code with embedded logo |\n| `POST` | `/api/v1/batch` | Batch generate up to 20 QR codes (ZIP) |\n| `GET/POST` | `/health` | Health check |\n| `GET` | `/docs` | Swagger UI |\n\n## Classic QR Code\n\n```bash\ncurl \"https://qr.spoo.me/api/v1/classic?text=https://spoo.me\u0026fill=%23000000\u0026back=%23ffffff\u0026module_style=rounded\" \\\n  --output qr.png\n```\n\n**Parameters:**\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `text` | string | *required* | Text or URL to encode |\n| `fill` | string | `black` | Fill color (name, hex, or RGB) |\n| `back` | string | `white` | Background color |\n| `size` | int | auto | Output size in pixels (10–1000) |\n| `module_style` | string | `rounded` | `rounded`, `square`, `circle`, `gapped`, `horizontal_bars`, `vertical_bars` |\n| `output_format` | string | `png` | `png` or `svg` |\n| `format` | string | — | Structured data format (see below) |\n| `formattings` | string | — | JSON-encoded parameters for the data format |\n\n## Gradient QR Code\n\n```bash\ncurl \"https://qr.spoo.me/api/v1/gradient?text=https://spoo.me\u0026gradient1=(106,26,76)\u0026gradient2=(64,53,60)\u0026gradient_type=vertical\" \\\n  --output qr_gradient.png\n```\n\n**Additional parameters** (on top of classic):\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `gradient1` | string | `(106,26,76)` | Inner/start gradient color (RGB) |\n| `gradient2` | string | `(64,53,60)` | Outer/end gradient color (RGB) |\n| `gradient_type` | string | `vertical` | `vertical`, `horizontal`, `radial`, `square` |\n\n## Logo Embedding\n\n```bash\ncurl -X POST \"https://qr.spoo.me/api/v1/classic/logo?text=https://spoo.me\" \\\n  -F \"logo=@logo.png\" \\\n  --output qr_with_logo.png\n```\n\n## Batch Generation\n\n```bash\ncurl -X POST \"https://qr.spoo.me/api/v1/batch\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"items\": [{\"text\": \"https://spoo.me\"}, {\"text\": \"https://github.com\", \"fill\": \"#FF0000\"}]}' \\\n  --output qrcodes.zip\n```\n\n# Getting Started\n\n\u003cdetails\u003e\n\n\u003csummary\u003eExpand this for a Quick Start\u003c/summary\u003e\n\n## Method 1 — Docker (Recommended)\n\n### Prerequisites\n\n- [Docker](https://docs.docker.com/get-docker/)\n\n### Clone and run\n\n```bash\ngit clone https://github.com/spoo-me/qr.git\ncd qr\ncp .env.example .env\ndocker compose up -d --build\n```\n\nThe API will be available at `http://localhost:8080`.\n\n## Method 2 — Manual\n\n### Prerequisites\n\n- [Python 3.10+](https://www.python.org/downloads/)\n- [uv](https://docs.astral.sh/uv/getting-started/installation/)\n\n### Clone the repository\n\n```bash\ngit clone https://github.com/spoo-me/qr.git\ncd qrcode-api\n```\n\n### Install dependencies\n\n```bash\nuv sync\n```\n\n### Configure environment\n\n```bash\ncp .env.example .env\n```\n\n### Start the server\n\n```bash\nuv run uvicorn main:app --reload --no-access-log\n```\n\nThe API will be available at `http://localhost:8000`. Swagger docs at `http://localhost:8000/docs`.\n\n### Run tests\n\n```bash\nuv run python -m pytest\n```\n\n\u003c/details\u003e\n\n# Architecture\n\n```\nqr/\n├── main.py                    # Uvicorn entry point\n├── app.py                     # FastAPI application factory\n├── config.py                  # pydantic-settings configuration\n├── errors.py                  # Typed error hierarchy\n├── routes/\n│   ├── api_v1/                # /api/v1 endpoints\n│   │   ├── classic.py         # Classic QR generation\n│   │   ├── gradient.py        # Gradient QR generation\n│   │   └── batch.py           # Batch generation\n│   ├── health_routes.py       # /health\n│   └── page_routes.py         # / (web UI)\n├── services/\n│   └── qr_service.py          # Async business logic (thread-pooled)\n├── schemas/\n│   ├── enums.py               # DataFormat, ModuleStyle, GradientType, OutputFormat\n│   └── dto/                   # Request/response Pydantic models\n├── shared/\n│   ├── color.py               # Color parsing\n│   ├── formatters.py          # vCard, WiFi, iCal, etc.\n│   ├── qr_utils.py            # QR version/box size calculators\n│   ├── logging.py             # structlog configuration\n│   └── ip_utils.py            # Client IP extraction\n├── dependencies/\n│   └── services.py            # FastAPI Depends() providers\n├── middleware/\n│   ├── error_handler.py       # Global exception handlers\n│   ├── logging.py             # Request logging (request_id, duration)\n│   └── openapi.py             # OpenAPI schema configuration\n├── tests/                     # Unit + integration tests\n├── dockerfile                 # uv-based Docker build\n├── docker-compose.yml         # Dev compose\n└── pyproject.toml             # uv project config\n```\n\n# Contributing\n\nContributions are always welcome! Here's how you can contribute:\n\n- Bugs are logged using the GitHub issue system. To report a bug, simply [open a new issue](https://github.com/spoo-me/qr/issues/new).\n- Make a [pull request](https://github.com/spoo-me/qr/pulls) for any feature or bug fix.\n\n\u003e [!IMPORTANT]\n\u003e For any type of support or queries, feel free to reach out to us at \u003ckbd\u003e[support@spoo.me](mailto:support@spoo.me)\u003c/kbd\u003e\n\n---\n\n\u003ch6 align=\"center\"\u003e\n\u003cimg src=\"https://spoo.me/static/images/favicon.png\" height=30 title=\"Spoo.me Copyright\"\u003e\n\u003cbr\u003e\n\u0026copy; spoo.me . 2026\n\nAll Rights Reserved\u003c/h6\u003e\n\n\u003cp align=\"center\"\u003e\n \u003ca href=\"https://github.com/spoo-me/qr/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/static/v1.svg?style=for-the-badge\u0026label=License\u0026message=APACHE-2.0\u0026logoColor=d9e0ee\u0026colorA=363a4f\u0026colorB=b7bdf8\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoo-me%2Fqr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspoo-me%2Fqr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoo-me%2Fqr/lists"}